Avoid deadlock during boot up
Cp from aosp/1382500 to fix merge conflict Avoid a deadlock that may occurs during boosting time. if we are starting system ui while another thread is executing the enableScreenAfterBoot function at the same time, the deadlock occurs BUG=162566198 Change-Id: Ief47cad91cbbc498179cd38e653bd1fa565cee2e
This commit is contained in:
@@ -5347,15 +5347,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
return mAmInternal.isBackgroundActivityStartsEnabled();
|
||||
}
|
||||
|
||||
void enableScreenAfterBoot(boolean booted) {
|
||||
writeBootProgressEnableScreen(SystemClock.uptimeMillis());
|
||||
mWindowManager.enableScreenAfterBoot();
|
||||
|
||||
synchronized (mGlobalLock) {
|
||||
updateEventDispatchingLocked(booted);
|
||||
}
|
||||
}
|
||||
|
||||
static long getInputDispatchingTimeoutMillisLocked(ActivityRecord r) {
|
||||
if (r == null || !r.hasProcess()) {
|
||||
return DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
|
||||
@@ -6449,9 +6440,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
|
||||
@Override
|
||||
public void enableScreenAfterBoot(boolean booted) {
|
||||
writeBootProgressEnableScreen(SystemClock.uptimeMillis());
|
||||
mWindowManager.enableScreenAfterBoot();
|
||||
synchronized (mGlobalLock) {
|
||||
writeBootProgressEnableScreen(SystemClock.uptimeMillis());
|
||||
mWindowManager.enableScreenAfterBoot();
|
||||
updateEventDispatchingLocked(booted);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user