Settings: An update on Downtime.
- Migrate settings to the new zen mode state model. - Remove downtime settings. - Add automatic rule management page (add/remove) - Bind new automatic schedule rules to detail editor. - Clean up a few found miscapitalized string captions. - Migrate zen switch to report the shared summary string. Bug: 20064962 Change-Id: Ia561e7f77c90c962729240b4d51ba1915297f64a
This commit is contained in:
@@ -45,11 +45,14 @@ public class ZenModeConditionSelection extends RadioGroup {
|
||||
private final H mHandler = new H();
|
||||
private final Context mContext;
|
||||
private final List<Condition> mConditions;
|
||||
private final int mZenMode;
|
||||
|
||||
private Condition mCondition;
|
||||
|
||||
public ZenModeConditionSelection(Context context) {
|
||||
public ZenModeConditionSelection(Context context, int zenMode) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
mZenMode = zenMode;
|
||||
mConditions = new ArrayList<Condition>();
|
||||
setLayoutTransition(new LayoutTransition());
|
||||
final int p = mContext.getResources().getDimensionPixelSize(R.dimen.content_margin_left);
|
||||
@@ -130,7 +133,7 @@ public class ZenModeConditionSelection extends RadioGroup {
|
||||
public void confirmCondition() {
|
||||
if (DEBUG) Log.d(TAG, "confirmCondition " + mCondition);
|
||||
try {
|
||||
mNoMan.setZenModeCondition(mCondition);
|
||||
mNoMan.setZenMode(mZenMode, mCondition != null ? mCondition.id : null, TAG);
|
||||
} catch (RemoteException e) {
|
||||
// noop
|
||||
}
|
||||
|
Reference in New Issue
Block a user