summaryrefslogtreecommitdiff
path: root/core/java/android/os/Process.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/os/Process.java')
-rw-r--r--core/java/android/os/Process.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 57b40e559ccd..4ef882e1aa78 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.TestApi;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.system.Os;
@@ -1068,6 +1069,24 @@ public class Process {
throws IllegalArgumentException;
/**
+ * Return the current scheduling policy of a thread, based on Linux.
+ *
+ * @param tid The identifier of the thread/process to get the scheduling policy.
+ *
+ * @throws IllegalArgumentException Throws IllegalArgumentException if
+ * <var>tid</var> does not exist, or if <var>priority</var> is out of range for the policy.
+ * @throws SecurityException Throws SecurityException if your process does
+ * not have permission to modify the given thread, or to use the given
+ * scheduling policy or priority.
+ *
+ * {@hide}
+ */
+
+ @TestApi
+ public static final native int getThreadScheduler(int tid)
+ throws IllegalArgumentException;
+
+ /**
* Set the scheduling policy and priority of a thread, based on Linux.
*
* @param tid The identifier of the thread/process to change.
@@ -1082,6 +1101,7 @@ public class Process {
*
* {@hide}
*/
+
public static final native void setThreadScheduler(int tid, int policy, int priority)
throws IllegalArgumentException;