Home
last modified time | relevance | path

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

1234567

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/
DConnectionRecordManager.java45 private SharedPreferences getSharedPreferences(Context context) { in getSharedPreferences() method in ConnectionRecordManager
46 return context.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE); in getSharedPreferences()
56 return getSharedPreferences(context).getInt(id, 0); in fetchConnectionRecord()
63 mLastSelectedDevice = getSharedPreferences(context).getString(KEY_LAST_SELECTED_DEVICE, in fetchLastSelectedDevice()
74 final SharedPreferences.Editor editor = getSharedPreferences(context).edit(); in setConnectionRecord()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/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).apply(); in setHasPlugins()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/people/
DSharedPreferencesHelperTest.java50 SharedPreferences widgetSp = mContext.getSharedPreferences( in setStorageForTile()
64 SharedPreferences sp = mContext.getSharedPreferences( in testGetPeopleTileKey()
76 SharedPreferences sp = mContext.getSharedPreferences( in testSetPeopleTileKey()
90 SharedPreferences sp = mContext.getSharedPreferences( in testClear()
DPeopleBackupFollowUpJobTest.java87 private final SharedPreferences mFollowUpSp = mContext.getSharedPreferences(
90 private final SharedPreferences mWidgetIdSp = mContext.getSharedPreferences(
92 private final SharedPreferences mSecondWidgetIdSp = mContext.getSharedPreferences(
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/panels/data/
DQSPreferencesRepositoryTest.kt105 private fun getSharedPreferences(): SharedPreferences = in getSharedPreferences() method in com.android.systemui.qs.panels.data.QSPreferencesRepositoryTest
107 return userFileManager.getSharedPreferences( in getSharedPreferences()
115 getSharedPreferences().edit().putBoolean(ICON_LABELS_KEY, value).apply() in setShowLabelsInSharedPreferences()
119 return getSharedPreferences().getBoolean(ICON_LABELS_KEY, defaultValue) in getShowLabelsFromSharedPreferences()
/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/base/apct-tests/perftests/core/src/android/os/
DSharedPreferencesTest.java43 SharedPreferences prefs = context.getSharedPreferences("test", Context.MODE_PRIVATE); in timeCachedGetSharedPreferences()
45 prefs = context.getSharedPreferences("test", Context.MODE_PRIVATE); in timeCachedGetSharedPreferences()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/
DCustomTileAddedRepository.kt50 .getSharedPreferences(TILES, 0, userId) in isTileAdded()
56 .getSharedPreferences(TILES, 0, userId) in isTileAdded()
/frameworks/base/packages/WallpaperBackup/test/src/com/android/wallpaperbackup/utils/
DContextWithServiceOverrides.java59 public SharedPreferences getSharedPreferences(String name, int mode) { in getSharedPreferences() method in ContextWithServiceOverrides
61 ? super.getSharedPreferences(name, mode) in getSharedPreferences()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/settings/
DUserFileManagerImplTest.kt76 val primarySharedPref = userFileManager.getSharedPreferences(TEST_FILE_NAME, 0, 0) in testGetSharedPreferences()
77 val secondarySharedPref = userFileManager.getSharedPreferences(TEST_FILE_NAME, 0, 11) in testGetSharedPreferences()
130 val tmpPrefs = context.getSharedPreferences("tmp", Context.MODE_PRIVATE) in testMigrateSharedPrefs()
139 val prefs = userFileManager.getSharedPreferences(fileName, Context.MODE_PRIVATE, userId) in testMigrateSharedPrefs()
/frameworks/base/packages/SystemUI/docs/
Duser-file-manager.md19 ### fun getSharedPreferences(fileName: String, mode: Int, userId: Int): SharedPreferences
23 …](https://developer.android.com/reference/android/content/Context#getSharedPreferences(java.lang.S…
26 i.e. `fileManager.getSharedPreferences("prefs.xml", userTracker.userId, 0)`
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DHearingAidStatsLogUtils.java266 SharedPreferences.Editor editor = getSharedPreferences(context).edit(); in addToHistory()
277 getSharedPreferences(context).getString(spName, "")); in getHistory()
283 getSharedPreferences(context).getString(spName, "")); in getHistory()
336 private static SharedPreferences getSharedPreferences(Context context) { in getSharedPreferences() method in HearingAidStatsLogUtils
337 return context.getSharedPreferences(ACCESSIBILITY_PREFERENCE, Context.MODE_PRIVATE); in getSharedPreferences()
/frameworks/base/core/java/android/preference/
DPreferenceManager.java510 public SharedPreferences getSharedPreferences() { in getSharedPreferences() method in PreferenceManager
529 mSharedPreferences = storageContext.getSharedPreferences(mSharedPreferencesName, in getSharedPreferences()
545 return context.getSharedPreferences(getDefaultSharedPreferencesName(context), in getDefaultSharedPreferences()
663 final SharedPreferences defaultValueSp = context.getSharedPreferences( in setDefaultValues()
702 mEditor = getSharedPreferences().edit(); in getEditor()
707 return getSharedPreferences().edit(); in getEditor()
DPreference.java1228 public SharedPreferences getSharedPreferences() { in getSharedPreferences() method in Preference
1233 return mPreferenceManager.getSharedPreferences(); in getSharedPreferences()
1586 if (!shouldPersist || !getSharedPreferences().contains(mKey)) { in dispatchSetInitialValue()
1681 return mPreferenceManager.getSharedPreferences().getString(mKey, defaultReturnValue); in getPersistedString()
1734 return mPreferenceManager.getSharedPreferences().getStringSet(mKey, defaultReturnValue); in getPersistedStringSet()
1788 return mPreferenceManager.getSharedPreferences().getInt(mKey, defaultReturnValue); in getPersistedInt()
1842 return mPreferenceManager.getSharedPreferences().getFloat(mKey, defaultReturnValue); in getPersistedFloat()
1896 return mPreferenceManager.getSharedPreferences().getLong(mKey, defaultReturnValue); in getPersistedLong()
1950 return mPreferenceManager.getSharedPreferences().getBoolean(mKey, defaultReturnValue); in getPersistedBoolean()
/frameworks/base/packages/StatementService/src/com/android/statementservice/domain/worker/
DSingleV1RequestWorker.kt76 val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) in <lambda>()
82 val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) in <lambda>()
DCollectV1Worker.kt57 val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) in <lambda>()
74 val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/
DUserFileManager.kt34 fun getSharedPreferences( method
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/quickaffordance/
DMuteQuickAffordanceConfigTest.kt72 whenever(userFileManager.getSharedPreferences(any(), any(), any())) in setUp()
73 … .thenReturn(context.getSharedPreferences("mutequickaffordancetest", Context.MODE_PRIVATE)) in setUp()
/frameworks/base/services/net/java/android/net/
DConnectivityModuleConnector.java309 final SharedPreferences prefs = getSharedPreferences(); in maybeCrashWithTerribleFailure()
352 private SharedPreferences getSharedPreferences() {
357 .getSharedPreferences(prefsFile, Context.MODE_PRIVATE);
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/
DCompatUIConfiguration.java128 mCompatUISharedPreferences = context.getSharedPreferences(getCompatUISharedPreferenceName(), in CompatUIConfiguration()
130 mLetterboxEduSharedPreferences = context.getSharedPreferences( in CompatUIConfiguration()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/settings/
DFakeUserFileManager.kt30 override fun getSharedPreferences(fileName: String, mode: Int, userId: Int): SharedPreferences { in getSharedPreferences() method in com.android.systemui.settings.FakeUserFileManager
/frameworks/base/services/core/java/com/android/server/locales/
DLocaleManagerBackupHelper.java594 .getSharedPreferences(file, Context.MODE_PRIVATE) in getStagedDataSp()
595 : mContext.getSharedPreferences(file, Context.MODE_PRIVATE); in getStagedDataSp()
600 .getSharedPreferences(getStagedDataFile(userId), Context.MODE_PRIVATE) in getStagedDataSp()
601 : mContext.getSharedPreferences(mStagedDataFiles.get(userId), Context.MODE_PRIVATE); in getStagedDataSp()
642 .getSharedPreferences(file, Context.MODE_PRIVATE) in getArchivedPackagesSp()
643 : mContext.getSharedPreferences(file, Context.MODE_PRIVATE); in getArchivedPackagesSp()
724 return mContext.createDeviceProtectedStorageContext().getSharedPreferences(prefsFile, in createPersistedInfo()
/frameworks/base/packages/SystemUI/src/com/android/systemui/people/widget/
DPeopleBackupHelper.java132 SharedPreferences backupSp = mContext.getSharedPreferences( in performBackup()
162 SharedPreferences backupSp = mContext.getSharedPreferences( in restoreEntity()
168 SharedPreferences followUp = mContext.getSharedPreferences( in restoreEntity()
400 SharedPreferences dest = context.getSharedPreferences(id, Context.MODE_PRIVATE); in restoreWidgetIdFiles()
411 SharedPreferences sp = mContext.getSharedPreferences(idString, Context.MODE_PRIVATE); in getExistingWidgetsForUser()
/frameworks/base/test-mock/api/
Dremoved.txt5 method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);

1234567