diff options
| author | Antony Sargent <asargent@google.com> | 2021-12-01 17:12:48 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-12-01 17:12:48 +0000 |
| commit | fead48301ac3a6a05574cbf5639f4e2ce7f089c6 (patch) | |
| tree | 0af96609851cbe5be1de7ca3346611e008efc441 /core/java/android | |
| parent | 508c3a8bc52225d6a4d2d512a3b5b35707676103 (diff) | |
| parent | e5058b0cc394d66dd822e2394e801543cb6a56ff (diff) | |
Merge "Add a flag for allowing always unlocked virtual displays"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/hardware/display/DisplayManager.java | 18 | ||||
| -rw-r--r-- | core/java/android/view/Display.java | 9 | ||||
| -rw-r--r-- | core/java/android/view/DisplayInfo.java | 3 |
3 files changed, 30 insertions, 0 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java index 448188583b1a..4c81f9cd3808 100644 --- a/core/java/android/hardware/display/DisplayManager.java +++ b/core/java/android/hardware/display/DisplayManager.java @@ -344,6 +344,16 @@ public final class DisplayManager { */ public static final int VIRTUAL_DISPLAY_FLAG_OWN_DISPLAY_GROUP = 1 << 11; + /** + * Virtual display flags: Indicates that the virtual display should always be unlocked and not + * have keyguard displayed on it. Only valid for virtual displays that aren't in the default + * display group. + * + * @see #createVirtualDisplay + * @see #VIRTUAL_DISPLAY_FLAG_OWN_DISPLAY_GROUP + * @hide + */ + public static final int VIRTUAL_DISPLAY_FLAG_ALWAYS_UNLOCKED = 1 << 12; /** @hide */ @IntDef(prefix = {"MATCH_CONTENT_FRAMERATE_"}, value = { @@ -1363,5 +1373,13 @@ public final class DisplayManager { * @hide */ String KEY_HIGH_REFRESH_RATE_BLACKLIST = "high_refresh_rate_blacklist"; + + /** + * Whether to allow the creation of always unlocked virtual displays by apps having the + * required permissions. + * @hide + */ + String KEY_ALLOW_ALWAYS_UNLOCKED_VIRTUAL_DISPLAYS = + "allow_always_unlocked_virtual_displays"; } } diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index 8259a9d98125..3cc51c7e8b51 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -299,6 +299,15 @@ public final class Display { public static final int FLAG_OWN_DISPLAY_GROUP = 1 << 8; /** + * Flag: Indicates that the display should always be unlocked. Only valid on virtual displays + * that aren't in the default display group. + * + * @hide + * @see #getFlags() + */ + public static final int FLAG_ALWAYS_UNLOCKED = 1 << 9; + + /** * Display flag: Indicates that the contents of the display should not be scaled * to fit the physical screen dimensions. Used for development only to emulate * devices with smaller physicals screens while preserving density. diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java index 657251046551..b8614ccde6fd 100644 --- a/core/java/android/view/DisplayInfo.java +++ b/core/java/android/view/DisplayInfo.java @@ -863,6 +863,9 @@ public final class DisplayInfo implements Parcelable { if ((flags & Display.FLAG_OWN_DISPLAY_GROUP) != 0) { result.append(", FLAG_OWN_DISPLAY_GROUP"); } + if ((flags & Display.FLAG_ALWAYS_UNLOCKED) != 0) { + result.append(", FLAG_ALWAYS_UNLOCKED"); + } return result.toString(); } } |
