Refresh the whole rule in zen listing screen

Because the whole rule is pushed to NMS when it's
enabled/disabled.

Test: manual
Fixes: 135170330
Change-Id: I4bbc30f82dab07cff9184f9ab8a6f729499c6126
This commit is contained in:
Julia Reynolds
2019-06-13 12:29:15 -04:00
parent 0de0d5be39
commit 78ef02eb8f
2 changed files with 4 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ public class ZenRulePreference extends TwoTargetPreference {
final ZenServiceListing mServiceListing;
final PackageManager mPm;
final MetricsFeatureProvider mMetricsFeatureProvider;
final AutomaticZenRule mRule;
AutomaticZenRule mRule;
CharSequence mName;
private Intent mIntent;
@@ -122,14 +122,14 @@ public class ZenRulePreference extends TwoTargetPreference {
if (!mRule.getName().equals(rule.getName())) {
mName = rule.getName();
setTitle(mName);
mRule.setName(mName.toString());
}
if (mRule.isEnabled() != rule.isEnabled()) {
mRule.setEnabled(rule.isEnabled());
setChecked(mRule.isEnabled());
setSummary(computeRuleSummary(mRule));
}
mRule = rule;
}
@Override