aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorShraddha Basantwani <shraddha.basantwani@ittiam.com>2019-11-13 18:53:17 +0530
committernchalko <nchalko@google.com>2019-11-13 23:04:12 +0000
commit4d577f8d0751fd8c2a471a2e4e0acc849a3cccae (patch)
tree44db7b627199a2193a680ea0eae5e64560a89f41 /common
parent93b357adc879308eaca61aaac6da7401cee2875f (diff)
downloadTV-4d577f8d0751fd8c2a471a2e4e0acc849a3cccae.tar.gz
Fix in DeveloperPreference
After calling edit() on a SharedPreference, you must call commit() or apply() on the editor to save the results. Test: make RunTvCommonRoboTests ROBOTEST_FILTER=DeveloperPreferenceTest Bug: 142106564 Change-Id: Icbe56fc375255dc2cb910e65936a46f5ba54b209
Diffstat (limited to 'common')
-rw-r--r--common/src/com/android/tv/common/dev/DeveloperPreference.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/src/com/android/tv/common/dev/DeveloperPreference.java b/common/src/com/android/tv/common/dev/DeveloperPreference.java
index b1c401b0..c76cceba 100644
--- a/common/src/com/android/tv/common/dev/DeveloperPreference.java
+++ b/common/src/com/android/tv/common/dev/DeveloperPreference.java
@@ -88,7 +88,7 @@ public abstract class DeveloperPreference<T> {
* <p>Future calls to {@link #get(Context)} will return the default value.
*/
public final void clear(Context context) {
- getPreferences(context).edit().remove(mKey);
+ getPreferences(context).edit().remove(mKey).apply();
}
@Override