Add ability to guard a thread against setting its own prio to bg
The guard is compiled out by default because it adds overhead to android.os.Process.setPriority(). Change-Id: Ibb2a648c6349b381abb7ae62a358888b04fba871
This commit is contained in:
@@ -572,6 +572,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
mHaveInputMethods);
|
||||
android.os.Process.setThreadPriority(
|
||||
android.os.Process.THREAD_PRIORITY_DISPLAY);
|
||||
android.os.Process.setCanSelfBackground(false);
|
||||
|
||||
synchronized (this) {
|
||||
mService = s;
|
||||
@@ -607,6 +608,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
// Log.VERBOSE, "WindowManagerPolicy", Log.LOG_ID_SYSTEM));
|
||||
android.os.Process.setThreadPriority(
|
||||
android.os.Process.THREAD_PRIORITY_FOREGROUND);
|
||||
android.os.Process.setCanSelfBackground(false);
|
||||
mPolicy.init(mContext, mService, mPM);
|
||||
|
||||
synchronized (this) {
|
||||
|
||||
Reference in New Issue
Block a user