diff --git a/api/current.txt b/api/current.txt
index d73b9f95f287e..da390637964ab 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -1098,7 +1098,8 @@ package android {
field public static final int showAsAction = 16843481; // 0x10102d9
field public static final int showDefault = 16843258; // 0x10101fa
field public static final int showDividers = 16843561; // 0x1010329
- field public static final int showOnLockScreen = 16843721; // 0x10103c9
+ field public static final int showForAllUsers = 16844018; // 0x10104f2
+ field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9
field public static final int showSilent = 16843259; // 0x10101fb
field public static final int showText = 16843949; // 0x10104ad
field public static final deprecated int showWeekNumber = 16843582; // 0x101033e
diff --git a/api/system-current.txt b/api/system-current.txt
index f98e15f2996c9..a1980f05466ef 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -1175,7 +1175,8 @@ package android {
field public static final int showAsAction = 16843481; // 0x10102d9
field public static final int showDefault = 16843258; // 0x10101fa
field public static final int showDividers = 16843561; // 0x1010329
- field public static final int showOnLockScreen = 16843721; // 0x10103c9
+ field public static final int showForAllUsers = 16844018; // 0x10104f2
+ field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9
field public static final int showSilent = 16843259; // 0x10101fb
field public static final int showText = 16843949; // 0x10104ad
field public static final deprecated int showWeekNumber = 16843582; // 0x101033e
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 8d82aa268020b..16f6b1e633297 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -223,11 +223,12 @@ public class ActivityInfo extends ComponentInfo
*/
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.
+ * Value for {@link #flags}: true when the application can be displayed for all users
+ * regardless of if the user of the application is the current user. Set from the
+ * {@link android.R.attr#showForAllUsers} attribute.
* @hide
*/
- public static final int FLAG_SHOW_ON_LOCK_SCREEN = 0x0400;
+ public static final int FLAG_SHOW_FOR_ALL_USERS = 0x0400;
/**
* Bit in {@link #flags} corresponding to an immersive activity
* that wishes not to be interrupted by notifications.
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 40f4e8f90b967..fed9261c659d8 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -3099,8 +3099,9 @@ public class PackageParser {
a.info.flags |= ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS;
}
- if (sa.getBoolean(R.styleable.AndroidManifestActivity_showOnLockScreen, false)) {
- a.info.flags |= ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN;
+ if (sa.getBoolean(R.styleable.AndroidManifestActivity_showOnLockScreen, false)
+ || sa.getBoolean(R.styleable.AndroidManifestActivity_showForAllUsers, false)) {
+ a.info.flags |= ActivityInfo.FLAG_SHOW_FOR_ALL_USERS;
}
if (sa.getBoolean(R.styleable.AndroidManifestActivity_immersive, false)) {
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 0ac366d1fcfbb..12d7e6009ebf1 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -501,9 +501,16 @@
+ in a multiuser environment, across all users' windows.
+ @deprecated use {@link android.R.attr#showForAllUsers} instead. -->
+
+
+