From fb48521f41ef780bb305bf2f9819e7e018885197 Mon Sep 17 00:00:00 2001 From: Mark Lu Date: Tue, 2 Aug 2016 12:10:30 -0700 Subject: [PATCH] docs: add info to SharedPreferences.Editor.putString The information explains what happens when null is passed as value parameter Bug: 24696308 Change-Id: I362c2b1885e882312d1b4b2ff829f8f9f3546301 --- core/java/android/content/SharedPreferences.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/android/content/SharedPreferences.java b/core/java/android/content/SharedPreferences.java index 7f9e17641a19f..4b09feda21736 100644 --- a/core/java/android/content/SharedPreferences.java +++ b/core/java/android/content/SharedPreferences.java @@ -72,7 +72,9 @@ public interface SharedPreferences { * {@link #commit} or {@link #apply} are called. * * @param key The name of the preference to modify. - * @param value The new value for the preference. + * @param value The new value for the preference. Passing {@code null} + * for this argument is equivalent to calling {@link #remove(String)} with + * this key. * * @return Returns a reference to the same Editor object, so you can * chain put calls together.