From c12e8be1b7bf4fbe466ef8a7300e34fd40ede442 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 2 Jan 2024 13:17:09 -0500 Subject: [PATCH] Remove unneeded code Because the setting is marked as 'clone to profile' Test: none/see other cl in topic Bug: 314320478 Change-Id: I10fe30c4cbb186b9ef5a3a9f583a287b65cebe3e --- .../notification/history/NotificationHistoryActivity.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/notification/history/NotificationHistoryActivity.java b/src/com/android/settings/notification/history/NotificationHistoryActivity.java index 4616934e684..156df96e04e 100644 --- a/src/com/android/settings/notification/history/NotificationHistoryActivity.java +++ b/src/com/android/settings/notification/history/NotificationHistoryActivity.java @@ -365,10 +365,8 @@ public class NotificationHistoryActivity extends CollapsingToolbarBaseActivity { } final int newState = isChecked ? 1 : 0; if (oldState != newState) { - for (int user : mUm.getProfileIds(ActivityManager.getCurrentUser(), false)) { - Settings.Secure.putIntForUser(getContentResolver(), - NOTIFICATION_HISTORY_ENABLED, newState, user); - } + Settings.Secure.putInt( + getContentResolver(), NOTIFICATION_HISTORY_ENABLED, newState); mUiEventLogger.log(isChecked ? NotificationHistoryEvent.NOTIFICATION_HISTORY_ON : NotificationHistoryEvent.NOTIFICATION_HISTORY_OFF); Log.d(TAG, "onSwitchChange history to " + isChecked);