From 1bca5db0cbf9465f6d6307afa293077dbf0175c3 Mon Sep 17 00:00:00 2001 From: Jonathan Dormody Date: Thu, 16 Nov 2017 11:25:20 -0700 Subject: [PATCH] Docs: Added mention that the getSharedPreferences method is thread safe. Test: make ds-docs Bug: 5370116 Change-Id: I5aa851db5e1dbcb3563f1ce15f96cc10c80e90ba --- core/java/android/content/Context.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 90be6b8d0f771..25342aa51c275 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -754,6 +754,8 @@ public abstract class Context { * to any callers for the same name, meaning they will see each other's * edits as soon as they are made. * + * This method is thead-safe. + * * @param name Desired preferences file. If a preferences file by this name * does not exist, it will be created when you retrieve an * editor (SharedPreferences.edit()) and then commit changes (Editor.commit()).