Fix lock contention between DMS and ATMS

This causes jank often, and we don't need to call into ATMS
synchronously to update the dream state, as we're not doing that
when starting the dream.

Test: Presubmit, check if AOD still works
Bug: 219502599
Change-Id: Ib3048447e6bb36d78aac39a3dffd3bacf33c5e13
This commit is contained in:
Jorim Jaggi
2022-03-03 18:23:42 +01:00
parent 18eb4c80df
commit bac8a178b2

View File

@@ -467,7 +467,9 @@ public final class DreamManagerService extends SystemService {
}
mCurrentDreamDozeScreenState = Display.STATE_UNKNOWN;
mCurrentDreamDozeScreenBrightness = PowerManager.BRIGHTNESS_DEFAULT;
mAtmInternal.notifyDreamStateChanged(false);
mHandler.post(() -> {
mAtmInternal.notifyDreamStateChanged(false);
});
}
private void checkPermission(String permission) {