sdk: remove app from recents after kill

Change-Id: I88615b04bc4479304e26bb3481362f9b2b79e46a
Signed-off-by: Ghosuto <clash.raja10@gmail.com>
This commit is contained in:
Ghosuto
2025-08-14 03:14:25 +00:00
committed by Joey
parent de2213acf4
commit 09b858311a

View File

@@ -68,6 +68,8 @@ public class ActionUtils {
final IActivityManager am = ActivityManagerNative.getDefault();
am.forceStopPackage(packageName, foregroundTask.userId);
am.removeTask(foregroundTask.taskId);
new Handler(Looper.getMainLooper()).post(() -> {
Toast.makeText(context, R.string.app_killed_message, Toast.LENGTH_SHORT).show();
});