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

Commit 22a7c7dd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow showing content on virtual displays when locked"

parents c850137c fc8f82bc
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -15246,6 +15246,7 @@ package android.hardware.display {
    field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
    field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
    field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
    field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
    field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
    field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
    field public static final int VIRTUAL_DISPLAY_FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 32; // 0x20
  }
  }
  public static abstract interface DisplayManager.DisplayListener {
  public static abstract interface DisplayManager.DisplayListener {
@@ -42575,6 +42576,7 @@ package android.view {
    field public static final int FLAG_PRIVATE = 4; // 0x4
    field public static final int FLAG_PRIVATE = 4; // 0x4
    field public static final int FLAG_ROUND = 16; // 0x10
    field public static final int FLAG_ROUND = 16; // 0x10
    field public static final int FLAG_SECURE = 2; // 0x2
    field public static final int FLAG_SECURE = 2; // 0x2
    field public static final int FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 32; // 0x20
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
    field public static final int INVALID_DISPLAY = -1; // 0xffffffff
    field public static final int INVALID_DISPLAY = -1; // 0xffffffff
    field public static final int STATE_DOZE = 3; // 0x3
    field public static final int STATE_DOZE = 3; // 0x3
+2 −0
Original line number Original line Diff line number Diff line
@@ -15823,6 +15823,7 @@ package android.hardware.display {
    field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
    field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
    field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
    field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
    field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
    field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
    field public static final int VIRTUAL_DISPLAY_FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 32; // 0x20
  }
  }
  public static abstract interface DisplayManager.DisplayListener {
  public static abstract interface DisplayManager.DisplayListener {
@@ -45976,6 +45977,7 @@ package android.view {
    field public static final int FLAG_PRIVATE = 4; // 0x4
    field public static final int FLAG_PRIVATE = 4; // 0x4
    field public static final int FLAG_ROUND = 16; // 0x10
    field public static final int FLAG_ROUND = 16; // 0x10
    field public static final int FLAG_SECURE = 2; // 0x2
    field public static final int FLAG_SECURE = 2; // 0x2
    field public static final int FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 32; // 0x20
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
    field public static final int INVALID_DISPLAY = -1; // 0xffffffff
    field public static final int INVALID_DISPLAY = -1; // 0xffffffff
    field public static final int STATE_DOZE = 3; // 0x3
    field public static final int STATE_DOZE = 3; // 0x3
+2 −0
Original line number Original line Diff line number Diff line
@@ -15279,6 +15279,7 @@ package android.hardware.display {
    field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
    field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
    field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
    field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
    field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
    field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
    field public static final int VIRTUAL_DISPLAY_FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 32; // 0x20
  }
  }
  public static abstract interface DisplayManager.DisplayListener {
  public static abstract interface DisplayManager.DisplayListener {
@@ -42877,6 +42878,7 @@ package android.view {
    field public static final int FLAG_PRIVATE = 4; // 0x4
    field public static final int FLAG_PRIVATE = 4; // 0x4
    field public static final int FLAG_ROUND = 16; // 0x10
    field public static final int FLAG_ROUND = 16; // 0x10
    field public static final int FLAG_SECURE = 2; // 0x2
    field public static final int FLAG_SECURE = 2; // 0x2
    field public static final int FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 32; // 0x20
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
    field public static final int INVALID_DISPLAY = -1; // 0xffffffff
    field public static final int INVALID_DISPLAY = -1; // 0xffffffff
    field public static final int STATE_DOZE = 3; // 0x3
    field public static final int STATE_DOZE = 3; // 0x3
+23 −7
Original line number Original line Diff line number Diff line
@@ -108,13 +108,14 @@ public final class DisplayManager {
     * </p>
     * </p>
     *
     *
     * <p>
     * <p>
     * A private virtual display belongs to the application that created it.
     * A private virtual display belongs to the application that created it.  Only the a owner of a
     * Only the a owner of a private virtual display is allowed to place windows upon it.
     * private virtual display and the apps that are already on that display are allowed to place
     * The private virtual display also does not participate in display mirroring: it will
     * windows upon it.  The private virtual display also does not participate in display mirroring:
     * neither receive mirrored content from another display nor allow its own content to
     * it will neither receive mirrored content from another display nor allow its own content to be
     * be mirrored elsewhere.  More precisely, the only processes that are allowed to
     * mirrored elsewhere.  More precisely, the only processes that are allowed to enumerate or
     * enumerate or interact with the private display are those that have the same UID as the
     * interact with the private display are those that have the same UID as the application that
     * application that originally created the private virtual display.
     * originally created the private virtual display or as the activities that are already on that
     * display.
     * </p>
     * </p>
     *
     *
     * @see #createVirtualDisplay
     * @see #createVirtualDisplay
@@ -234,6 +235,21 @@ public final class DisplayManager {
     */
     */
    public static final int VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 1 << 4;
    public static final int VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 1 << 4;


    /**
     * Virtual display flag: Allows content to be displayed on private virtual displays when
     * keyguard is shown but is insecure.
     *
     * <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
     * will not be applied.
     * </p>
     *
     * @see #createVirtualDisplay
     */
    public static final int VIRTUAL_DISPLAY_FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 1 << 5;

    /** @hide */
    /** @hide */
    public DisplayManager(Context context) {
    public DisplayManager(Context context) {
        mContext = context;
        mContext = context;
+14 −1
Original line number Original line Diff line number Diff line
@@ -163,7 +163,7 @@ public final class Display {


    /**
    /**
     * Display flag: Indicates that the display is private.  Only the application that
     * Display flag: Indicates that the display is private.  Only the application that
     * owns the display can create windows on it.
     * owns the display and apps that are already on the display can create windows on it.
     *
     *
     * @see #getFlags
     * @see #getFlags
     */
     */
@@ -193,6 +193,19 @@ public final class Display {
     */
     */
    public static final int FLAG_ROUND = 1 << 4;
    public static final int FLAG_ROUND = 1 << 4;


    /**
     * 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.
     * </p>
     *
     * @see #getFlags
     */
    public static final int FLAG_SHOW_WITH_INSECURE_LOCKSCREEN = 1 << 5;

    /**
    /**
     * Display flag: Indicates that the contents of the display should not be scaled
     * 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
     * to fit the physical screen dimensions.  Used for development only to emulate
Loading