Add dnd conditional

Change-Id: I81eabf274bde05358c60bb63e1ed6d1bd447ce55
This commit is contained in:
Jason Monk
2015-12-13 16:19:05 -05:00
parent db4ed191de
commit ffb4535d3a
5 changed files with 173 additions and 0 deletions

View File

@@ -130,6 +130,7 @@ public class ConditionManager {
private void addMissingConditions() {
addIfMissing(AirplaneModeCondition.class);
addIfMissing(HotspotCondition.class);
addIfMissing(DndCondition.class);
}
private void addIfMissing(Class<? extends Condition> clz) {
@@ -144,6 +145,8 @@ public class ConditionManager {
return new AirplaneModeCondition(this);
} else if (HotspotCondition.class == clz) {
return new HotspotCondition(this);
} else if (DndCondition.class == clz) {
return new DndCondition(this);
}
try {
Constructor<?> constructor = clz.getConstructor(ConditionManager.class);