Loading core/java/android/hardware/display/DisplayManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 Loading @@ -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; /** Loading core/java/android/view/Display.java +9 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 */ Loading Loading
core/java/android/hardware/display/DisplayManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 Loading @@ -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; /** Loading
core/java/android/view/Display.java +9 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 */ Loading