summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/pm
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-09-23 22:20:11 -0700
committerDianne Hackborn <hackbod@google.com>2009-09-23 23:17:07 -0700
commitffa424800d0338b8b894aef2ea1e3e3344cbda7a (patch)
tree93a2e14b145042fe8fdd9fccef26303c55341272 /core/java/android/content/pm
parentf11cc96ee837f8b0d530f3a5dd78ffc358727411 (diff)
downloadframeworks_base-ffa424800d0338b8b894aef2ea1e3e3344cbda7a.zip
frameworks_base-ffa424800d0338b8b894aef2ea1e3e3344cbda7a.tar.gz
frameworks_base-ffa424800d0338b8b894aef2ea1e3e3344cbda7a.tar.bz2
Fix issue #2133206: dialogs/menus should auto-dismiss when screen turns off
Lot of infrastructure for more things to go away when "clear system dialogs" happens, and now do this when we turn on the lock screen. Change-Id: I567130296fe47ce82df065ed58ef21b37416ceaf
Diffstat (limited to 'core/java/android/content/pm')
-rw-r--r--core/java/android/content/pm/ActivityInfo.java10
-rw-r--r--core/java/android/content/pm/PackageParser.java6
2 files changed, 15 insertions, 1 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 1ad13c5..87da55f 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -127,12 +127,20 @@ public class ActivityInfo extends ComponentInfo
*/
public static final int FLAG_NO_HISTORY = 0x0080;
/**
+ * Bit in {@link #flags} indicating that, when a request to close system
+ * windows happens, this activity is finished.
+ * Set from the
+ * {@link android.R.attr#finishOnCloseSystemDialogs} attribute.
+ */
+ public static final int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS = 0x0100;
+ /**
* Options that have been set in the activity declaration in the
* manifest: {@link #FLAG_MULTIPROCESS},
* {@link #FLAG_FINISH_ON_TASK_LAUNCH}, {@link #FLAG_CLEAR_TASK_ON_LAUNCH},
* {@link #FLAG_ALWAYS_RETAIN_TASK_STATE},
* {@link #FLAG_STATE_NOT_NEEDED}, {@link #FLAG_EXCLUDE_FROM_RECENTS},
- * {@link #FLAG_ALLOW_TASK_REPARENTING}, {@link #FLAG_NO_HISTORY}.
+ * {@link #FLAG_ALLOW_TASK_REPARENTING}, {@link #FLAG_NO_HISTORY},
+ * {@link #FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS}.
*/
public int flags;
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index b4a6fee..27c65f0 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1658,6 +1658,12 @@ public class PackageParser {
a.info.flags |= ActivityInfo.FLAG_ALLOW_TASK_REPARENTING;
}
+ if (sa.getBoolean(
+ com.android.internal.R.styleable.AndroidManifestActivity_finishOnCloseSystemDialogs,
+ false)) {
+ a.info.flags |= ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS;
+ }
+
if (!receiver) {
a.info.launchMode = sa.getInt(
com.android.internal.R.styleable.AndroidManifestActivity_launchMode,