summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2018-10-18 11:06:33 -0700
committerWale Ogunwale <ogunwale@google.com>2018-10-19 08:39:45 -0700
commit5c91870fc691a66d2d7fd0b64a76b1c35d1fe3b0 (patch)
tree807dc63b5d7f699f8012c4c7681e804f9acfaedb /core/java/android
parent2ea36d453d0d469eee7ddbc35bf8385353cce2b0 (diff)
Stopped starting and killing processes directly from ATMS (27/n)
Post messages to have processes started and killed instead which should be okay. Bug: 80414790 Test: Existing tests pass Change-Id: Ia435aa815c36a84947ae0f76291b1d1f9222231d
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/ActivityManagerInternal.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index fddbef92cea2..50e618a577a2 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -262,4 +262,18 @@ public abstract class ActivityManagerInternal {
* flags.
*/
public abstract void broadcastCloseSystemDialogs(String reason);
+
+ /**
+ * Kills all background processes, except those matching any of the specified properties.
+ *
+ * @param minTargetSdk the target SDK version at or above which to preserve processes,
+ * or {@code -1} to ignore the target SDK
+ * @param maxProcState the process state at or below which to preserve processes,
+ * or {@code -1} to ignore the process state
+ */
+ public abstract void killAllBackgroundProcessesExcept(int minTargetSdk, int maxProcState);
+
+ /** Starts a given process. */
+ public abstract void startProcess(String processName, ApplicationInfo info,
+ boolean knownToBeDead, String hostingType, ComponentName hostingName);
}