summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kulian <akulian@google.com>2017-08-24 20:39:54 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-08-24 20:39:54 +0000
commitd48474969e786eaf911ac51bcd05faa3399b788a (patch)
tree98ccab1ce80a893bb1e0b549ecefaa56aba9589c
parent82765d5f298d71242ede48c81d92696b285d48e9 (diff)
parenta64529a989cc90c535ced5482ac30e3165310df2 (diff)
Merge "Apply API review comments for SHOW_WITH_INSECURE_KEYGUARD" into oc-mr1-dev am: 7ee92d5291
am: a64529a989 Change-Id: I52a93678621d3d28e88cd7cdbfbfca3c2a96f0b2
-rw-r--r--core/java/android/hardware/display/DisplayManager.java11
-rw-r--r--core/java/android/view/Display.java12
2 files changed, 20 insertions, 3 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index bda80390a614..3ade2e430a61 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -25,6 +25,7 @@ import android.os.Handler;
import android.util.SparseArray;
import android.view.Display;
import android.view.Surface;
+import android.view.WindowManagerPolicy;
import java.util.ArrayList;
@@ -236,6 +237,13 @@ public final class DisplayManager {
* keyguard is shown but is insecure.
*
* <p>
+ * This might be used in a case when the content of a virtual display is captured and sent to an
+ * external hardware display that is not visible to the system directly. This flag will allow
+ * the continued display of content while other displays will be covered by a keyguard which
+ * doesn't require providing credentials to unlock. This means that there is either no password
+ * or other authentication method set, or the device is in a trusted state -
+ * {@link android.service.trust.TrustAgentService} has available and active trust agent.
+ * </p><p>
* This flag can only be applied to private displays as defined by the
* {@link Display#FLAG_PRIVATE} display flag. It is mutually exclusive with
* {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}. If both flags are specified then this flag's behavior
@@ -243,8 +251,11 @@ public final class DisplayManager {
* </p>
*
* @see #createVirtualDisplay
+ * @see WindowManagerPolicy#isKeyguardSecure(int)
+ * @see WindowManagerPolicy#isKeyguardTrustedLw()
* @hide
*/
+ // TODO: Update name and documentation and un-hide the flag. Don't change the value before that.
public static final int VIRTUAL_DISPLAY_FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD = 1 << 5;
/**
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 97788931ea93..e7c3f92da830 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -26,6 +26,7 @@ import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.graphics.Rect;
+import android.hardware.display.DisplayManager;
import android.hardware.display.DisplayManagerGlobal;
import android.os.Parcel;
import android.os.Parcelable;
@@ -200,11 +201,16 @@ public final class Display {
* Display flag: Indicates that the display can show its content when non-secure keyguard is
* shown.
* <p>
- * This flag identifies secondary displays that won't show keyguard if it can be dismissed
- * without entering credentials. Display content will be shown even if other displays are
- * locked.
+ * This flag identifies secondary displays that will continue showing content if keyguard can be
+ * dismissed without entering credentials.
+ * </p><p>
+ * An example of usage is a virtual display which content is displayed on external hardware
+ * display that is not visible to the system directly.
* </p>
*
+ * @see DisplayManager#VIRTUAL_DISPLAY_FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD
+ * @see WindowManagerPolicy#isKeyguardSecure(int)
+ * @see WindowManagerPolicy#isKeyguardTrustedLw()
* @see #getFlags
* @hide
*/