diff options
| author | Dianne Hackborn <hackbod@google.com> | 2014-04-30 16:43:13 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-30 16:43:13 +0000 |
| commit | c96190e9fe49aa8c9d1d9605e9ec46a705b836bd (patch) | |
| tree | efee748b547b1a94e7a6f937639e5da68df64896 /core/java | |
| parent | 2a148188109f80e0e5bb872c38d10352ee70cbd6 (diff) | |
| parent | 406c51b360cb224e2cb4773eabd04d05d29793f8 (diff) | |
| download | frameworks_base-c96190e9fe49aa8c9d1d9605e9ec46a705b836bd.zip frameworks_base-c96190e9fe49aa8c9d1d9605e9ec46a705b836bd.tar.gz frameworks_base-c96190e9fe49aa8c9d1d9605e9ec46a705b836bd.tar.bz2 | |
am c6890f9f: Merge "Switch IProcessObserver to report process state"
* commit 'c6890f9f517f7b09594ebb6aaf5b338fb905b32f':
Switch IProcessObserver to report process state
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 16 | ||||
| -rw-r--r-- | core/java/android/app/IProcessObserver.aidl | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 018e949..9239faf 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -1627,13 +1627,6 @@ 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. */ @@ -1748,9 +1741,16 @@ public class ActivityManager { */ public int importanceReasonImportance; + /** + * Current process state, as per PROCESS_STATE_* constants. + * @hide + */ + public int processState; + public RunningAppProcessInfo() { importance = IMPORTANCE_FOREGROUND; importanceReasonCode = REASON_UNKNOWN; + processState = PROCESS_STATE_IMPORTANT_FOREGROUND; } public RunningAppProcessInfo(String pProcessName, int pPid, String pArr[]) { @@ -1776,6 +1776,7 @@ public class ActivityManager { dest.writeInt(importanceReasonPid); ComponentName.writeToParcel(importanceReasonComponent, dest); dest.writeInt(importanceReasonImportance); + dest.writeInt(processState); } public void readFromParcel(Parcel source) { @@ -1791,6 +1792,7 @@ public class ActivityManager { importanceReasonPid = source.readInt(); importanceReasonComponent = ComponentName.readFromParcel(source); importanceReasonImportance = source.readInt(); + processState = source.readInt(); } public static final Creator<RunningAppProcessInfo> CREATOR = diff --git a/core/java/android/app/IProcessObserver.aidl b/core/java/android/app/IProcessObserver.aidl index e587912..ecf2c73 100644 --- a/core/java/android/app/IProcessObserver.aidl +++ b/core/java/android/app/IProcessObserver.aidl @@ -20,7 +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 onProcessStateChanged(int pid, int uid, int procState); void onProcessDied(int pid, int uid); } |
