summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-12-07 17:59:37 -0800
committerDianne Hackborn <hackbod@google.com>2009-12-07 19:11:14 -0800
commit887f355f99ff83d568ef2885a4fdcaae475583df (patch)
treec4788aa9ac8f37c6a02fc6b3a6874b71efb0f759 /core/java
parent259e3384face72ea8e30696d7bae492d37d44e8b (diff)
downloadframeworks_base-887f355f99ff83d568ef2885a4fdcaae475583df.zip
frameworks_base-887f355f99ff83d568ef2885a4fdcaae475583df.tar.gz
frameworks_base-887f355f99ff83d568ef2885a4fdcaae475583df.tar.bz2
Propagate background scheduling class across processes.
This is a very simply implementation: upon receiving an IPC, if the handling thread is at a background priority (the driver will have taken care of propagating this from the calling thread), then stick it in to the background scheduling group. Plus an API to turn this off for the process, which is used by the system process. This also pulls some of the code for managing scheduling classes out of the Process JNI wrappers and in to some convenience methods in thread.h.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/com/android/internal/os/BinderInternal.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/com/android/internal/os/BinderInternal.java b/core/java/com/android/internal/os/BinderInternal.java
index eacf0ce..ba0bf0d 100644
--- a/core/java/com/android/internal/os/BinderInternal.java
+++ b/core/java/com/android/internal/os/BinderInternal.java
@@ -76,6 +76,13 @@ public class BinderInternal {
*/
public static final native IBinder getContextObject();
+ /**
+ * Special for system process to not allow incoming calls to run at
+ * background scheduling priority.
+ * @hide
+ */
+ public static final native void disableBackgroundScheduling(boolean disable);
+
static native final void handleGc();
public static void forceGc(String reason) {