Merge "Account for DPM state when checking FLAG_SECURE" into rvc-dev
This commit is contained in:
@@ -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;
|
||||
@@ -4311,8 +4310,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 */);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user