Merge "Don't allow dreaming for users that can't dream." into tm-qpr-dev

This commit is contained in:
William Leshner
2022-12-10 23:55:45 +00:00
committed by Android (Google) Code Review

View File

@@ -379,6 +379,10 @@ public final class DreamManagerService extends SystemService {
return false;
}
if (!dreamsEnabledForUser(ActivityManager.getCurrentUser())) {
return false;
}
if ((mWhenToDream & DREAM_ON_CHARGE) == DREAM_ON_CHARGE) {
return mIsCharging;
}