From 1acf3dcbfa841ec0789e222db99f1c93ad92cfa8 Mon Sep 17 00:00:00 2001 From: Beverly Date: Thu, 7 Mar 2019 13:35:27 -0500 Subject: [PATCH] Only show zen rule gear if intent is valid Test: manual Fixes: 122638690 Change-Id: Ib9b37b2844ef7a439e38e5e71827903709fca46f --- src/com/android/settings/notification/ZenRulePreference.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/settings/notification/ZenRulePreference.java b/src/com/android/settings/notification/ZenRulePreference.java index 613eb1d0b53..8bc602a9c9a 100644 --- a/src/com/android/settings/notification/ZenRulePreference.java +++ b/src/com/android/settings/notification/ZenRulePreference.java @@ -171,6 +171,9 @@ public class ZenRulePreference extends TwoTargetPreference { getSettingsActivity(rule, si); mIntent = AbstractZenModeAutomaticRulePreferenceController.getRuleIntent(action, settingsActivity, mId); + if (mIntent.resolveActivity(mPm) == null) { + mIntent = null; + } setKey(mId); }