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
This commit is contained in:
Yuri Lin
2025-02-19 15:30:51 -05:00
parent 22e56834fd
commit 21327c6e41

View File

@@ -131,6 +131,7 @@ public class PoliteNotifWorkProfileToggleController extends TogglePreferenceCont
public void updateState(@Nullable Preference preference) { public void updateState(@Nullable Preference preference) {
if (preference == null) return; if (preference == null) return;
preference.setVisible(isAvailable()); preference.setVisible(isAvailable());
super.updateState(preference);
} }
private boolean isCoolDownEnabledForPrimary() { private boolean isCoolDownEnabledForPrimary() {