Merge "Remove a hack to fix a short power button press behavior." into tm-qpr-dev

This commit is contained in:
William Leshner
2022-12-20 22:50:12 +00:00
committed by Android (Google) Code Review

View File

@@ -1049,13 +1049,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return;
}
// Don't dream if the user isn't user zero.
// TODO(b/261907079): Move this check to DreamManagerService#canStartDreamingInternal().
if (ActivityManager.getCurrentUser() != UserHandle.USER_SYSTEM) {
noDreamAction.run();
return;
}
final DreamManagerInternal dreamManagerInternal = getDreamManagerInternal();
if (dreamManagerInternal == null || !dreamManagerInternal.canStartDreaming(isScreenOn)) {
noDreamAction.run();