Commit de8d375
committed
Fix double-launch issue when switching games from external launcher
When launching a different game via FLAG_ACTIVITY_CLEAR_TOP (e.g., from
Daijishou), onNewIntent() was calling finish() + System.exit(0), which
killed the app without restarting. Users had to tap twice to launch a
new game.
Now starts a fresh activity with FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK
before calling System.exit(0). This queues the new game to launch, then
kills the current process so Android starts fresh.1 parent abc7ea3 commit de8d375
1 file changed
Lines changed: 5 additions & 3 deletions
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
0 commit comments