Skip to content

Commit 1444263

Browse files
authored
remove app from recent apps when exit (#19961) (#20020)
1 parent b606f2a commit 1444263

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@ public static void onPause() {
378378
}
379379

380380
public static void terminateProcess() {
381+
// Remove it from recent apps.
382+
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
383+
sActivity.finishAndRemoveTask();
384+
}
381385
android.os.Process.killProcess(android.os.Process.myPid());
382386
}
383387

0 commit comments

Comments
 (0)