Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c1da839 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add back ActivityManagerService.onUserRemoved" into rvc-dev am:...

Merge "Add back ActivityManagerService.onUserRemoved" into rvc-dev am: 525fab26 am: ce289c6d am: f1ec3ffd

Change-Id: I87240f894b637306b9c3be328819cfd76f209227
parents d2a68d0d f1ec3ffd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -80,6 +80,15 @@ public abstract class ActivityManagerInternal {
    public abstract boolean startIsolatedProcess(String entryPoint, String[] mainArgs,
            String processName, String abiOverride, int uid, Runnable crashHandler);

    /**
     * Called when a user has been deleted. This can happen during normal device usage
     * or just at startup, when partially removed users are purged. Any state persisted by the
     * ActivityManager should be purged now.
     *
     * @param userId The user being cleaned up.
     */
    public abstract void onUserRemoved(@UserIdInt int userId);

    /**
     * Kill foreground apps from the specified user.
     */
+9 −0
Original line number Diff line number Diff line
@@ -18778,6 +18778,15 @@ public class ActivityManagerService extends IActivityManager.Stub
                    processName, abiOverride, uid, crashHandler);
        }
        @Override
        public void onUserRemoved(@UserIdInt int userId) {
            // Clean up any ActivityTaskManager state (by telling it the user is stopped)
            mAtmInternal.onUserStopped(userId);
            // Clean up various services by removing the user
            mBatteryStatsService.onUserRemoved(userId);
            mUserController.onUserRemoved(userId);
        }
        @Override
        public void killForegroundAppsForUser(@UserIdInt int userId) {
            synchronized (ActivityManagerService.this) {
+2 −3
Original line number Diff line number Diff line
@@ -3890,9 +3890,8 @@ public class UserManagerService extends IUserManager.Stub {
                            new Thread() {
                                @Override
                                public void run() {
                                    // Clean up any ActivityTaskManager state
                                    LocalServices.getService(ActivityTaskManagerInternal.class)
                                            .onUserStopped(userId);
                                    LocalServices.getService(ActivityManagerInternal.class)
                                            .onUserRemoved(userId);
                                    removeUserState(userId);
                                }
                            }.start();
+2 −4
Original line number Diff line number Diff line
@@ -306,11 +306,9 @@ public abstract class ActivityTaskManagerInternal {
    public abstract void setAllowAppSwitches(@NonNull String type, int uid, int userId);

    /**
     * Called when a user has been deleted. This can happen during normal device usage
     * or just at startup, when partially removed users are purged. Any state persisted by the
     * ActivityManager should be purged now.
     * Called when a user has been stopped.
     *
     * @param userId The user being cleaned up.
     * @param userId The user being stopped.
     */
    public abstract void onUserStopped(int userId);
    public abstract boolean isGetTasksAllowed(String caller, int callingPid, int callingUid);