Home
last modified time | relevance | path

Searched refs:getSharedPreferences (Results 1 – 25 of 64) sorted by relevance

123

/frameworks/base/packages/SystemUI/src/com/android/systemui/plugins/
DPluginPrefs.java40 mSharedPrefs = context.getSharedPreferences(PREFS, 0); in PluginPrefs()
55 return context.getSharedPreferences(PREFS, 0).getBoolean(HAS_PLUGINS, false); in hasPlugins()
59 context.getSharedPreferences(PREFS, 0).edit().putBoolean(HAS_PLUGINS, true).commit(); in setHasPlugins()
/frameworks/support/v7/preference/src/android/support/v7/preference/
DPreferenceManager.java315 public SharedPreferences getSharedPreferences() { in getSharedPreferences() method in PreferenceManager
331 mSharedPreferences = storageContext.getSharedPreferences(mSharedPreferencesName, in getSharedPreferences()
347 return context.getSharedPreferences(getDefaultSharedPreferencesName(context), in getDefaultSharedPreferences()
458 final SharedPreferences defaultValueSp = context.getSharedPreferences( in setDefaultValues()
490 mEditor = getSharedPreferences().edit(); in getEditor()
495 return getSharedPreferences().edit(); in getEditor()
DPreference.java1159 public SharedPreferences getSharedPreferences() { in getSharedPreferences() method in Preference
1164 return mPreferenceManager.getSharedPreferences(); in getSharedPreferences()
1511 if (!shouldPersist || !getSharedPreferences().contains(mKey)) { in dispatchSetInitialValue()
1600 return mPreferenceManager.getSharedPreferences().getString(mKey, defaultReturnValue); in getPersistedString()
1653 return mPreferenceManager.getSharedPreferences().getStringSet(mKey, defaultReturnValue); in getPersistedStringSet()
1708 return mPreferenceManager.getSharedPreferences().getInt(mKey, defaultReturnValue); in getPersistedInt()
1763 return mPreferenceManager.getSharedPreferences().getFloat(mKey, defaultReturnValue); in getPersistedFloat()
1818 return mPreferenceManager.getSharedPreferences().getLong(mKey, defaultReturnValue); in getPersistedLong()
1873 return mPreferenceManager.getSharedPreferences().getBoolean(mKey, defaultReturnValue); in getPersistedBoolean()
/frameworks/support/v7/preference/tests/src/android/support/v7/preference/tests/
DPreferenceDataStoreTest.java89 mSharedPref = mManager.getSharedPreferences(); in setup()
96 mManager.getSharedPreferences().edit().remove(KEY).commit(); in setup()
105 assertNotNull(preference.getSharedPreferences()); in testThatDataStoreIsNullByDefault()
108 assertNotNull(mManager.getSharedPreferences()); in testThatDataStoreIsNullByDefault()
125 assertNull(mManager.getSharedPreferences()); in testSetGetOnPreferenceManager()
136 assertNull(preference.getSharedPreferences()); in testSetOnPreferenceManagerGetOnPreference()
522 assertNotNull(mPreference.getSharedPreferences()); in testSharedPrefNotNullIfNoDS()
532 assertNotNull(mManager.getSharedPreferences()); in testSharedPrefNotNullIfNoDSMgr()
546 assertNull(mPreference.getSharedPreferences()); in testSharedPrefNullIfWithDS()
558 assertNull(mManager.getSharedPreferences()); in testSharedPrefNullIfWithDSMgr()
/frameworks/base/packages/Shell/src/com/android/shell/
DBugreportPrefs.java37 final SharedPreferences prefs = context.getSharedPreferences( in getWarningState()
43 final SharedPreferences prefs = context.getSharedPreferences( in setWarningState()
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/
DSettingsActivity.java45 getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); in onResume()
56 .getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this); in onPause()
/frameworks/support/core-utils/java/android/support/v4/app/
DAppLaunchChecker.java50 return context.getSharedPreferences(SHARED_PREFS_NAME, 0) in hasStartedFromLauncher()
66 final SharedPreferences sp = activity.getSharedPreferences(SHARED_PREFS_NAME, 0); in onActivityCreate()
/frameworks/base/core/java/android/preference/
DPreferenceManager.java491 public SharedPreferences getSharedPreferences() { in getSharedPreferences() method in PreferenceManager
510 mSharedPreferences = storageContext.getSharedPreferences(mSharedPreferencesName, in getSharedPreferences()
526 return context.getSharedPreferences(getDefaultSharedPreferencesName(context), in getDefaultSharedPreferences()
643 final SharedPreferences defaultValueSp = context.getSharedPreferences( in setDefaultValues()
681 mEditor = getSharedPreferences().edit(); in getEditor()
686 return getSharedPreferences().edit(); in getEditor()
DPreference.java1198 public SharedPreferences getSharedPreferences() { in getSharedPreferences() method in Preference
1203 return mPreferenceManager.getSharedPreferences(); in getSharedPreferences()
1554 if (!shouldPersist || !getSharedPreferences().contains(mKey)) { in dispatchSetInitialValue()
1649 return mPreferenceManager.getSharedPreferences().getString(mKey, defaultReturnValue); in getPersistedString()
1702 return mPreferenceManager.getSharedPreferences().getStringSet(mKey, defaultReturnValue); in getPersistedStringSet()
1756 return mPreferenceManager.getSharedPreferences().getInt(mKey, defaultReturnValue); in getPersistedInt()
1810 return mPreferenceManager.getSharedPreferences().getFloat(mKey, defaultReturnValue); in getPersistedFloat()
1864 return mPreferenceManager.getSharedPreferences().getLong(mKey, defaultReturnValue); in getPersistedLong()
1918 return mPreferenceManager.getSharedPreferences().getBoolean(mKey, defaultReturnValue); in getPersistedBoolean()
/frameworks/base/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/
DTestAppWidgetConfigure.java46 … SharedPreferences.Editor prefs = getSharedPreferences(TestAppWidgetProvider.PREFS_NAME, 0)
DTestAppWidgetProvider.java53 SharedPreferences prefs = context.getSharedPreferences( in onReceive()
/frameworks/base/tests/backup/src/com/android/backuptest/
DBackupTestActivity.java114 SharedPreferences prefs = getSharedPreferences(PREF_GROUP_SETTINGS, MODE_PRIVATE);
123 SharedPreferences prefs = getSharedPreferences(PREF_GROUP_SETTINGS, MODE_PRIVATE);
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DCachedBluetoothDevice.java686 SharedPreferences preferences = mContext.getSharedPreferences( in migratePhonebookPermissionChoice()
749 SharedPreferences preferences = mContext.getSharedPreferences( in migrateMessagePermissionChoice()
781 SharedPreferences preference = mContext.getSharedPreferences( in fetchMessageRejectionCount()
787 SharedPreferences.Editor editor = mContext.getSharedPreferences( in saveMessageRejectionCount()
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
DPrefState.java39 mPrefs = mContext.getSharedPreferences(FILE_NAME, 0); in PrefState()
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZoneResultAdapter.java144 SharedPreferences prefs = mContext.getSharedPreferences(SHARED_PREFS_NAME, in onSetFilter()
197 SharedPreferences prefs = mContext.getSharedPreferences(SHARED_PREFS_NAME, in saveRecentTimezone()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/util/
DApprovedPrintServices.java47 mPreferences = owner.getSharedPreferences(APPROVED_SERVICES_PREFERENCE, in ApprovedPrintServices()
/frameworks/base/packages/WallpaperBackup/src/com/android/wallpaperbackup/
DWallpaperBackupAgent.java122 SharedPreferences prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); in onFullBackup()
253 SharedPreferences prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); in onRestoreFinished()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/external/
DTileLifecycleManager.java431 … return context.getSharedPreferences(TILES, 0).getBoolean(component.flattenToString(), false); in isTileAdded()
435 context.getSharedPreferences(TILES, 0).edit().putBoolean(component.flattenToString(), in setTileAdded()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DPrefs.java124 return context.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE); in get()
/frameworks/support/samples/SupportEmojiDemos/src/com/example/android/support/text/emoji/
DConfig.java56 mSharedPref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); in init()
/frameworks/base/core/java/android/content/
DContextWrapper.java166 public SharedPreferences getSharedPreferences(String name, int mode) { in getSharedPreferences() method in ContextWrapper
167 return mBase.getSharedPreferences(name, mode); in getSharedPreferences()
172 public SharedPreferences getSharedPreferences(File file, int mode) { in getSharedPreferences() method in ContextWrapper
173 return mBase.getSharedPreferences(file, mode); in getSharedPreferences()
/frameworks/base/packages/ExtServices/src/android/ext/services/resolver/
DLRResolverRankerService.java197 return getSharedPreferences(prefsFile, Context.MODE_PRIVATE); in getParamSharedPref()
/frameworks/base/test-runner/src/android/test/mock/
DMockContext.java142 public SharedPreferences getSharedPreferences(String name, int mode) { in getSharedPreferences() method in MockContext
148 public SharedPreferences getSharedPreferences(File file, int mode) { in getSharedPreferences() method in MockContext
/frameworks/base/core/tests/coretests/src/com/android/internal/app/
DResolverListControllerTest.java85 when(mMockContext.getSharedPreferences(anyString(), anyInt())).thenReturn(null); in setUp()
/frameworks/ex/common/tests/src/com/android/common/
DOperationSchedulerTest.java39 SharedPreferences sp = getContext().getSharedPreferences("OperationSchedulerTest", 0); in getFreshStorage()

123