Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff9c587c authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Backup charging sounds enabled toggle correctly

Previously deprecated global settings property was overriding
the secure setting for charging_sounds_enabled. Only use the
global setting if the secure setting is unset (null).

Test: manual (repeat steps from bug)
Change-Id: I0bceab765764662855a053c82cb7251a14d4a1d8
Fixes: 119761984
parent c54ffd28
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -4125,10 +4125,12 @@ public class SettingsProvider extends ContentProvider {
                            Secure.CHARGING_SOUNDS_ENABLED);

                    if (!globalChargingSoundEnabled.isNull()) {
                        if (secureChargingSoundsEnabled.isNull()) {
                            secureSettings.insertSettingLocked(
                                    Secure.CHARGING_SOUNDS_ENABLED,
                                    globalChargingSoundEnabled.getValue(), null, false,
                                    SettingsState.SYSTEM_PACKAGE_NAME);
                        }

                        // set global charging_sounds_enabled setting to null since it's deprecated
                        globalSettings.insertSettingLocked(