Add Night display settings conditional

Bug: 30043281
Change-Id: I2464cd90f1f7f379aabf123f602e6150a87120cf
This commit is contained in:
Justin Klaassen
2016-07-18 21:39:03 -07:00
parent 69ce586155
commit d60f09edaf
5 changed files with 124 additions and 1 deletions

View File

@@ -142,6 +142,7 @@ public class ConditionManager {
addIfMissing(CellularDataCondition.class, conditions);
addIfMissing(BackgroundDataCondition.class, conditions);
addIfMissing(WorkModeCondition.class, conditions);
addIfMissing(NightDisplayCondition.class, conditions);
Collections.sort(conditions, CONDITION_COMPARATOR);
}
@@ -167,6 +168,8 @@ public class ConditionManager {
return new BackgroundDataCondition(this);
} else if (WorkModeCondition.class == clz) {
return new WorkModeCondition(this);
} else if (NightDisplayCondition.class == clz) {
return new NightDisplayCondition(this);
}
throw new RuntimeException("Unexpected Condition " + clz);
}