Loading services/core/java/com/android/server/wm/RootWindowContainer.java +3 −0 Original line number Diff line number Diff line Loading @@ -630,6 +630,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> forAllWindows(w -> { w.setSecureLocked(w.isSecureLocked()); }, true /* traverseTopToBottom */); forAllTasks(t -> { t.setSecure(t.isSecure()); }); } void updateHiddenWhileSuspendedState(final ArraySet<String> packages, final boolean suspended) { Loading services/core/java/com/android/server/wm/Task.java +14 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ import android.app.PictureInPictureParams; import android.app.TaskInfo; import android.app.TaskInfo.SelfMovable; import android.app.WindowConfiguration; import android.app.admin.DevicePolicyCache; import android.content.ComponentName; import android.content.Intent; import android.content.pm.ActivityInfo; Loading Loading @@ -3055,6 +3056,7 @@ class Task extends TaskFragment { void setInitialSurfaceControlProperties(SurfaceControl.Builder b) { b.setEffectLayer().setMetadata(METADATA_TASK_ID, mTaskId); super.setInitialSurfaceControlProperties(b); getPendingTransaction().setSecure(mSurfaceControl, isSecure()); } /** Checking if self or its child tasks are animated by recents animation. */ Loading Loading @@ -6935,6 +6937,18 @@ class Task extends TaskFragment { t.show(mDecorSurfaceContainer.mDecorSurface); } void setSecure(boolean secure) { getPendingTransaction().setSecure(mSurfaceControl, secure); scheduleAnimation(); } boolean isSecure() { if (mWmService.getDisableSecureWindows()) { return false; } return !DevicePolicyCache.getInstance().isScreenCaptureAllowed(mUserId); } /** * A class managing the decor surface. * Loading Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +3 −0 Original line number Diff line number Diff line Loading @@ -630,6 +630,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> forAllWindows(w -> { w.setSecureLocked(w.isSecureLocked()); }, true /* traverseTopToBottom */); forAllTasks(t -> { t.setSecure(t.isSecure()); }); } void updateHiddenWhileSuspendedState(final ArraySet<String> packages, final boolean suspended) { Loading
services/core/java/com/android/server/wm/Task.java +14 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ import android.app.PictureInPictureParams; import android.app.TaskInfo; import android.app.TaskInfo.SelfMovable; import android.app.WindowConfiguration; import android.app.admin.DevicePolicyCache; import android.content.ComponentName; import android.content.Intent; import android.content.pm.ActivityInfo; Loading Loading @@ -3055,6 +3056,7 @@ class Task extends TaskFragment { void setInitialSurfaceControlProperties(SurfaceControl.Builder b) { b.setEffectLayer().setMetadata(METADATA_TASK_ID, mTaskId); super.setInitialSurfaceControlProperties(b); getPendingTransaction().setSecure(mSurfaceControl, isSecure()); } /** Checking if self or its child tasks are animated by recents animation. */ Loading Loading @@ -6935,6 +6937,18 @@ class Task extends TaskFragment { t.show(mDecorSurfaceContainer.mDecorSurface); } void setSecure(boolean secure) { getPendingTransaction().setSecure(mSurfaceControl, secure); scheduleAnimation(); } boolean isSecure() { if (mWmService.getDisableSecureWindows()) { return false; } return !DevicePolicyCache.getInstance().isScreenCaptureAllowed(mUserId); } /** * A class managing the decor surface. * Loading