Home
last modified time | relevance | path

Searched refs:SharedPreferences (Results 1 – 25 of 177) sorted by relevance

12345678

/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/
DFakeSharedPreferences.kt19 import android.content.SharedPreferences in <lambda>()
31 class FakeSharedPreferences : SharedPreferences { in <lambda>()
33 private val listeners = mutableSetOf<SharedPreferences.OnSharedPreferenceChangeListener>() in <lambda>()
67 override fun edit(): SharedPreferences.Editor { in <lambda>()
72 listener: SharedPreferences.OnSharedPreferenceChangeListener in <lambda>()
78 listener: SharedPreferences.OnSharedPreferenceChangeListener in <lambda>()
83 private inner class Editor : SharedPreferences.Editor { in <lambda>()
89 override fun putString(key: String, value: String?): SharedPreferences.Editor { in <lambda>()
101 ): SharedPreferences.Editor { in <lambda>()
110 override fun putInt(key: String, value: Int): SharedPreferences.Editor { in <lambda>()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/util/
DVoicemailNotificationSettingsUtil.java21 import android.content.SharedPreferences;
48 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in setVibrationEnabled()
49 SharedPreferences.Editor editor = prefs.edit(); in setVibrationEnabled()
61 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in getVibrationPreference()
67 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in setRingtoneUri()
70 SharedPreferences.Editor editor = prefs.edit(); in setRingtoneUri()
82 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in getRingTonePreference()
97 Context context, SharedPreferences prefs) { in migrateVoicemailVibrationSettingsIfNeeded()
110 SharedPreferences.Editor editor = prefs.edit(); in migrateVoicemailVibrationSettingsIfNeeded()
123 SharedPreferences.Editor editor = prefs.edit(); in migrateVoicemailVibrationSettingsIfNeeded()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/people/
DSharedPreferencesHelper.java24 import android.content.SharedPreferences;
31 public static void clear(SharedPreferences sp) { in clear()
32 SharedPreferences.Editor editor = sp.edit(); in clear()
38 public static void setPeopleTileKey(SharedPreferences sp, PeopleTileKey key) { in setPeopleTileKey()
43 public static void setPeopleTileKey(SharedPreferences sp, String shortcutId, int userId, in setPeopleTileKey()
45 SharedPreferences.Editor editor = sp.edit(); in setPeopleTileKey()
53 public static PeopleTileKey getPeopleTileKey(SharedPreferences sp) { in getPeopleTileKey()
DPeopleBackupFollowUpJob.java31 import android.content.SharedPreferences;
110 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this); in onStartJob()
111 SharedPreferences.Editor editor = sp.edit(); in onStartJob()
112 SharedPreferences followUp = this.getSharedPreferences( in onStartJob()
114 SharedPreferences.Editor followUpEditor = followUp.edit(); in onStartJob()
140 public Map<String, Set<String>> processFollowUpFile(SharedPreferences followUp, in processFollowUpFile()
141 SharedPreferences.Editor followUpEditor) { in processFollowUpFile()
187 SharedPreferences.Editor followUpEditor, SharedPreferences sp) { in cancelJobAndClearRemainingWidgets()
195 Set<String>> remainingWidgets, SharedPreferences sp) { in removeUnavailableShortcutsFromSharedStorage()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/
DFakeSharedPreferencesTest.kt19 import android.content.SharedPreferences in <lambda>()
40 private lateinit var listener: SharedPreferences.OnSharedPreferenceChangeListener in <lambda>()
42 private lateinit var sharedPreferences: SharedPreferences in <lambda>()
100 SharedPreferences.Editor::putString, in <lambda>()
106 SharedPreferences.Editor::putStringSet, in <lambda>()
109 Data("keyInt", 10, SharedPreferences.Editor::putInt, { getInt(it, 0) }), in <lambda>()
110 Data("keyLong", 11L, SharedPreferences.Editor::putLong, { getLong(it, 0L) }), in <lambda>()
114 SharedPreferences.Editor::putFloat, in <lambda>()
120 SharedPreferences.Editor::putBoolean, in <lambda>()
248 private val setter: SharedPreferences.Editor.(String, T) -> SharedPreferences.Editor, in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/people/widget/
DPeopleBackupHelper.java33 import android.content.SharedPreferences;
125 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext); in performBackup()
132 SharedPreferences backupSp = mContext.getSharedPreferences( in performBackup()
134 SharedPreferences.Editor backupEditor = backupSp.edit(); in performBackup()
162 SharedPreferences backupSp = mContext.getSharedPreferences( in restoreEntity()
166 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext); in restoreEntity()
167 SharedPreferences.Editor editor = sp.edit(); in restoreEntity()
168 SharedPreferences followUp = mContext.getSharedPreferences( in restoreEntity()
170 SharedPreferences.Editor followUpEditor = followUp.edit(); in restoreEntity()
195 public void backupKey(Map.Entry<String, ?> entry, SharedPreferences.Editor backupEditor, in backupKey()
[all …]
/frameworks/base/packages/WallpaperBackup/test/src/com/android/wallpaperbackup/utils/
DContextWithServiceOverrides.java21 import android.content.SharedPreferences;
30 private SharedPreferences mSharedPreferencesOverride;
54 public void setSharedPreferencesOverride(SharedPreferences override) { in setSharedPreferencesOverride()
59 public SharedPreferences getSharedPreferences(String name, int mode) { in getSharedPreferences()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/people/
DSharedPreferencesHelperTest.java26 import android.content.SharedPreferences;
50 SharedPreferences widgetSp = mContext.getSharedPreferences( in setStorageForTile()
53 SharedPreferences.Editor widgetEditor = widgetSp.edit(); in setStorageForTile()
64 SharedPreferences sp = mContext.getSharedPreferences( in testGetPeopleTileKey()
76 SharedPreferences sp = mContext.getSharedPreferences( in testSetPeopleTileKey()
90 SharedPreferences sp = mContext.getSharedPreferences( in testClear()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/util/
DApprovedPrintServices.java21 import android.content.SharedPreferences;
22 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
39 private final SharedPreferences mPreferences;
103 SharedPreferences.Editor editor = mPreferences.edit(); in addApprovedService()
153 SharedPreferences.Editor editor = mPreferences.edit(); in pruneApprovedServices()
/frameworks/base/services/core/java/com/android/server/media/projection/
DMediaProjectionSessionIdGenerator.java20 import android.content.SharedPreferences;
42 private final SharedPreferences mSharedPreferences;
52 SharedPreferences preferences = in getInstance()
62 public MediaProjectionSessionIdGenerator(SharedPreferences sharedPreferences) { in MediaProjectionSessionIdGenerator()
DMediaProjectionTimestampStore.java22 import android.content.SharedPreferences;
45 private final SharedPreferences mSharedPreferences;
51 SharedPreferences sharedPreferences, InstantSource instantSource) { in MediaProjectionTimestampStore()
64 SharedPreferences preferences = in getInstance()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/kotlin/
DSharedPreferencesExt.kt19 import android.content.SharedPreferences in <lambda>()
26 fun SharedPreferences.observe(): Flow<Unit> = conflatedCallbackFlow { in <lambda>() method
27 val listener = SharedPreferences.OnSharedPreferenceChangeListener { _, _ -> trySend(Unit) } in <lambda>()
/frameworks/base/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/
DSharedPreferencesStorage.kt20 import android.content.SharedPreferences in <lambda>()
53 @get:VisibleForTesting internal val sharedPreferences: SharedPreferences, in <lambda>()
77 private val intermediateSharedPreferences: SharedPreferences
84 SharedPreferences.OnSharedPreferenceChangeListener { _, key -> in key()
130 private fun SharedPreferences.delete(name: String) { in SharedPreferences() method
147 sharedPreferences: SharedPreferences, in mergeSharedPreferences()
150 ): SharedPreferences.Editor { in mergeSharedPreferences()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/
DSharedPreferenceLoggerTest.java27 import android.content.SharedPreferences;
58 final SharedPreferences.Editor editor = mSharedPrefLogger.edit(); in putInt_shouldNotLogInitialPut()
74 final SharedPreferences.Editor editor = mSharedPrefLogger.edit(); in putBoolean_shouldNotLogInitialPut()
92 final SharedPreferences.Editor editor = mSharedPrefLogger.edit(); in putLong_shouldNotLogInitialPut()
106 final SharedPreferences.Editor editor = mSharedPrefLogger.edit(); in putLong_biggerThanIntMax_shouldLogIntMax()
118 final SharedPreferences.Editor editor = mSharedPrefLogger.edit(); in putLong_smallerThanIntMin_shouldLogIntMin()
129 final SharedPreferences.Editor editor = mSharedPrefLogger.edit(); in putFloat_shouldNotLogInitialPut()
/frameworks/ex/common/java/com/android/common/
DSharedPreferencesCompat.java19 import android.content.SharedPreferences;
32 Class cls = SharedPreferences.Editor.class;
39 public static void apply(SharedPreferences.Editor editor) { in apply()
/frameworks/base/packages/Shell/src/com/android/shell/
DBugreportPrefs.java20 import android.content.SharedPreferences;
37 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.java17 import android.content.SharedPreferences;
18 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
61 public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged()
/frameworks/base/packages/SystemUI/docs/
Duser-file-manager.md3 This class is used to generate file paths and SharedPreferences that is compatible for specific OS
19 ### fun getSharedPreferences(fileName: String, mode: Int, userId: Int): SharedPreferences
21 UserTracker. This returns SharedPreferences object that is tied to the specific user. Note that if
22 the SharedPreferences file does not exist, one will be created automatically. See
23 [SharedPreferences documentation](https://developer.android.com/reference/android/content/Context#g…
/frameworks/base/services/tests/servicestests/src/com/android/server/media/projection/
DMediaProjectionSessionIdGeneratorTest.java22 import android.content.SharedPreferences;
51 private final SharedPreferences mSharedPreferences = createSharePreferences();
96 private SharedPreferences createSharePreferences() { in createSharePreferences()
100 private MediaProjectionSessionIdGenerator createGenerator(SharedPreferences sharedPreferences) { in createGenerator()
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
DPrefState.java20 import android.content.SharedPreferences;
21 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
38 private final SharedPreferences mPrefs;
97 public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged()
/frameworks/base/services/core/java/com/android/server/locales/
DLocaleManagerBackupHelper.java31 import android.content.SharedPreferences;
106 private final SharedPreferences mDelegateAppLocalePackages;
123 SharedPreferences delegateAppLocalePackages) { in LocaleManagerBackupHelper()
325 SharedPreferences sp = getArchivedPackagesSp(file); in onPackageUpdateFinished()
328 SharedPreferences.Editor editor = sp.edit(); in onPackageUpdateFinished()
450 SharedPreferences sp = getStagedDataSp(stagedFile); in deleteStagedDataLocked()
564 SharedPreferences sp = getStagedDataSp(userId); in doLazyRestoreLocked()
592 private SharedPreferences getStagedDataSp(File file) { in getStagedDataSp()
598 private SharedPreferences getStagedDataSp(@UserIdInt int userId) { in getStagedDataSp()
616 SharedPreferences sp = getStagedDataSp(userId); in storeStagedDataInfo()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/
DConnectionRecordManager.java19 import android.content.SharedPreferences;
45 private SharedPreferences getSharedPreferences(Context context) { in getSharedPreferences()
74 final SharedPreferences.Editor editor = getSharedPreferences(context).edit(); in setConnectionRecord()
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/panels/
DAuthorizedPanelsRepositoryImpl.kt21 import android.content.SharedPreferences
64 private fun getAuthorizedPanelsInternal(sharedPreferences: SharedPreferences): Set<String> { in getAuthorizedPanelsInternal()
69 sharedPreferences: SharedPreferences, in addAuthorizedPanelsInternal()
76 private fun instantiateSharedPrefs(user: UserHandle): SharedPreferences { in instantiateSharedPrefs()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DVolumePrefs.java20 import android.content.SharedPreferences;
21 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
60 private static SharedPreferences prefs(Context context) { in prefs()
/frameworks/base/services/backup/java/com/android/server/backup/
DUserBackupPreferences.java20 import android.content.SharedPreferences;
34 private final SharedPreferences mPreferences;
35 private final SharedPreferences.Editor mEditor;

12345678