summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2012-10-07 11:53:43 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-07 11:53:43 -0700
commit337aa27a6307e0f40705ee676551dda4bf6cb894 (patch)
tree9d4721514cc14c709cae12073eb1ea1300365682 /core
parentfee7ddedc99e377002aa6a88c3e287cb6e6c405d (diff)
parent8ee7ac22e6aec5df5405a3e2130d593c50bc39b2 (diff)
downloadframeworks_base-337aa27a6307e0f40705ee676551dda4bf6cb894.zip
frameworks_base-337aa27a6307e0f40705ee676551dda4bf6cb894.tar.gz
frameworks_base-337aa27a6307e0f40705ee676551dda4bf6cb894.tar.bz2
am 8ee7ac22: am 33877e15: Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev
* commit '8ee7ac22e6aec5df5405a3e2130d593c50bc39b2': Adds showWhenLocked attribute to Activities.
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/pm/ActivityInfo.java8
-rw-r--r--core/java/android/content/pm/PackageParser.java8
-rw-r--r--core/java/android/view/IWindowManager.aidl2
-rw-r--r--core/java/android/view/WindowManager.java3
-rw-r--r--core/res/res/values/attrs_manifest.xml5
-rw-r--r--core/res/res/values/public.xml12
6 files changed, 30 insertions, 8 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index b884b98..e2ca1dd 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -155,6 +155,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.
+ * @hide
+ */
+ public static final int FLAG_SHOW_ON_LOCK_SCREEN = 0x0400;
+ /**
* @hide
* Bit in {@link #flags} corresponding to an immersive activity
* that wishes not to be interrupted by notifications.
@@ -170,7 +176,7 @@ public class ActivityInfo extends ComponentInfo
* "toast" window).
* {@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
* by the primary user. Only works with broadcast receivers. Set from the
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index c2b75f4..3e8c2a8 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -2160,11 +2160,17 @@ public class PackageParser {
}
if (sa.getBoolean(
+ com.android.internal.R.styleable.AndroidManifestActivity_showOnLockScreen,
+ false)) {
+ a.info.flags |= ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN;
+ }
+
+ if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestActivity_immersive,
false)) {
a.info.flags |= ActivityInfo.FLAG_IMMERSIVE;
}
-
+
if (!receiver) {
if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestActivity_hardwareAccelerated,
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index e3250f9..5f598b1 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -75,7 +75,7 @@ interface IWindowManager
void addWindowToken(IBinder token, int type);
void removeWindowToken(IBinder 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 setAppOrientation(IApplicationToken token, int requestedOrientation);
int getAppOrientation(IApplicationToken token);
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index eb3f72e..4c97414 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -219,12 +219,14 @@ public interface WindowManager extends ViewManager {
* Window type: an application window that serves as the "base" window
* of the overall application; all other application windows will
* appear on top of it.
+ * In multiuser systems shows only on the owning user's window.
*/
public static final int TYPE_BASE_APPLICATION = 1;
/**
* Window type: a normal application window. The {@link #token} must be
* an Activity token identifying who the window belongs to.
+ * In multiuser systems shows only on the owning user's window.
*/
public static final int TYPE_APPLICATION = 2;
@@ -233,6 +235,7 @@ public interface WindowManager extends ViewManager {
* application is starting. Not for use by applications themselves;
* this is used by the system to display something until the
* application can show its own windows.
+ * In multiuser systems shows on all users' windows.
*/
public static final int TYPE_APPLICATION_STARTING = 3;
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 58b6572..d899e9d 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -444,6 +444,10 @@
recently launched activities. -->
<attr name="excludeFromRecents" format="boolean" />
+ <!-- Specify that an Activity should be shown over the lock screen and,
+ in a multiuser environment, across all users' windows -->
+ <attr name="showOnLockScreen" format="boolean" />
+
<!-- Specify the authorities under which this content provider can be
found. Multiple authorities may be supplied by separating them
with a semicolon. Authority names should use a Java-style naming
@@ -1376,6 +1380,7 @@
<attr name="alwaysRetainTaskState" />
<attr name="stateNotNeeded" />
<attr name="excludeFromRecents" />
+ <attr name="showOnLockScreen" />
<!-- Specify whether the activity is enabled or not (that is, can be instantiated by the system).
It can also be specified for an application as a whole, in which case a value of "false"
will override any component specific values (a value of "true" will not override the
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index ffc09de..d7a480b 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2018,10 +2018,12 @@
<public type="attr" name="permissionGroupFlags" id="0x010103c5" />
<public type="attr" name="labelFor" id="0x010103c6" />
<public type="attr" name="permissionFlags" id="0x010103c7" />
- <public type="attr" name="checkedTextViewStyle" />
- <public type="style" name="Widget.Holo.CheckedTextView" />
- <public type="style" name="Widget.Holo.Light.CheckedTextView" />
- <public type="style" name="Widget.DeviceDefault.CheckedTextView" />
- <public type="style" name="Widget.DeviceDefault.Light.CheckedTextView" />
+ <public type="attr" name="checkedTextViewStyle" id="0x010103c8" />
+ <public type="attr" name="showOnLockScreen" id="0x010103c9" />
+
+ <public type="style" name="Widget.Holo.CheckedTextView" id="0x010301d9" />
+ <public type="style" name="Widget.Holo.Light.CheckedTextView" id="0x010301da" />
+ <public type="style" name="Widget.DeviceDefault.CheckedTextView" id="0x010301db" />
+ <public type="style" name="Widget.DeviceDefault.Light.CheckedTextView" id="0x010301dc" />
</resources>