Loading services/core/java/com/android/server/appop/AppOpsService.java +15 −7 Original line number Diff line number Diff line Loading @@ -551,6 +551,11 @@ public class AppOpsService extends IAppOpsService.Stub { @VisibleForTesting final Constants mConstants; /** * Some processes in the user may still be running when trying to drop the user's state */ private static final long REMOVE_USER_DELAY = 5000L; @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) final class UidState { public final int uid; Loading Loading @@ -6820,6 +6825,8 @@ public class AppOpsService extends IAppOpsService.Stub { @Override public void removeUser(int userHandle) throws RemoteException { checkSystemUid("removeUser"); mHandler.postDelayed(() -> { Slog.i(TAG, "Removing user " + userHandle + " from AppOpsService"); synchronized (AppOpsService.this) { final int tokenCount = mOpUserRestrictions.size(); for (int i = tokenCount - 1; i >= 0; i--) { Loading @@ -6828,6 +6835,7 @@ public class AppOpsService extends IAppOpsService.Stub { } removeUidsForUserLocked(userHandle); } }, REMOVE_USER_DELAY); } @Override Loading Loading
services/core/java/com/android/server/appop/AppOpsService.java +15 −7 Original line number Diff line number Diff line Loading @@ -551,6 +551,11 @@ public class AppOpsService extends IAppOpsService.Stub { @VisibleForTesting final Constants mConstants; /** * Some processes in the user may still be running when trying to drop the user's state */ private static final long REMOVE_USER_DELAY = 5000L; @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) final class UidState { public final int uid; Loading Loading @@ -6820,6 +6825,8 @@ public class AppOpsService extends IAppOpsService.Stub { @Override public void removeUser(int userHandle) throws RemoteException { checkSystemUid("removeUser"); mHandler.postDelayed(() -> { Slog.i(TAG, "Removing user " + userHandle + " from AppOpsService"); synchronized (AppOpsService.this) { final int tokenCount = mOpUserRestrictions.size(); for (int i = tokenCount - 1; i >= 0; i--) { Loading @@ -6828,6 +6835,7 @@ public class AppOpsService extends IAppOpsService.Stub { } removeUidsForUserLocked(userHandle); } }, REMOVE_USER_DELAY); } @Override Loading