diff options
author | Rick Yiu <rickyiu@google.com> | 2019-12-19 16:54:31 +0800 |
---|---|---|
committer | Rick Yiu <rickyiu@google.com> | 2020-01-03 14:38:25 +0800 |
commit | 85e8c8f52148c90c41c95ed6ef69edbe677d670b (patch) | |
tree | 829dcb73a308270afebd5b58429d74a5a626bfc4 /mmodules | |
parent | d760b7fecefa8e6c391b8fd04ecfe31f91ddf353 (diff) |
Use ThreadPrioritySetter to set thread priority
Use ThreadPrioritySetter registered in Android runtime to set thread
priority.
Bug: 139521784
Test: CtsLibcoreTestCases, device boot to home, thread priority set
as expected.
Change-Id: I71c5052beb171f966eba97401159306b87e397b7
Diffstat (limited to 'mmodules')
-rw-r--r-- | mmodules/core_platform_api/api/platform/current-api.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt index 8abb9be236..cbb729a3d7 100644 --- a/mmodules/core_platform_api/api/platform/current-api.txt +++ b/mmodules/core_platform_api/api/platform/current-api.txt @@ -627,6 +627,8 @@ package dalvik.system { } public final class RuntimeHooks { + method @Nullable public static dalvik.system.ThreadPrioritySetter getThreadPrioritySetter(); + method public static void setThreadPrioritySetter(@NonNull dalvik.system.ThreadPrioritySetter); method public static void setTimeZoneIdSupplier(java.util.function.Supplier<java.lang.String>); method public static void setUncaughtExceptionPreHandler(java.lang.Thread.UncaughtExceptionHandler); } @@ -643,6 +645,10 @@ package dalvik.system { method public final void untag(java.net.DatagramSocket) throws java.net.SocketException; } + @java.lang.FunctionalInterface public interface ThreadPrioritySetter { + method public void setPriority(int); + } + public final class VMDebug { method public static void attachAgent(String, ClassLoader) throws java.io.IOException; method public static boolean cacheRegisterMap(String); |