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