Merge "Docs: clarify getSharedPreferences behavior" into qt-dev

am: 3791f9b071

Change-Id: Ia631eefc35816b92004a3fa6f8ad5f00236908bf
This commit is contained in:
Andrew Solovay
2019-08-28 13:18:04 -07:00
committed by android-build-merger

View File

@@ -854,11 +854,16 @@ public abstract class Context {
* to any callers for the same name, meaning they will see each other's * to any callers for the same name, meaning they will see each other's
* edits as soon as they are made. * 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 * <p>If the preferences directory does not already exist, it will be created when this method
* does not exist, it will be created when you retrieve an * is called.
* editor (SharedPreferences.edit()) and then commit changes (Editor.commit()). *
* <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. * @param mode Operating mode.
* *
* @return The single {@link SharedPreferences} instance that can be used * @return The single {@link SharedPreferences} instance that can be used