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 );
|
||||
|
||||
Intent intent = getIntent();
|
||||
startFirstHasDict( intent );
|
||||
startNewNetGame( intent );
|
||||
startHasGameID( intent );
|
||||
startHasRowID( intent );
|
||||
tryStartsFromIntent( getIntent() );
|
||||
|
||||
askDefaultNameIf();
|
||||
} // onCreate
|
||||
|
||||
|
@ -390,10 +387,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
Assert.assertNotNull( intent );
|
||||
invalRelayIDs( intent.getStringArrayExtra( RELAYIDS_EXTRA ) );
|
||||
invalRowID( intent.getLongExtra( ROWID_EXTRA, -1 ) );
|
||||
startFirstHasDict( intent );
|
||||
startNewNetGame( intent );
|
||||
startHasGameID( intent );
|
||||
startHasRowID( intent );
|
||||
tryStartsFromIntent( intent );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1109,6 +1103,14 @@ public class GamesList extends XWExpandableListActivity
|
|||
launchGame( rowid, true );
|
||||
}
|
||||
|
||||
private void tryStartsFromIntent( Intent intent )
|
||||
{
|
||||
startFirstHasDict( intent );
|
||||
startNewNetGame( intent );
|
||||
startHasGameID( intent );
|
||||
startHasRowID( intent );
|
||||
}
|
||||
|
||||
public static void onGameDictDownload( Context context, Intent intent )
|
||||
{
|
||||
intent.setClass( context, GamesList.class );
|
||||
|
|
Loading…
Reference in a new issue