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

Commit fead4830 authored by Antony Sargent's avatar Antony Sargent Committed by Android (Google) Code Review
Browse files

Merge "Add a flag for allowing always unlocked virtual displays"

parents 508c3a8b e5058b0c
Loading
Loading
Loading
Loading
+18 −0
Original line number Original line Diff line number Diff line
@@ -344,6 +344,16 @@ public final class DisplayManager {
     */
     */
    public static final int VIRTUAL_DISPLAY_FLAG_OWN_DISPLAY_GROUP = 1 << 11;
    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 */
    /** @hide */
    @IntDef(prefix = {"MATCH_CONTENT_FRAMERATE_"}, value = {
    @IntDef(prefix = {"MATCH_CONTENT_FRAMERATE_"}, value = {
@@ -1363,5 +1373,13 @@ public final class DisplayManager {
         * @hide
         * @hide
         */
         */
        String KEY_HIGH_REFRESH_RATE_BLACKLIST = "high_refresh_rate_blacklist";
        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";
    }
    }
}
}
+9 −0
Original line number Original line Diff line number Diff line
@@ -298,6 +298,15 @@ public final class Display {
     */
     */
    public static final int FLAG_OWN_DISPLAY_GROUP = 1 << 8;
    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
     * 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
+3 −0
Original line number Original line Diff line number Diff line
@@ -863,6 +863,9 @@ public final class DisplayInfo implements Parcelable {
        if ((flags & Display.FLAG_OWN_DISPLAY_GROUP) != 0) {
        if ((flags & Display.FLAG_OWN_DISPLAY_GROUP) != 0) {
            result.append(", FLAG_OWN_DISPLAY_GROUP");
            result.append(", FLAG_OWN_DISPLAY_GROUP");
        }
        }
        if ((flags & Display.FLAG_ALWAYS_UNLOCKED) != 0) {
            result.append(", FLAG_ALWAYS_UNLOCKED");
        }
        return result.toString();
        return result.toString();
    }
    }
}
}
+4 −0
Original line number Original line Diff line number Diff line
@@ -5882,6 +5882,10 @@
    <permission android:name="android.permission.ADD_TRUSTED_DISPLAY"
    <permission android:name="android.permission.ADD_TRUSTED_DISPLAY"
                android:protectionLevel="signature" />
                android:protectionLevel="signature" />


    <!-- Allows an application to create always-unlocked displays. @hide -->
    <permission android:name="android.permission.ADD_ALWAYS_UNLOCKED_DISPLAY"
                android:protectionLevel="signature"/>

    <!-- @hide @SystemApi Allows an application to access locusId events in the usage stats. -->
    <!-- @hide @SystemApi Allows an application to access locusId events in the usage stats. -->
    <permission android:name="android.permission.ACCESS_LOCUS_ID_USAGE_STATS"
    <permission android:name="android.permission.ACCESS_LOCUS_ID_USAGE_STATS"
                android:protectionLevel="signature|role" />
                android:protectionLevel="signature|role" />
+9 −0
Original line number Original line Diff line number Diff line
@@ -141,6 +141,15 @@ final class DisplayDeviceInfo {
     */
     */
    public static final int FLAG_OWN_DISPLAY_GROUP = 1 << 14;
    public static final int FLAG_OWN_DISPLAY_GROUP = 1 << 14;


    /**
     * Flag: Indicates that the display should always be unlocked. Only valid on virtual displays
     * that aren't in the default display group.
     * @see #FLAG_OWN_DISPLAY_GROUP
     * @hide
     */
    public static final int FLAG_ALWAYS_UNLOCKED = 1 << 15;


    /**
    /**
     * Touch attachment: Display does not receive touch.
     * Touch attachment: Display does not receive touch.
     */
     */
Loading