Home
last modified time | relevance | path

Searched refs:mSharedPref (Results 1 – 3 of 3) sorted by relevance

/frameworks/support/samples/SupportEmojiDemos/src/main/java/com/example/android/support/text/emoji/
DConfig.java43 private SharedPreferences mSharedPref; field in Config
57 mSharedPref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); in init()
58 mCompatEnabled = mSharedPref.getBoolean(KEY_ENABLED, false); in init()
59 mReplaceAll = mSharedPref.getBoolean(KEY_REPLACE_ALL, false); in init()
60 mDownloadable = mSharedPref.getBoolean(KEY_DOWNLOADABLE, false); in init()
61 mIndicator = mSharedPref.getBoolean(KEY_INDICATOR, false); in init()
86 mSharedPref.edit().putBoolean(KEY_ENABLED, mCompatEnabled).apply(); in update()
87 mSharedPref.edit().putBoolean(KEY_REPLACE_ALL, mReplaceAll).apply(); in update()
88 mSharedPref.edit().putBoolean(KEY_DOWNLOADABLE, mDownloadable).apply(); in update()
89 mSharedPref.edit().putBoolean(KEY_INDICATOR, mIndicator).apply(); in update()
/frameworks/support/preference/src/androidTest/java/androidx/preference/tests/
DPreferencePersistTest.java64 private SharedPreferences mSharedPref; field in PreferencePersistTest
71 mSharedPref = manager.getSharedPreferences(); in setup()
81 mSharedPref.edit().remove(KEY).apply(); in setup()
82 assertNull(mSharedPref.getString(KEY, null)); in setup()
103 assertEquals(expected, mSharedPref.getString(KEY, null)); in string_persist_getsStoredToSharedPrefs()
114 assertNull(mSharedPref.getString(KEY, null)); in string_persistWhileDisabled_notPersisted()
157 assertThat(mSharedPref.getStringSet(KEY, null), in stringSet_persist_getsStoredToSharedPrefs()
169 assertNull(mSharedPref.getString(KEY, null)); in stringSet_persistWhileDisabled_notPersisted()
213 assertEquals(expected, mSharedPref.getInt(KEY, -1)); in int_persist_getsStoredToSharedPrefs()
224 assertEquals(-1, mSharedPref.getLong(KEY, -1)); in int_persistWhileDisabled_notPersisted()
[all …]
DPreferenceDataStoreTest.java76 private SharedPreferences mSharedPref; field in PreferenceDataStoreTest
90 mSharedPref = mManager.getSharedPreferences(); in setup()
221 assertNull(mSharedPref.getString(KEY, null)); in putStringTestCommon()
258 mSharedPref.edit().putString(KEY, TEST_WRONG_STR).commit(); in testDefaultStringValue()
260 mSharedPref.edit().remove(KEY).commit(); in testDefaultStringValue()
291 assertNull(mSharedPref.getStringSet(KEY, null)); in putStringSetTestCommon()
342 assertEquals(-1, mSharedPref.getInt(KEY, -1)); in putIntTestCommon()
391 assertEquals(-1, mSharedPref.getLong(KEY, -1L)); in putLongTestCommon()
440 assertEquals(-1, mSharedPref.getFloat(KEY, -1f), 0.1f /* epsilon */); in putFloatTestCommon()
489 assertEquals(false, mSharedPref.getBoolean(KEY, false)); in putBooleanTestCommon()