DND ixD changes

- Subtext in Settings > Sound updated
- new icons for automatic dnd rules
- no toast when toggling on/off dnd rules
- dnd dialog has a warning if dnd will cause user to miss next alarm

Test: make ROBOTEST_FILTER=ZenModePreferenceControllerTest RunSettingsRoboTests -j40
Fixes: 72494029
Fixes: 72655216
Fixes: 72655609
Change-Id: I9d86d82529079f35e362f93e10914f0a60229cd8
This commit is contained in:
Beverly
2018-02-01 18:14:33 -05:00
committed by Beverly Tai
parent 1297029728
commit 036d7e0bd9
20 changed files with 306 additions and 670 deletions

View File

@@ -119,13 +119,21 @@ public class ZenRuleSelectionDialog extends InstrumentedDialogFragment {
final LinearLayout v = (LinearLayout) LayoutInflater.from(mContext).inflate(
R.layout.zen_rule_type, null, false);
LoadIconTask task = new LoadIconTask((ImageView) v.findViewById(R.id.icon));
task.execute(info);
ImageView iconView = v.findViewById(R.id.icon);
((TextView) v.findViewById(R.id.title)).setText(ri.title);
if (!ri.isSystem) {
LoadIconTask task = new LoadIconTask(iconView);
task.execute(info);
TextView subtitle = (TextView) v.findViewById(R.id.subtitle);
subtitle.setText(info.loadLabel(mPm));
subtitle.setVisibility(View.VISIBLE);
} else {
if (ZenModeConfig.isValidScheduleConditionId(ri.defaultConditionId)) {
iconView.setImageDrawable(mContext.getDrawable(R.drawable.ic_timelapse));
} else if (ZenModeConfig.isValidEventConditionId(ri.defaultConditionId)) {
iconView.setImageDrawable(mContext.getDrawable(R.drawable.ic_event));
}
}
v.setOnClickListener(new View.OnClickListener() {
@Override