Work mode conditional switch in main settings
Bug: 26533692 Change-Id: Ifa235bc54c2c6e904cb1cf4fab06d727cde2492a
This commit is contained in:
@@ -132,6 +132,7 @@ public class ConditionManager {
|
||||
addIfMissing(BatterySaverCondition.class);
|
||||
addIfMissing(CellularDataCondition.class);
|
||||
addIfMissing(BackgroundDataCondition.class);
|
||||
addIfMissing(WorkModeCondition.class);
|
||||
}
|
||||
|
||||
private void addIfMissing(Class<? extends Condition> clz) {
|
||||
@@ -154,6 +155,8 @@ public class ConditionManager {
|
||||
return new CellularDataCondition(this);
|
||||
} else if (BackgroundDataCondition.class == clz) {
|
||||
return new BackgroundDataCondition(this);
|
||||
} else if (WorkModeCondition.class == clz) {
|
||||
return new WorkModeCondition(this);
|
||||
}
|
||||
throw new RuntimeException("Unexpected Condition " + clz);
|
||||
}
|
||||
|
Reference in New Issue
Block a user