Merge "Catch rule creation exceptions." into nyc-dev am: f1c2e62f4e
am: 84082aac24
am: c34538754a
* commit 'c34538754a9d18506f7c2d71e2db7c6a26fa2473':
Catch rule creation exceptions.
Change-Id: If2fecb8e96d4c468050fd560135b1d1034717102
This commit is contained in:
@@ -96,11 +96,15 @@ abstract public class ZenModeSettingsBase extends RestrictedSettingsFragment {
|
||||
}
|
||||
|
||||
protected String addZenRule(AutomaticZenRule rule) {
|
||||
try {
|
||||
String id = NotificationManager.from(mContext).addAutomaticZenRule(rule);
|
||||
final AutomaticZenRule savedRule =
|
||||
NotificationManager.from(mContext).getAutomaticZenRule(id);
|
||||
maybeRefreshRules(savedRule != null, true);
|
||||
return id;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean setZenRule(String id, AutomaticZenRule rule) {
|
||||
|
Reference in New Issue
Block a user