factor common code

This commit is contained in:
Eric House 2013-08-15 20:03:46 -07:00
parent 6a27bbba94
commit 10ef75113f

View file

@ -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 );