Loading services/java/com/android/server/am/ActivityStack.java +5 −9 Original line number Diff line number Diff line Loading @@ -220,11 +220,6 @@ final class ActivityStack { long mLaunchStartTime = 0; long mFullyDrawnStartTime = 0; /** * Is the privacy guard currently enabled? */ String mPrivacyGuardPackageName = null; /** * Save the most recent screenshot for reuse. This keeps Recents from taking two identical * screenshots, one for the Recents thumbnail and one for the pauseActivity thumbnail. Loading Loading @@ -1715,23 +1710,24 @@ final class ActivityStack { private final void updatePrivacyGuardNotificationLocked(ActivityRecord next) { if (mPrivacyGuardPackageName != null && mPrivacyGuardPackageName.equals(next.packageName)) { String privacyGuardPackageName = mStackSupervisor.mPrivacyGuardPackageName; if (privacyGuardPackageName != null && privacyGuardPackageName.equals(next.packageName)) { return; } boolean privacy = mService.mAppOpsService.getPrivacyGuardSettingForPackage( next.app.uid, next.packageName); if (mPrivacyGuardPackageName != null && !privacy) { if (privacyGuardPackageName != null && !privacy) { Message msg = mService.mHandler.obtainMessage( ActivityManagerService.CANCEL_PRIVACY_NOTIFICATION_MSG, next.userId); msg.sendToTarget(); mPrivacyGuardPackageName = null; mStackSupervisor.mPrivacyGuardPackageName = null; } else if (privacy) { Message msg = mService.mHandler.obtainMessage( ActivityManagerService.POST_PRIVACY_NOTIFICATION_MSG, next); msg.sendToTarget(); mPrivacyGuardPackageName = next.packageName; mStackSupervisor.mPrivacyGuardPackageName = next.packageName; } } Loading services/java/com/android/server/am/ActivityStackSupervisor.java +5 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,11 @@ public final class ActivityStackSupervisor { /** Stack id of the front stack when user switched, indexed by userId. */ SparseIntArray mUserStackInFront = new SparseIntArray(2); /** * Is the privacy guard currently enabled? Shared between ActivityStacks */ String mPrivacyGuardPackageName = null; public ActivityStackSupervisor(ActivityManagerService service, Context context, Looper looper) { mService = service; Loading Loading
services/java/com/android/server/am/ActivityStack.java +5 −9 Original line number Diff line number Diff line Loading @@ -220,11 +220,6 @@ final class ActivityStack { long mLaunchStartTime = 0; long mFullyDrawnStartTime = 0; /** * Is the privacy guard currently enabled? */ String mPrivacyGuardPackageName = null; /** * Save the most recent screenshot for reuse. This keeps Recents from taking two identical * screenshots, one for the Recents thumbnail and one for the pauseActivity thumbnail. Loading Loading @@ -1715,23 +1710,24 @@ final class ActivityStack { private final void updatePrivacyGuardNotificationLocked(ActivityRecord next) { if (mPrivacyGuardPackageName != null && mPrivacyGuardPackageName.equals(next.packageName)) { String privacyGuardPackageName = mStackSupervisor.mPrivacyGuardPackageName; if (privacyGuardPackageName != null && privacyGuardPackageName.equals(next.packageName)) { return; } boolean privacy = mService.mAppOpsService.getPrivacyGuardSettingForPackage( next.app.uid, next.packageName); if (mPrivacyGuardPackageName != null && !privacy) { if (privacyGuardPackageName != null && !privacy) { Message msg = mService.mHandler.obtainMessage( ActivityManagerService.CANCEL_PRIVACY_NOTIFICATION_MSG, next.userId); msg.sendToTarget(); mPrivacyGuardPackageName = null; mStackSupervisor.mPrivacyGuardPackageName = null; } else if (privacy) { Message msg = mService.mHandler.obtainMessage( ActivityManagerService.POST_PRIVACY_NOTIFICATION_MSG, next); msg.sendToTarget(); mPrivacyGuardPackageName = next.packageName; mStackSupervisor.mPrivacyGuardPackageName = next.packageName; } } Loading
services/java/com/android/server/am/ActivityStackSupervisor.java +5 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,11 @@ public final class ActivityStackSupervisor { /** Stack id of the front stack when user switched, indexed by userId. */ SparseIntArray mUserStackInFront = new SparseIntArray(2); /** * Is the privacy guard currently enabled? Shared between ActivityStacks */ String mPrivacyGuardPackageName = null; public ActivityStackSupervisor(ActivityManagerService service, Context context, Looper looper) { mService = service; Loading