summaryrefslogtreecommitdiff
path: root/core/java/android/os/Process.java
diff options
context:
space:
mode:
authorMarco Ballesio <balejs@google.com>2020-03-12 09:32:41 -0700
committerMarco Ballesio <balejs@google.com>2020-03-16 18:29:21 -0700
commit71750b2229e5b0afa3236e16cdf272d3ff01c813 (patch)
tree3fa45791af26ac968fb7c111f920ee3c1ee99199 /core/java/android/os/Process.java
parent700c955ffd60349ebc3709c39bb992b24c905d7c (diff)
freezer: thaw on dumpsys data collection
Introduce a new java API wrapping libprocessgroup to thaw and freeze again the freezer. Use such API in ActivityManager upon collection of sensitive dumpsys fields. Bug: 151225245 Test: manually verified that the freezer is thawed and then frozen again for meminfo, dbinfo and gfxinfo. Verified that data collection does not timeout when this API is called Change-Id: I487f328cb05ceac2fa2f23ad94ca8d4f82b82a5a
Diffstat (limited to 'core/java/android/os/Process.java')
-rw-r--r--core/java/android/os/Process.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index d7af1b9faa97..a37dd7dfc135 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -929,6 +929,19 @@ public class Process {
public static final native void setProcessFrozen(int pid, int uid, boolean frozen);
/**
+ * Enable or disable the freezer. When enable == false all frozen processes are unfrozen,
+ * but aren't removed from the freezer. Processes can still be added or removed
+ * by using setProcessFrozen, but they won't actually be frozen until the freezer is enabled
+ * again. If enable == true the freezer is enabled again, and all processes
+ * in the freezer (including the ones added while the freezer was disabled) are frozen.
+ *
+ * @param enable Specify whether to enable (true) or disable (false) the freezer.
+ *
+ * @hide
+ */
+ public static final native void enableFreezer(boolean enable);
+
+ /**
* Return the scheduling group of requested process.
*
* @hide