diff options
| author | Dianne Hackborn <hackbod@google.com> | 2012-05-31 15:29:36 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2012-05-31 18:58:34 -0700 |
| commit | a93c2c117d502ee57dd27705a0b5efca4bf65011 (patch) | |
| tree | f8e89f166602f58d83c17399746c2c9c40cf6939 /core | |
| parent | f0e96de863a06bbee2aaf2aeb0f586e2a434aa62 (diff) | |
| download | frameworks_base-a93c2c117d502ee57dd27705a0b5efca4bf65011.zip frameworks_base-a93c2c117d502ee57dd27705a0b5efca4bf65011.tar.gz frameworks_base-a93c2c117d502ee57dd27705a0b5efca4bf65011.tar.bz2 | |
Extend process observer to be usable for media routing.
It now has a new callback to report changes in the "importance"
of processes. Rewrote the dispatching code to be a bit more
efficient now that we are sending more reports.
Change-Id: Ie865cfd286455819f04e8c14e9b6fd54d028f8f2
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 7 | ||||
| -rw-r--r-- | core/java/android/app/IProcessObserver.aidl | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 17b1962..92b6f72 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -1360,6 +1360,13 @@ public class ActivityManager { public int lastTrimLevel; /** + * Constant for {@link #importance}: this is a persistent process. + * Only used when reporting to process observers. + * @hide + */ + public static final int IMPORTANCE_PERSISTENT = 50; + + /** * Constant for {@link #importance}: this process is running the * foreground UI. */ diff --git a/core/java/android/app/IProcessObserver.aidl b/core/java/android/app/IProcessObserver.aidl index 2094294..e587912 100644 --- a/core/java/android/app/IProcessObserver.aidl +++ b/core/java/android/app/IProcessObserver.aidl @@ -20,6 +20,7 @@ package android.app; oneway interface IProcessObserver { void onForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities); + void onImportanceChanged(int pid, int uid, int importance); void onProcessDied(int pid, int uid); } |
