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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user