diff --git a/src/com/android/settings/notification/zen/ZenModeAutomationSettings.java b/src/com/android/settings/notification/zen/ZenModeAutomationSettings.java index 31a4ba78550..4f18e5d7e02 100644 --- a/src/com/android/settings/notification/zen/ZenModeAutomationSettings.java +++ b/src/com/android/settings/notification/zen/ZenModeAutomationSettings.java @@ -50,16 +50,6 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase { private String[] mDeleteDialogRuleIds; private boolean[] mDeleteDialogChecked; - @Override - public void onAttach(Context context) { - super.onAttach(context); - Bundle bundle = getArguments(); - if (bundle != null && bundle.containsKey(DELETE)) { - mBackend.removeZenRule(bundle.getString(DELETE)); - bundle.remove(DELETE); - } - } - @Override protected List createPreferenceControllers(Context context) { ZenServiceListing serviceListing = new ZenServiceListing(getContext(), CONFIG); diff --git a/src/com/android/settings/notification/zen/ZenRuleButtonsPreferenceController.java b/src/com/android/settings/notification/zen/ZenRuleButtonsPreferenceController.java index 3b7cde09cf0..023a770808d 100644 --- a/src/com/android/settings/notification/zen/ZenRuleButtonsPreferenceController.java +++ b/src/com/android/settings/notification/zen/ZenRuleButtonsPreferenceController.java @@ -103,8 +103,7 @@ public class ZenRuleButtonsPreferenceController extends AbstractZenModePreferenc new ZenDeleteRuleDialog.PositiveClickListener() { @Override public void onOk(String id) { - Bundle bundle = new Bundle(); - bundle.putString(ZenModeAutomationSettings.DELETE, id); + mBackend.removeZenRule(id); mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ZEN_DELETE_RULE_OK); new SubSettingLauncher(mContext) @@ -112,7 +111,6 @@ public class ZenRuleButtonsPreferenceController extends AbstractZenModePreferenc .setDestination(ZenModeAutomationSettings.class.getName()) .setSourceMetricsCategory(MetricsProto.MetricsEvent .NOTIFICATION_ZEN_MODE_AUTOMATION) - .setArguments(bundle) .launch(); } });