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
This commit is contained in:
@@ -4125,10 +4125,12 @@ public class SettingsProvider extends ContentProvider {
|
||||
Secure.CHARGING_SOUNDS_ENABLED);
|
||||
|
||||
if (!globalChargingSoundEnabled.isNull()) {
|
||||
secureSettings.insertSettingLocked(
|
||||
Secure.CHARGING_SOUNDS_ENABLED,
|
||||
globalChargingSoundEnabled.getValue(), null, false,
|
||||
SettingsState.SYSTEM_PACKAGE_NAME);
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user