sdk: remove app from recents after kill
Change-Id: I88615b04bc4479304e26bb3481362f9b2b79e46a Signed-off-by: Ghosuto <clash.raja10@gmail.com>
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user