Merge "Don't allow dreaming for users that can't dream." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
0a33f42345
@@ -379,6 +379,10 @@ public final class DreamManagerService extends SystemService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!dreamsEnabledForUser(ActivityManager.getCurrentUser())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ((mWhenToDream & DREAM_ON_CHARGE) == DREAM_ON_CHARGE) {
|
if ((mWhenToDream & DREAM_ON_CHARGE) == DREAM_ON_CHARGE) {
|
||||||
return mIsCharging;
|
return mIsCharging;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user