commit | c45c387584e12aaa81f64bd4eab1bcc04d5451d7 | [log] [tgz] |
---|---|---|
author | Sudheer Shanka <sudheersai@google.com> | Wed Oct 10 18:24:19 2018 -0700 |
committer | Sudheer Shanka <sudheersai@google.com> | Wed Oct 10 18:27:32 2018 -0700 |
tree | 30d84d00d342db2c246108fe7509a845f822ca00 | |
parent | b61b0e57313268132af94e9d8a5e3ee59d430ce3 [diff] |
Update CoreSettingsObserver internal state correctly. When a setting gets deleted, it needs to be removed from CoreSettingsObserver internal state too. Bug: 117555066 Test: atest services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java Change-Id: I7c488f941bf7e6ee652b784b6d41e95a48138f5a
diff --git a/services/core/java/com/android/server/am/CoreSettingsObserver.java b/services/core/java/com/android/server/am/CoreSettingsObserver.java index 160c753..a5984a6 100644 --- a/services/core/java/com/android/server/am/CoreSettingsObserver.java +++ b/services/core/java/com/android/server/am/CoreSettingsObserver.java
@@ -121,6 +121,7 @@ value = Settings.Global.getString(context.getContentResolver(), setting); } if (value == null) { + snapshot.remove(setting); continue; } Class<?> type = entry.getValue();