mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-14 08:01:38 +01:00
Remove FLAG_ACTIVITY_NEW_TASK to fix duplication of root
activity. Explanation in code.
This commit is contained in:
parent
ba40d96fea
commit
04a80fca07
1 changed files with 16 additions and 1 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue