diff options
| author | 2020-01-17 11:47:05 -0800 | |
|---|---|---|
| committer | 2020-01-17 11:47:05 -0800 | |
| commit | bbfa310ef219eb25a79bba4802991466aec2c4f5 (patch) | |
| tree | 0602436764c6c392ee2dc1c5ab01d596c7b1e1ff | |
| parent | 13839cfe415d9dcb5d850ad6dc1fdbb92b19d345 (diff) | |
| parent | 9091be3eb7a245d8359aa9934584dc64e0a77512 (diff) | |
Moved some thread priority changes.
am: 9091be3eb7
Change-Id: Id983d66927e51633742476776d23ce33978e01d1
| -rw-r--r-- | core/java/com/android/internal/os/Zygote.java | 15 | ||||
| -rw-r--r-- | core/java/com/android/internal/os/ZygoteConnection.java | 3 | ||||
| -rw-r--r-- | core/java/com/android/internal/os/ZygoteInit.java | 3 |
3 files changed, 9 insertions, 12 deletions
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java index 55a70284a5bf..3c49ac5b8583 100644 --- a/core/java/com/android/internal/os/Zygote.java +++ b/core/java/com/android/internal/os/Zygote.java @@ -269,6 +269,9 @@ public final class Zygote { Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "PostFork"); } + // Set the Java Language thread priority to the default value for new apps. + Thread.currentThread().setPriority(Thread.NORM_PRIORITY); + ZygoteHooks.postForkCommon(); return pid; } @@ -311,6 +314,9 @@ public final class Zygote { // Note that this event ends at the end of handleChildProc. Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "PostFork"); + // Set the Java Language thread priority to the default value for new apps. + Thread.currentThread().setPriority(Thread.NORM_PRIORITY); + /* * This is called here (instead of after the fork but before the specialize) to maintain * consistancy with the code paths for forkAndSpecialize. @@ -365,6 +371,9 @@ public final class Zygote { Trace.setTracingEnabled(true, runtimeFlags); } + // Set the Java Language thread priority to the default value for new apps. + Thread.currentThread().setPriority(Thread.NORM_PRIORITY); + ZygoteHooks.postForkCommon(); return pid; } @@ -651,12 +660,6 @@ public final class Zygote { disableExecuteOnly(args.mTargetSdkVersion); - // End of the postFork event. - Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); - - // Set the Java Language thread priority to the default value for new apps. - Thread.currentThread().setPriority(Thread.NORM_PRIORITY); - return ZygoteInit.zygoteInit(args.mTargetSdkVersion, args.mDisabledCompatChanges, args.mRemainingArgs, diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java index 4c5bb2ade0aa..2666d5278a90 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -487,9 +487,6 @@ class ZygoteConnection { Zygote.setAppProcessName(parsedArgs, TAG); - // Set the Java Language thread priority to the default value for new apps. - Thread.currentThread().setPriority(Thread.NORM_PRIORITY); - // End of the postFork event. Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); if (parsedArgs.mInvokeWith != null) { diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 4a33bc2f252a..348262e1a9d3 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -518,9 +518,6 @@ public class ZygoteInit { } } - // Set the Java Language thread priority to the default value for the system server. - Thread.currentThread().setPriority(Thread.NORM_PRIORITY); - if (parsedArgs.mInvokeWith != null) { String[] args = parsedArgs.mRemainingArgs; // If we have a non-null system server class path, we'll have to duplicate the |