diff options
| author | 2019-08-28 13:52:14 -0700 | |
|---|---|---|
| committer | 2019-08-28 13:52:14 -0700 | |
| commit | c149d6ff19afd31f807bf0ede08264d80d41e931 (patch) | |
| tree | 272d4fec19dca334dd00c804489832c73753386e | |
| parent | f9b00a4427e4d6f08031d130f56e56545274d0f0 (diff) | |
| parent | 73a66dc1006ca67b46813694365fc7f357b9da88 (diff) | |
Merge "Docs: clarify getSharedPreferences behavior" into qt-dev am: 3791f9b071
am: 73a66dc100
Change-Id: Ia14424c38de4a55096bad5e1e91d29681b26f4f5
| -rw-r--r-- | core/java/android/content/Context.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index a6b95a95dcd8..4a5ea03b4530 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -854,11 +854,16 @@ 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. + * <p>This method is thread-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()). + * <p>If the preferences directory does not already exist, it will be created when this method + * is called. + * + * <p>If a preferences file by this name does not exist, it will be created when you retrieve an + * editor ({@link SharedPreferences#edit()}) and then commit changes ({@link + * SharedPreferences.Editor#commit()} or {@link SharedPreferences.Editor#apply()}). + * + * @param name Desired preferences file. * @param mode Operating mode. * * @return The single {@link SharedPreferences} instance that can be used |