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

Commit e1c3944a authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Account for DPM state when checking FLAG_SECURE" into rvc-dev am:...

Merge "Account for DPM state when checking FLAG_SECURE" into rvc-dev am: 331ac296 am: fbfb754d am: 4a9ba7bc am: 16a67a87

Change-Id: Ia9a0b8db16d67aad0e9f48239fccd6b7a4f2468f
parents 33813906 16a67a87
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ import static android.view.Display.INVALID_DISPLAY;
import static android.view.Surface.ROTATION_270;
import static android.view.Surface.ROTATION_90;
import static android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
@@ -4317,8 +4316,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     *         screenshot.
     */
    boolean shouldUseAppThemeSnapshot() {
        return mDisablePreviewScreenshots || forAllWindows(w -> (w.mAttrs.flags & FLAG_SECURE) != 0,
                true /* topToBottom */);
        return mDisablePreviewScreenshots || forAllWindows(w -> {
                    return mWmService.isSecureLocked(w);
                }, true /* topToBottom */);
    }

    /**
+1 −3
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH;
import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
@@ -3705,8 +3704,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
    }

    boolean hasSecureWindowOnScreen() {
        final WindowState win = getWindow(
                w -> w.isOnScreen() && (w.mAttrs.flags & FLAG_SECURE) != 0);
        final WindowState win = getWindow(w -> w.isOnScreen() && mWmService.isSecureLocked(w));
        return win != null;
    }