Add null check for mIntent in ZenRulePreference to avoid potential crash risk
Bug: 244120502 Test: manual test, ZenRuleScheduleHelperTest for unit test. Change-Id: Ib7338253783bb09b84b629f2dd891292d82f28b2
This commit is contained in:
@@ -91,7 +91,9 @@ public class ZenRulePreference extends PrimarySwitchPreference {
|
||||
|
||||
@Override
|
||||
public void onClick() {
|
||||
mContext.startActivity(mIntent);
|
||||
if (mIntent != null) {
|
||||
mContext.startActivity(mIntent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user