Change launchmode of GameActivityto 'singleTask' and add onNewIntent method to GameActivity

This commit is contained in:
uykek 2020-06-15 09:05:56 +02:00
parent a8629fc75c
commit 87a80de4b5
2 changed files with 9 additions and 0 deletions

View file

@ -42,6 +42,7 @@
<activity <activity
android:name="org.secuso.privacyfriendlysudoku.ui.GameActivity" android:name="org.secuso.privacyfriendlysudoku.ui.GameActivity"
android:label="@string/title_activity_game_view" android:label="@string/title_activity_game_view"
android:launchMode="singleTask"
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar">
<intent-filter > <intent-filter >

View file

@ -298,6 +298,14 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig
} }
gameController.deleteTimer(); gameController.deleteTimer();
} }
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
startActivity(intent);
finish();
}
@Override @Override
public void onResume(){ public void onResume(){
super.onResume(); super.onResume();