summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2009-09-02 11:03:18 -0700
committerSuchi Amalapurapu <asuchitra@google.com>2009-09-02 12:32:32 -0700
commit0214e9475fa3b9aa00a784b5152bf4f1939c941e (patch)
tree20b77f6204cfb82d8cde013472053ca191dadd20 /core
parentbb54f93ff66f382dc706b9fff508d386e046fdc2 (diff)
downloadframeworks_base-0214e9475fa3b9aa00a784b5152bf4f1939c941e.zip
frameworks_base-0214e9475fa3b9aa00a784b5152bf4f1939c941e.tar.gz
frameworks_base-0214e9475fa3b9aa00a784b5152bf4f1939c941e.tar.bz2
For intent ACTION_PACKAGE_CHANGED, there could be a lot of broadcasts related to enabling/disabling
components by apps which could result in thrashing on the PackageManager. For apps that do not want to be restarted when such a broadcast is sent, we can just aggregate these broadcasts and handle them at one go. Changes include: New structure to hold pending broadcasts by class name. If a component is enabled or disabled frequently aggregate component enabled/disabled settings in this structure in a 10 second window and then send out the accumulated list of broadcasts to the ActivityManager. A new Handler implementation handles this message Add new attribute name EXTRA_CHANGED_COMPONENT_NAME in broadcast intent Intent.ACTION_PACKAGE_CHANGED for additional information for apps like Launcher. Rename a couple of parameters, the names were too jarring.
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/Intent.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 59529be..2a17672 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -1267,6 +1267,8 @@ public class Intent implements Parcelable {
* enabled or disabled. The data contains the name of the package.
* <ul>
* <li> {@link #EXTRA_UID} containing the integer uid assigned to the package.
+ * <li> {@link #EXTRA_CHANGED_COMPONENT_NAME} containing the class name of the changed component.
+ * <li> {@link #EXTRA_DONT_KILL_APP} containing boolean field to override the default action of restarting the application.
* </ul>
*
* <p class="note">This is a protected intent that can only be sent
@@ -2034,6 +2036,14 @@ public class Intent implements Parcelable {
public static final String EXTRA_REMOTE_INTENT_TOKEN =
"android.intent.extra.remote_intent_token";
+ /**
+ * Used as an int extra field in {@link android.content.Intent#ACTION_PACKAGE_CHANGED}
+ * intent to supply the name of the component that changed.
+ * @hide
+ */
+ public static final String EXTRA_CHANGED_COMPONENT_NAME =
+ "android.intent.extra.changed_component_name";
+
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Intent flags (see mFlags variable).