Merge "[Settings]Crashed when 3rd-party app call ZenModeScheduleRuleSettings directly"

This commit is contained in:
TreeHugger Robot
2017-10-09 22:54:07 +00:00
committed by Android (Google) Code Review
2 changed files with 121 additions and 0 deletions

View File

@@ -85,6 +85,12 @@ public abstract class ZenModeRuleSettingsBase extends ZenModeSettingsBase
}
mId = intent.getStringExtra(ConditionProviderService.EXTRA_RULE_ID);
if (mId == null) {
Log.w(TAG, "rule id is null");
toastAndFinish();
return;
}
if (DEBUG) Log.d(TAG, "mId=" + mId);
if (refreshRuleOrFinish()) {
return;