summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-11-16 02:23:44 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-11-16 02:23:44 +0000
commitc3e1d7b3b24c8bb35e02e1cb724d32a5efb25ada (patch)
tree0a57d708ae878ffecc568feb95ecbcfa87df8387 /core/java
parent6884b5e1f56878019a24041da9ee92a5b4f87387 (diff)
parent81e46d923214546a0c36396e0c2abb854666d86e (diff)
Merge "Doc that SharedPreferences is IO-expensive"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/SharedPreferences.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/content/SharedPreferences.java b/core/java/android/content/SharedPreferences.java
index 4b09feda2173..d3652e8825b5 100644
--- a/core/java/android/content/SharedPreferences.java
+++ b/core/java/android/content/SharedPreferences.java
@@ -30,6 +30,11 @@ import java.util.Set;
* when they are committed to storage. Objects that are returned from the
* various <code>get</code> methods must be treated as immutable by the application.
*
+ * <p>Note: This class provides strong consistency guarantees. It is using expensive operations
+ * which might slow down an app. Frequently changing properties or properties where loss can be
+ * tolerated should use other mechanisms. For more details read the comments on
+ * {@link Editor#commit()} and {@link Editor#apply()}.
+ *
* <p><em>Note: This class does not support use across multiple processes.</em>
*
* <div class="special reference">