From 21327c6e41aa06f4b1fa80a9d9d832120472ee3f Mon Sep 17 00:00:00 2001 From: Yuri Lin Date: Wed, 19 Feb 2025 15:30:51 -0500 Subject: [PATCH] Call super.updateState() to set checked status of work profile switch The switch preference was not correctly reflecting the state of the cooldown setting because the checked state of the switch is set in the parent class's updateState() method. Fixes: 397554453 Flag: EXEMPT bugfix Test: manual Change-Id: I2ce6fe71ac6ed0249c0ad39e99ff5929659d6b5a --- .../notification/PoliteNotifWorkProfileToggleController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/android/settings/notification/PoliteNotifWorkProfileToggleController.java b/src/com/android/settings/notification/PoliteNotifWorkProfileToggleController.java index 1bfb0eee0a1..6cc37825e91 100644 --- a/src/com/android/settings/notification/PoliteNotifWorkProfileToggleController.java +++ b/src/com/android/settings/notification/PoliteNotifWorkProfileToggleController.java @@ -131,6 +131,7 @@ public class PoliteNotifWorkProfileToggleController extends TogglePreferenceCont public void updateState(@Nullable Preference preference) { if (preference == null) return; preference.setVisible(isAvailable()); + super.updateState(preference); } private boolean isCoolDownEnabledForPrimary() {