Remove FLAG_ACTIVITY_NEW_TASK to fix duplication of root

activity. Explanation in code.
This commit is contained in:
Andy2 2011-07-20 18:20:22 -07:00
parent ba40d96fea
commit 04a80fca07

View file

@ -66,8 +66,23 @@ public class DispatchNotify extends Activity {
if ( mustLaunch ) {
Utils.logf( "DispatchNotify: nothing running" );
Intent intent = new Intent( this, GamesList.class );
/* Flags. Tried Intent.FLAG_ACTIVITY_NEW_TASK. I don't
* remember what it fixes, but what it breaks is easy to
* duplicate. Launch Crosswords from the home screen making
* sure it's the only instance running. Get a networked game
* going, and with BoardActivity frontmost check the relay and
* select a relay notification. New BoardActivity will come
* up, but if you hit home button then Crosswords icon you're
* back to games list. Hit back button and you're back to
* BoardActivity, and back from there back to GamesList.
* That's because a new activity came up from the activity
* below thanks to the flag.
*/
intent.setFlags( Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_NEW_TASK );
// Intent.FLAG_ACTIVITY_NEW_TASK NO See above
);
if ( null != relayIDs ) {
intent.putExtra( RELAYIDS_EXTRA, relayIDs );
} else if ( null != data ) {