Loading core/java/android/app/admin/DevicePolicyCache.java +2 −4 Original line number Diff line number Diff line Loading @@ -41,8 +41,7 @@ public abstract class DevicePolicyCache { /** * See {@link DevicePolicyManager#getScreenCaptureDisabled} */ public abstract boolean isScreenCaptureAllowed(@UserIdInt int userHandle, boolean ownerCanAddInternalSystemWindow); public abstract boolean isScreenCaptureAllowed(@UserIdInt int userHandle); /** * Caches {@link DevicePolicyManager#getPasswordQuality(android.content.ComponentName)} of the Loading Loading @@ -70,8 +69,7 @@ public abstract class DevicePolicyCache { private static final EmptyDevicePolicyCache INSTANCE = new EmptyDevicePolicyCache(); @Override public boolean isScreenCaptureAllowed(int userHandle, boolean ownerCanAddInternalSystemWindow) { public boolean isScreenCaptureAllowed(int userHandle) { return true; } Loading core/java/android/view/IWindowManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -249,7 +249,7 @@ interface IWindowManager * Set whether screen capture is disabled for all windows of a specific user from * the device policy cache. */ void refreshScreenCaptureDisabled(int userId); void refreshScreenCaptureDisabled(); // These can only be called with the SET_ORIENTATION permission. /** Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3331,7 +3331,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } userId = activity.mUserId; } return DevicePolicyCache.getInstance().isScreenCaptureAllowed(userId, false); return DevicePolicyCache.getInstance().isScreenCaptureAllowed(userId); } private void onLocalVoiceInteractionStartedLocked(IBinder activity, Loading services/core/java/com/android/server/wm/RootWindowContainer.java +2 −2 Original line number Diff line number Diff line Loading @@ -643,9 +643,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } } void setSecureSurfaceState(int userId) { void refreshSecureSurfaceState() { forAllWindows((w) -> { if (w.mHasSurface && userId == w.mShowUserId) { if (w.mHasSurface) { w.mWinAnimator.setSecureLocked(w.isSecureLocked()); } }, true /* traverseTopToBottom */); Loading services/core/java/com/android/server/wm/WindowManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -2009,15 +2009,15 @@ public class WindowManagerService extends IWindowManager.Stub * the device policy cache. */ @Override public void refreshScreenCaptureDisabled(int userId) { public void refreshScreenCaptureDisabled() { int callingUid = Binder.getCallingUid(); if (callingUid != SYSTEM_UID) { throw new SecurityException("Only system can call refreshScreenCaptureDisabled."); } synchronized (mGlobalLock) { // Update secure surface for all windows belonging to this user. mRoot.setSecureSurfaceState(userId); // Refresh secure surface for all windows. mRoot.refreshSecureSurfaceState(); } } Loading Loading
core/java/android/app/admin/DevicePolicyCache.java +2 −4 Original line number Diff line number Diff line Loading @@ -41,8 +41,7 @@ public abstract class DevicePolicyCache { /** * See {@link DevicePolicyManager#getScreenCaptureDisabled} */ public abstract boolean isScreenCaptureAllowed(@UserIdInt int userHandle, boolean ownerCanAddInternalSystemWindow); public abstract boolean isScreenCaptureAllowed(@UserIdInt int userHandle); /** * Caches {@link DevicePolicyManager#getPasswordQuality(android.content.ComponentName)} of the Loading Loading @@ -70,8 +69,7 @@ public abstract class DevicePolicyCache { private static final EmptyDevicePolicyCache INSTANCE = new EmptyDevicePolicyCache(); @Override public boolean isScreenCaptureAllowed(int userHandle, boolean ownerCanAddInternalSystemWindow) { public boolean isScreenCaptureAllowed(int userHandle) { return true; } Loading
core/java/android/view/IWindowManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -249,7 +249,7 @@ interface IWindowManager * Set whether screen capture is disabled for all windows of a specific user from * the device policy cache. */ void refreshScreenCaptureDisabled(int userId); void refreshScreenCaptureDisabled(); // These can only be called with the SET_ORIENTATION permission. /** Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3331,7 +3331,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } userId = activity.mUserId; } return DevicePolicyCache.getInstance().isScreenCaptureAllowed(userId, false); return DevicePolicyCache.getInstance().isScreenCaptureAllowed(userId); } private void onLocalVoiceInteractionStartedLocked(IBinder activity, Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +2 −2 Original line number Diff line number Diff line Loading @@ -643,9 +643,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } } void setSecureSurfaceState(int userId) { void refreshSecureSurfaceState() { forAllWindows((w) -> { if (w.mHasSurface && userId == w.mShowUserId) { if (w.mHasSurface) { w.mWinAnimator.setSecureLocked(w.isSecureLocked()); } }, true /* traverseTopToBottom */); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -2009,15 +2009,15 @@ public class WindowManagerService extends IWindowManager.Stub * the device policy cache. */ @Override public void refreshScreenCaptureDisabled(int userId) { public void refreshScreenCaptureDisabled() { int callingUid = Binder.getCallingUid(); if (callingUid != SYSTEM_UID) { throw new SecurityException("Only system can call refreshScreenCaptureDisabled."); } synchronized (mGlobalLock) { // Update secure surface for all windows belonging to this user. mRoot.setSecureSurfaceState(userId); // Refresh secure surface for all windows. mRoot.refreshSecureSurfaceState(); } } Loading