mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
factor common code
This commit is contained in:
parent
6a27bbba94
commit
10ef75113f
1 changed files with 11 additions and 9 deletions
|
@ -372,11 +372,8 @@ public class GamesList extends XWExpandableListActivity
|
||||||
|
|
||||||
NetUtils.informOfDeaths( this );
|
NetUtils.informOfDeaths( this );
|
||||||
|
|
||||||
Intent intent = getIntent();
|
tryStartsFromIntent( getIntent() );
|
||||||
startFirstHasDict( intent );
|
|
||||||
startNewNetGame( intent );
|
|
||||||
startHasGameID( intent );
|
|
||||||
startHasRowID( intent );
|
|
||||||
askDefaultNameIf();
|
askDefaultNameIf();
|
||||||
} // onCreate
|
} // onCreate
|
||||||
|
|
||||||
|
@ -390,10 +387,7 @@ public class GamesList extends XWExpandableListActivity
|
||||||
Assert.assertNotNull( intent );
|
Assert.assertNotNull( intent );
|
||||||
invalRelayIDs( intent.getStringArrayExtra( RELAYIDS_EXTRA ) );
|
invalRelayIDs( intent.getStringArrayExtra( RELAYIDS_EXTRA ) );
|
||||||
invalRowID( intent.getLongExtra( ROWID_EXTRA, -1 ) );
|
invalRowID( intent.getLongExtra( ROWID_EXTRA, -1 ) );
|
||||||
startFirstHasDict( intent );
|
tryStartsFromIntent( intent );
|
||||||
startNewNetGame( intent );
|
|
||||||
startHasGameID( intent );
|
|
||||||
startHasRowID( intent );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1109,6 +1103,14 @@ public class GamesList extends XWExpandableListActivity
|
||||||
launchGame( rowid, true );
|
launchGame( rowid, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tryStartsFromIntent( Intent intent )
|
||||||
|
{
|
||||||
|
startFirstHasDict( intent );
|
||||||
|
startNewNetGame( intent );
|
||||||
|
startHasGameID( intent );
|
||||||
|
startHasRowID( intent );
|
||||||
|
}
|
||||||
|
|
||||||
public static void onGameDictDownload( Context context, Intent intent )
|
public static void onGameDictDownload( Context context, Intent intent )
|
||||||
{
|
{
|
||||||
intent.setClass( context, GamesList.class );
|
intent.setClass( context, GamesList.class );
|
||||||
|
|
Loading…
Reference in a new issue