summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2015-01-28 15:04:16 -0800
committerRuben Brunk <rubenbrunk@google.com>2015-01-30 16:58:14 -0800
commita27eef432a4aa94c0eb8a5f73a6435afaac160fe (patch)
treec92e2d8a7ef0052d22abd241f1d322f1956db3cc /core/java/android
parentb6f10982acbf1bc438ca3c24f691573f7a0bc617 (diff)
Add ProcessInfoService to activity manager.
- Adds a new AIDL interface for querying process information from activity manager. Bug: 19186859 Change-Id: Ic08858f346d6b66e7bfc9da6faa2c6e38d9b2e82
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/ActivityManager.java3
-rw-r--r--core/java/android/os/IProcessInfoService.aidl29
2 files changed, 32 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 7a636dbdb59d..c6ffef64f7e8 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -256,6 +256,9 @@ public class ActivityManager {
/** @hide User operation call: given user id is the current user, can't be stopped. */
public static final int USER_OP_IS_CURRENT = -2;
+ /** @hide Process does not exist. */
+ public static final int PROCESS_STATE_NONEXISTENT = -1;
+
/** @hide Process is a persistent system process. */
public static final int PROCESS_STATE_PERSISTENT = 0;
diff --git a/core/java/android/os/IProcessInfoService.aidl b/core/java/android/os/IProcessInfoService.aidl
new file mode 100644
index 000000000000..c98daa282ec4
--- /dev/null
+++ b/core/java/android/os/IProcessInfoService.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+/** {@hide} */
+interface IProcessInfoService
+{
+ /**
+ * For each PID in the given input array, write the current process state
+ * for that process into the output array, or ActivityManager.PROCESS_STATE_NONEXISTENT
+ * to indicate that no process with the given PID exists.
+ */
+ void getProcessStatesFromPids(in int[] pids, out int[] states);
+}
+