Fix DreamBackend to reflect purely the WhenToDream setting.

The getWhenToDreamSetting method should return purely the WhenToDream
setting, and not the enabled setting. The enabled setting is now being
displayed separately as a toggle in settings.

Bug: 222360260
Test: locally on device
Change-Id: I93b11a6ee70ea4fa07ce9413a358a9c51bf108be
This commit is contained in:
Lucas Silva
2022-03-04 14:09:51 -05:00
parent 2348e76c09
commit 234544e8b4

View File

@@ -248,9 +248,6 @@ public class DreamBackend {
}
public @WhenToDream int getWhenToDreamSetting() {
if (!isEnabled()) {
return NEVER;
}
return isActivatedOnDock() && isActivatedOnSleep() ? EITHER
: isActivatedOnDock() ? WHILE_DOCKED
: isActivatedOnSleep() ? WHILE_CHARGING