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

Commit 5962b12b authored by Craig Mautner's avatar Craig Mautner
Browse files

Adds showWhenLocked attribute to Activities.

The new attribute allows an Activity such as the alarm to appear
on all users screens.

Bug: 7213805 fixed.
Change-Id: If7866b13d88c04af07debc69e0e875d0adc6050a
parent 88400d3a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -912,6 +912,7 @@ package android {
    field public static final int showAsAction = 16843481; // 0x10102d9
    field public static final int showAsAction = 16843481; // 0x10102d9
    field public static final int showDefault = 16843258; // 0x10101fa
    field public static final int showDefault = 16843258; // 0x10101fa
    field public static final int showDividers = 16843561; // 0x1010329
    field public static final int showDividers = 16843561; // 0x1010329
    field public static final int showOnLockScreen = 16843721; // 0x10103c9
    field public static final int showSilent = 16843259; // 0x10101fb
    field public static final int showSilent = 16843259; // 0x10101fb
    field public static final int showWeekNumber = 16843582; // 0x101033e
    field public static final int showWeekNumber = 16843582; // 0x101033e
    field public static final int shownWeekCount = 16843585; // 0x1010341
    field public static final int shownWeekCount = 16843585; // 0x1010341
+1 −0
Original line number Original line Diff line number Diff line
@@ -912,6 +912,7 @@ package android {
    field public static final int showAsAction = 16843481; // 0x10102d9
    field public static final int showAsAction = 16843481; // 0x10102d9
    field public static final int showDefault = 16843258; // 0x10101fa
    field public static final int showDefault = 16843258; // 0x10101fa
    field public static final int showDividers = 16843561; // 0x1010329
    field public static final int showDividers = 16843561; // 0x1010329
    field public static final int showOnLockScreen = 16843721; // 0x10103c9
    field public static final int showSilent = 16843259; // 0x10101fb
    field public static final int showSilent = 16843259; // 0x10101fb
    field public static final int showWeekNumber = 16843582; // 0x101033e
    field public static final int showWeekNumber = 16843582; // 0x101033e
    field public static final int shownWeekCount = 16843585; // 0x1010341
    field public static final int shownWeekCount = 16843585; // 0x1010341
+7 −1
Original line number Original line Diff line number Diff line
@@ -154,6 +154,12 @@ public class ActivityInfo extends ComponentInfo
     * be hardware accelerated.
     * be hardware accelerated.
     */
     */
    public static final int FLAG_HARDWARE_ACCELERATED = 0x0200;
    public static final int FLAG_HARDWARE_ACCELERATED = 0x0200;
    /**
     * Value for {@link #flags}: true when the application can be displayed over the lockscreen
     * and consequently over all users' windows.
     * @hide
     */
    public static final int FLAG_SHOW_ON_LOCK_SCREEN = 0x0400;
    /**
    /**
     * @hide
     * @hide
     * Bit in {@link #flags} corresponding to an immersive activity
     * Bit in {@link #flags} corresponding to an immersive activity
@@ -170,7 +176,7 @@ public class ActivityInfo extends ComponentInfo
     * "toast" window).
     * "toast" window).
     * {@see android.app.Notification#FLAG_HIGH_PRIORITY}
     * {@see android.app.Notification#FLAG_HIGH_PRIORITY}
     */
     */
    public static final int FLAG_IMMERSIVE = 0x0400;
    public static final int FLAG_IMMERSIVE = 0x0800;
    /**
    /**
     * @hide Bit in {@link #flags}: If set, this component will only be seen
     * @hide Bit in {@link #flags}: If set, this component will only be seen
     * by the primary user.  Only works with broadcast receivers.  Set from the
     * by the primary user.  Only works with broadcast receivers.  Set from the
+7 −1
Original line number Original line Diff line number Diff line
@@ -2159,6 +2159,12 @@ public class PackageParser {
            a.info.flags |= ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS;
            a.info.flags |= ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS;
        }
        }


        if (sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestActivity_showOnLockScreen,
                false)) {
            a.info.flags |= ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN;
        }

        if (sa.getBoolean(
        if (sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestActivity_immersive,
                com.android.internal.R.styleable.AndroidManifestActivity_immersive,
                false)) {
                false)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ interface IWindowManager
    void addWindowToken(IBinder token, int type);
    void addWindowToken(IBinder token, int type);
    void removeWindowToken(IBinder token);
    void removeWindowToken(IBinder token);
    void addAppToken(int addPos, IApplicationToken token,
    void addAppToken(int addPos, IApplicationToken token,
            int groupId, int requestedOrientation, boolean fullscreen);
            int groupId, int requestedOrientation, boolean fullscreen, boolean showWhenLocked);
    void setAppGroupId(IBinder token, int groupId);
    void setAppGroupId(IBinder token, int groupId);
    void setAppOrientation(IApplicationToken token, int requestedOrientation);
    void setAppOrientation(IApplicationToken token, int requestedOrientation);
    int getAppOrientation(IApplicationToken token);
    int getAppOrientation(IApplicationToken token);
Loading