Merge "Remove unneeded code" into main

This commit is contained in:
Julia Reynolds
2024-01-08 17:36:09 +00:00
committed by Android (Google) Code Review

View File

@@ -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);