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

Commit d4847496 authored by Andrii Kulian's avatar Andrii Kulian Committed by android-build-merger
Browse files

Merge "Apply API review comments for SHOW_WITH_INSECURE_KEYGUARD" into oc-mr1-dev am: 7ee92d52

am: a64529a9

Change-Id: I52a93678621d3d28e88cd7cdbfbfca3c2a96f0b2
parents 82765d5f a64529a9
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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;

    /**
+9 −3
Original line number Diff line number Diff line
@@ -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
     */