Home
last modified time | relevance | path

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

/frameworks/support/samples/SupportEmojiDemos/src/com/example/android/support/text/emoji/
DConfig.java42 private SharedPreferences mSharedPref; field in Config
56 mSharedPref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); in init()
57 mCompatEnabled = mSharedPref.getBoolean(KEY_ENABLED, false); in init()
58 mReplaceAll = mSharedPref.getBoolean(KEY_REPLACE_ALL, false); in init()
59 mDownloadable = mSharedPref.getBoolean(KEY_DOWNLOADABLE, false); in init()
60 mIndicator = mSharedPref.getBoolean(KEY_INDICATOR, false); in init()
85 mSharedPref.edit().putBoolean(KEY_ENABLED, mCompatEnabled).apply(); in update()
86 mSharedPref.edit().putBoolean(KEY_REPLACE_ALL, mReplaceAll).apply(); in update()
87 mSharedPref.edit().putBoolean(KEY_DOWNLOADABLE, mDownloadable).apply(); in update()
88 mSharedPref.edit().putBoolean(KEY_INDICATOR, mIndicator).apply(); in update()
/frameworks/support/v7/preference/tests/src/android/support/v7/preference/tests/
DPreferencePersistTest.java59 private SharedPreferences mSharedPref; field in PreferencePersistTest
66 mSharedPref = manager.getSharedPreferences(); in setup()
76 mSharedPref.edit().remove(KEY).apply(); in setup()
77 assertNull(mSharedPref.getString(KEY, null)); in setup()
98 assertEquals(expected, mSharedPref.getString(KEY, null)); in string_persist_getsStoredToSharedPrefs()
109 assertNull(mSharedPref.getString(KEY, null)); in string_persistWhileDisabled_notPersisted()
152 assertThat(mSharedPref.getStringSet(KEY, null), in stringSet_persist_getsStoredToSharedPrefs()
164 assertNull(mSharedPref.getString(KEY, null)); in stringSet_persistWhileDisabled_notPersisted()
208 assertEquals(expected, mSharedPref.getInt(KEY, -1)); in int_persist_getsStoredToSharedPrefs()
219 assertEquals(-1, mSharedPref.getLong(KEY, -1)); in int_persistWhileDisabled_notPersisted()
[all …]
DPreferenceDataStoreTest.java75 private SharedPreferences mSharedPref; field in PreferenceDataStoreTest
89 mSharedPref = mManager.getSharedPreferences(); in setup()
220 assertNull(mSharedPref.getString(KEY, null)); in putStringTestCommon()
257 mSharedPref.edit().putString(KEY, TEST_WRONG_STR).commit(); in testDefaultStringValue()
259 mSharedPref.edit().remove(KEY).commit(); in testDefaultStringValue()
290 assertNull(mSharedPref.getStringSet(KEY, null)); in putStringSetTestCommon()
341 assertEquals(-1, mSharedPref.getInt(KEY, -1)); in putIntTestCommon()
390 assertEquals(-1, mSharedPref.getLong(KEY, -1L)); in putLongTestCommon()
439 assertEquals(-1, mSharedPref.getFloat(KEY, -1f), 0.1f /* epsilon */); in putFloatTestCommon()
488 assertEquals(false, mSharedPref.getBoolean(KEY, false)); in putBooleanTestCommon()