Moved some thread priority changes.
The previous place I had moved these changes resulted in runtime threads being created at the wrong priority. This patch moves the calls to the correct location. Test: atest CtsJvmtiRunTest924HostTestCases Bug: 146614089 Change-Id: Iad2e17cd137eab81c595cb6816608a36b009da8b Merged-In: Iad2e17cd137eab81c595cb6816608a36b009da8b
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user