diff options
author | Wale Ogunwale <ogunwale@google.com> | 2015-04-15 12:01:38 -0700 |
---|---|---|
committer | Wale Ogunwale <ogunwale@google.com> | 2015-04-16 10:59:16 -0700 |
commit | 6dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292d (patch) | |
tree | d5cc521ef757040ed4503e0fabbfb4e9d5336ef3 /core/java/android/content | |
parent | 3f2631f526d0a0ac0b57ac9f6d241bcc7aeb5f5b (diff) | |
download | frameworks_base-6dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292d.zip frameworks_base-6dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292d.tar.gz frameworks_base-6dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292d.tar.bz2 |
Added attribute showForAllUsers that deprecates showOnLockScreen
The new name is more meaningful to what the attribute actually does.
Also, force the FLAG_SHOWN_WHEN_LOCKED flag for windows that belong
to acitivties with the showForAllUsers attribute set.
Bug: 20227306
Change-Id: Ifd49166c3ec0e67ae43addc0fb30038523332ea5
Diffstat (limited to 'core/java/android/content')
-rw-r--r-- | core/java/android/content/pm/ActivityInfo.java | 7 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index 8d82aa2..16f6b1e 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 40f4e8f..fed9261 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)) { |