Home
last modified time | relevance | path

Searched refs:prefs (Results 1 – 25 of 296) sorted by relevance

12345678910>>...12

/aosp12/packages/apps/DeskClock/src/com/android/deskclock/data/
H A DSettingsDAO.kt62 fun getGlobalIntentId(prefs: SharedPreferences): Int {
63 return prefs.getInt(KEY_ALARM_GLOBAL_ID, -1)
69 fun updateGlobalIntentId(prefs: SharedPreferences) {
77 fun getCitySort(prefs: SharedPreferences): CitySort {
86 fun toggleCitySort(prefs: SharedPreferences) {
87 val oldSort = getCitySort(prefs)
152 setDisplayClockSeconds(prefs, isAnalog)
182 fun getTimerVibrate(prefs: SharedPreferences): Boolean {
242 fun getWeekdayOrder(prefs: SharedPreferences): Order {
288 fun getAlarmTimeout(prefs: SharedPreferences): Int {
[all …]
H A DStopwatchDAO.kt47 fun getStopwatch(prefs: SharedPreferences): Stopwatch {
52 val accumulatedTime: Long = prefs.getLong(ACCUMULATED_TIME, 0)
58 setStopwatch(prefs, s)
66 fun setStopwatch(prefs: SharedPreferences, stopwatch: Stopwatch) {
67 val editor: SharedPreferences.Editor = prefs.edit()
87 fun getLaps(prefs: SharedPreferences): MutableList<Lap> {
89 val lapCount: Int = prefs.getInt(LAP_COUNT, 0)
121 prefs.edit()
130 fun clearLaps(prefs: SharedPreferences) {
131 val editor: SharedPreferences.Editor = prefs.edit()
[all …]
H A DTimerDAO.kt60 fun getTimers(prefs: SharedPreferences): MutableList<Timer> {
79 val label: String? = prefs.getString(LABEL + id, null)
93 fun addTimer(prefs: SharedPreferences, timer: Timer): Timer {
94 val editor: SharedPreferences.Editor = prefs.edit()
97 val id: Int = prefs.getInt(NEXT_TIMER_ID, 0)
127 fun updateTimer(prefs: SharedPreferences, timer: Timer) {
128 val editor: SharedPreferences.Editor = prefs.edit()
148 fun removeTimer(prefs: SharedPreferences, timer: Timer) {
149 val editor: SharedPreferences.Editor = prefs.edit()
175 private fun getTimerIds(prefs: SharedPreferences): Set<String> {
[all …]
H A DCustomRingtoneDAO.kt45 val id: Long = prefs.getLong(NEXT_RINGTONE_ID, 0)
46 val ids = getRingtoneIds(prefs)
49 prefs.edit()
62 fun removeCustomRingtone(prefs: SharedPreferences, id: Long) {
63 val ids = getRingtoneIds(prefs)
66 val editor: SharedPreferences.Editor = prefs.edit()
83 fun getCustomRingtones(prefs: SharedPreferences): MutableList<CustomRingtone> {
89 val uri: Uri = Uri.parse(prefs.getString(RINGTONE_URI + id, null))
90 val title: String? = prefs.getString(RINGTONE_TITLE + id, null)
97 private fun getRingtoneIds(prefs: SharedPreferences): MutableSet<String> {
[all …]
/aosp12/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/testing/
H A DTestWallpaperRefresher.java51 prefs.getHomeWallpaperAttributions(), in refresh()
52 prefs.getHomeWallpaperActionUrl(), in refresh()
54 prefs.getHomeWallpaperActionIconRes(), in refresh()
55 prefs.getHomeWallpaperCollectionId(), in refresh()
59 prefs.getLockWallpaperAttributions(), in refresh()
60 prefs.getLockWallpaperActionUrl(), in refresh()
63 prefs.getLockWallpaperCollectionId(), in refresh()
66 prefs.getWallpaperPresentationMode()); in refresh()
70 prefs.getHomeWallpaperAttributions(), in refresh()
71 prefs.getHomeWallpaperActionUrl(), in refresh()
[all …]
/aosp12/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/
H A DSettings.java177 final SharedPreferences prefs = mPrefs; in loadSettings() local
206 return prefs.getBoolean(PREF_SOUND_ON, in readKeypressSoundEnabled()
219 return prefs.getBoolean(PREF_AUTO_CORRECTION, true); in readAutoCorrectEnabled()
289 final float volume = prefs.getFloat( in readKeypressSoundVolume()
306 final int milliseconds = prefs.getInt( in readKeyLongpressTimeout()
318 final int milliseconds = prefs.getInt( in readKeypressVibrationDuration()
347 final float percentage = prefs.getFloat( in readKeyboardHeight()
358 if (!prefs.contains(PREF_SHOW_SETUP_WIZARD_ICON)) { in readShowSetupWizardIcon()
417 return prefs.getString(PREF_EMOJI_RECENT_KEYS, ""); in readEmojiRecentKeys()
423 prefs.edit().putInt(key, categoryPageId).apply(); in writeLastTypedEmojiCategoryPageId()
[all …]
H A DSettingsValues.java134 mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true); in SettingsValues()
135 mVibrateOn = Settings.readVibrationEnabled(prefs, res); in SettingsValues()
136 mSoundOn = Settings.readKeypressSoundEnabled(prefs, res); in SettingsValues()
138 mSlidingKeyInputPreviewEnabled = prefs.getBoolean( in SettingsValues()
140 mShowsVoiceInputKey = needsToShowVoiceInputKey(prefs, res) in SettingsValues()
171 mEnableEmojiAltPhysicalKey = prefs.getBoolean( in SettingsValues()
188 mIsInternal = Settings.isInternal(prefs); in SettingsValues()
189 mHasCustomKeyPreviewAnimationParams = prefs.getBoolean( in SettingsValues()
310 prefs.edit() in readSuggestionsEnabled()
361 final String voiceMode = prefs.getString( in needsToShowVoiceInputKey()
[all …]
H A DAdvancedSettingsFragment.java59 if (!Settings.isInternal(prefs)) { in onCreate()
118 final SharedPreferences prefs = getSharedPreferences(); in refreshEnablingsOfKeypressSoundAndVibrationSettings() local
121 Settings.readVibrationEnabled(prefs, res)); in refreshEnablingsOfKeypressSoundAndVibrationSettings()
123 Settings.readKeypressSoundEnabled(prefs, res)); in refreshEnablingsOfKeypressSoundAndVibrationSettings()
132 final SharedPreferences prefs = getSharedPreferences(); in setupKeypressVibrationDurationSettings() local
137 prefs.edit().putInt(key, value).apply(); in setupKeypressVibrationDurationSettings()
142 prefs.edit().remove(key).apply(); in setupKeypressVibrationDurationSettings()
176 final SharedPreferences prefs = getSharedPreferences(); in setupKeypressSoundVolumeSettings() local
197 prefs.edit().remove(key).apply(); in setupKeypressSoundVolumeSettings()
237 prefs.edit().putInt(key, value).apply(); in setupKeyLongpressTimeoutSettings()
[all …]
H A DDebugSettingsFragment.java129 mDebugMode.setChecked(prefs.getBoolean(DebugSettings.PREF_DEBUG_MODE, false)); in onSharedPreferenceChanged()
154 final SharedPreferences prefs = getSharedPreferences(); in setupKeyPreviewAnimationScale() local
173 prefs.edit().putFloat(key, getValueFromPercentage(value)).apply(); in setupKeyPreviewAnimationScale()
178 prefs.edit().remove(key).apply(); in setupKeyPreviewAnimationScale()
184 Settings.readKeyPreviewAnimationScale(prefs, key, defaultValue)); in setupKeyPreviewAnimationScale()
206 final SharedPreferences prefs = getSharedPreferences(); in setupKeyPreviewAnimationDuration() local
215 prefs.edit().putInt(key, value).apply(); in setupKeyPreviewAnimationDuration()
220 prefs.edit().remove(key).apply(); in setupKeyPreviewAnimationDuration()
244 final SharedPreferences prefs = getSharedPreferences(); in setupKeyboardHeight() local
261 prefs.edit().putFloat(key, getValueFromPercentage(value)).apply(); in setupKeyboardHeight()
[all …]
/aosp12/frameworks/opt/telephony/src/java/com/android/internal/telephony/util/
H A DVoicemailNotificationSettingsUtil.java49 SharedPreferences.Editor editor = prefs.edit(); in setVibrationEnabled()
70 SharedPreferences.Editor editor = prefs.edit(); in setRingtoneUri()
84 String uriString = prefs.getString( in getRingTonePreference()
97 Context context, SharedPreferences prefs) { in migrateVoicemailVibrationSettingsIfNeeded() argument
107 boolean voicemailVibrate = prefs.getBoolean( in migrateVoicemailVibrationSettingsIfNeeded()
110 SharedPreferences.Editor editor = prefs.edit(); in migrateVoicemailVibrationSettingsIfNeeded()
119 String vibrateWhen = prefs.getString( in migrateVoicemailVibrationSettingsIfNeeded()
123 SharedPreferences.Editor editor = prefs.edit(); in migrateVoicemailVibrationSettingsIfNeeded()
136 Context context, SharedPreferences prefs) { in migrateVoicemailRingtoneSettingsIfNeeded() argument
146 String uriString = prefs.getString( in migrateVoicemailRingtoneSettingsIfNeeded()
[all …]
/aosp12/system/update_engine/cros/
H A Dexcluder_chromeos.cc40 auto* prefs = SystemState::Get()->prefs(); in Exclude() local
41 auto key = prefs->CreateSubKey({kExclusionPrefsSubDir, name}); in Exclude()
42 return prefs->SetString(key, ""); in Exclude()
46 auto* prefs = SystemState::Get()->prefs(); in IsExcluded() local
47 auto key = prefs->CreateSubKey({kExclusionPrefsSubDir, name}); in IsExcluded()
48 return prefs->Exists(key); in IsExcluded()
52 auto* prefs = SystemState::Get()->prefs(); in Reset() local
55 if (!prefs->GetSubKeys(kExclusionPrefsSubDir, &keys)) in Reset()
58 if (!(ret &= prefs->Delete(key))) in Reset()
H A Dpayload_state_unittest.cc118 auto* prefs = FakeSystemState::Get()->mock_prefs(); in TEST_F() local
161 auto* prefs = FakeSystemState::Get()->mock_prefs(); in TEST_F() local
213 auto* prefs = FakeSystemState::Get()->mock_prefs(); in TEST_F() local
257 auto* prefs = FakeSystemState::Get()->mock_prefs(); in TEST_F() local
1156 EXPECT_CALL(*prefs, Exists(_)).Times(0); in TEST_F()
1157 EXPECT_CALL(*prefs, SetString(_, _)).Times(0); in TEST_F()
1158 EXPECT_CALL(*prefs, SetInt64(_, _)).Times(0); in TEST_F()
1159 EXPECT_CALL(*prefs, SetBoolean(_, _)).Times(0); in TEST_F()
1160 EXPECT_CALL(*prefs, GetString(_, _)).Times(0); in TEST_F()
1161 EXPECT_CALL(*prefs, GetInt64(_, _)).Times(0); in TEST_F()
[all …]
H A Dcommon_service.cc238 const auto* prefs = SystemState::Get()->prefs(); in GetCohortHint() local
240 if (prefs->Exists(kPrefsOmahaCohortHint) && in GetCohortHint()
241 !prefs->GetString(kPrefsOmahaCohortHint, out_cohort_hint)) { in GetCohortHint()
263 const auto* prefs = SystemState::Get()->prefs(); in GetP2PUpdatePermission() local
265 if (prefs->Exists(kPrefsP2PEnabled) && in GetP2PUpdatePermission()
266 !prefs->GetBoolean(kPrefsP2PEnabled, &p2p_pref)) { in GetP2PUpdatePermission()
291 if (!SystemState::Get()->prefs()->SetBoolean( in SetUpdateOverCellularPermission()
321 auto* prefs = SystemState::Get()->prefs(); in SetUpdateOverCellularTarget() local
322 if (!prefs->SetString(kPrefsUpdateOverCellularTargetVersion, in SetUpdateOverCellularTarget()
342 const auto* prefs = SystemState::Get()->prefs(); in GetUpdateOverCellularPermission() local
[all …]
/aosp12/packages/apps/Messaging/src/com/android/messaging/util/
H A DBuglePrefsImpl.java45 final SharedPreferences prefs = mContext.getSharedPreferences( in getInt() local
47 return prefs.getInt(key, defaultValue); in getInt()
53 final SharedPreferences prefs = mContext.getSharedPreferences( in getLong() local
55 return prefs.getLong(key, defaultValue); in getLong()
63 return prefs.getBoolean(key, defaultValue); in getBoolean()
71 return prefs.getString(key, defaultValue); in getString()
85 final SharedPreferences.Editor editor = prefs.edit(); in putInt()
95 final SharedPreferences.Editor editor = prefs.edit(); in putLong()
105 final SharedPreferences.Editor editor = prefs.edit(); in putBoolean()
115 final SharedPreferences.Editor editor = prefs.edit(); in putString()
[all …]
/aosp12/packages/services/Telecomm/src/com/android/server/telecom/
H A DQuickResponseUtils.java64 final SharedPreferences prefs = context.getSharedPreferences( in maybeMigrateLegacyQuickResponses() local
68 final boolean responsesExist = prefs.contains(KEY_CANNED_RESPONSE_PREF_1) in maybeMigrateLegacyQuickResponses()
69 || prefs.contains(KEY_CANNED_RESPONSE_PREF_2) in maybeMigrateLegacyQuickResponses()
70 || prefs.contains(KEY_CANNED_RESPONSE_PREF_3) in maybeMigrateLegacyQuickResponses()
71 || prefs.contains(KEY_CANNED_RESPONSE_PREF_4); in maybeMigrateLegacyQuickResponses()
109 final SharedPreferences.Editor editor = prefs.edit(); in maybeMigrateLegacyQuickResponses()
129 public static void maybeResetQuickResponses(Context context, SharedPreferences prefs) { in maybeResetQuickResponses() argument
135 prefs.edit().remove(QuickResponseUtils.KEY_CANNED_RESPONSE_PREF_1).apply(); in maybeResetQuickResponses()
143 prefs.edit().remove(QuickResponseUtils.KEY_CANNED_RESPONSE_PREF_2).apply(); in maybeResetQuickResponses()
151 prefs.edit().remove(QuickResponseUtils.KEY_CANNED_RESPONSE_PREF_3).apply(); in maybeResetQuickResponses()
[all …]
/aosp12/system/update_engine/
H A Ddownload_action_android_unittest.cc62 MockPrefs prefs; in TEST_F() local
63 EXPECT_CALL(prefs, GetInt64(kPrefsUpdateStatePayloadIndex, _)) in TEST_F()
65 EXPECT_CALL(prefs, GetInt64(kPrefsManifestMetadataSize, _)) in TEST_F()
67 EXPECT_CALL(prefs, GetInt64(kPrefsManifestSignatureSize, _)) in TEST_F()
71 EXPECT_CALL(prefs, GetString(kPrefsManifestBytes, _)) in TEST_F()
126 MockPrefs prefs; in TEST_F() local
127 EXPECT_CALL(prefs, GetInt64(kPrefsUpdateStatePayloadIndex, _)) in TEST_F()
129 EXPECT_CALL(prefs, GetInt64(kPrefsManifestMetadataSize, _)) in TEST_F()
131 EXPECT_CALL(prefs, GetInt64(kPrefsManifestSignatureSize, _)) in TEST_F()
136 EXPECT_CALL(prefs, GetString(kPrefsManifestBytes, _)) in TEST_F()
[all …]
H A Dmetrics_utils.cc298 CHECK(prefs); in GetPersistedValue()
299 if (!prefs->Exists(key)) in GetPersistedValue()
303 if (!prefs->GetInt64(key, &stored_value)) in GetPersistedValue()
316 CHECK(prefs); in SetNumReboots()
324 CHECK(prefs); in SetPayloadAttemptNumber()
330 CHECK(prefs); in SetSystemUpdatedMarker()
333 prefs->SetInt64(kPrefsSystemUpdatedMarker, in SetSystemUpdatedMarker()
340 CHECK(prefs); in SetUpdateTimestampStart()
341 prefs->SetInt64(kPrefsUpdateTimestampStart, in SetUpdateTimestampStart()
349 CHECK(prefs); in SetUpdateBootTimestampStart()
[all …]
H A Dmetrics_utils.h53 int64_t GetPersistedValue(const std::string& key, PrefsInterface* prefs);
56 void SetNumReboots(int64_t num_reboots, PrefsInterface* prefs);
60 PrefsInterface* prefs);
63 void SetSystemUpdatedMarker(ClockInterface* clock, PrefsInterface* prefs);
68 PrefsInterface* prefs);
73 PrefsInterface* prefs);
81 PrefsInterface* prefs,
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/
H A DUsbDetailsFunctionsControllerTest.java140 assertThat(prefs.get(0).getKey()) in displayRefresh_onlyMidiAllowed_shouldCreateOnlyMidiPref()
152 assertThat(prefs.get(0).getKey()) in displayRefresh_mtpEnabled_shouldCheckSwitches()
165 assertThat(prefs.get(0).getKey()) in displayRefresh_accessoryEnabled_shouldCheckSwitches()
178 assertThat(prefs.get(1).getKey()) in displayRefresh_ncmEnabled_checksSwitches()
191 prefs.get(0).performClick(); in onClickMtp_noneEnabled_shouldEnableMtp()
193 assertThat(prefs.get(0).getKey()) in onClickMtp_noneEnabled_shouldEnableMtp()
209 prefs.get(0).performClick(); in onClickMtp_ptpEnabled_shouldEnableMtp()
211 assertThat(prefs.get(0).getKey()) in onClickMtp_ptpEnabled_shouldEnableMtp()
217 assertThat(prefs.get(3).getKey()) in onClickMtp_ptpEnabled_shouldEnableMtp()
230 prefs.get(4).performClick(); in onClickNone_mtpEnabled_shouldDisableMtp()
[all …]
/aosp12/packages/apps/Traceur/src/com/android/traceur/
H A DReceiver.java79 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in onReceive() local
89 prefs.edit().putBoolean( in onReceive()
101 !prefs.getBoolean(context.getString( in onReceive()
118 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in updateTracing() local
127 Set<String> activeAvailableTags = getActiveTags(context, prefs, true); in updateTracing()
128 Set<String> activeTags = getActiveTags(context, prefs, false); in updateTracing()
131 postCategoryNotification(context, prefs); in updateTracing()
135 prefs.getString(context.getString(R.string.pref_key_buffer_size), in updateTracing()
226 SharedPreferences prefs = in updateDeveloperOptionsWatcher()
228 prefs.edit().putBoolean( in updateDeveloperOptionsWatcher()
[all …]
/aosp12/packages/apps/Car/tests/TestMediaApp/src/com/android/car/media/testmediaapp/prefs/
H A DTmaPrefsFragment.java17 package com.android.car.media.testmediaapp.prefs;
31 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaAccountType;
32 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaBrowseNodeType;
33 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaLoginEventOrder;
34 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaReplyDelay;
35 import com.android.car.media.testmediaapp.prefs.TmaPrefs.PrefEntry;
45 TmaPrefs prefs = TmaPrefs.getInstance(context); in onCreatePreferences() local
48 screen.addPreference(createEnumPref(context, "Account Type", prefs.mAccountType, in onCreatePreferences()
50 screen.addPreference(createEnumPref(context, "Root node type", prefs.mRootNodeType, in onCreatePreferences()
52 screen.addPreference(createEnumPref(context, "Root reply delay", prefs.mRootReplyDelay, in onCreatePreferences()
[all …]
/aosp12/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/
H A DKeyboardTheme.java115 static KeyboardTheme getDefaultKeyboardTheme(final SharedPreferences prefs, in getDefaultKeyboardTheme() argument
117 final String klpThemeIdString = prefs.getString(KLP_KEYBOARD_THEME_KEY, null); in getDefaultKeyboardTheme()
134 prefs.edit().remove(KLP_KEYBOARD_THEME_KEY).apply(); in getDefaultKeyboardTheme()
150 public static void saveKeyboardThemeId(final int themeId, final SharedPreferences prefs) { in saveKeyboardThemeId() argument
151 saveKeyboardThemeId(themeId, prefs, BuildCompatUtils.EFFECTIVE_SDK_INT); in saveKeyboardThemeId()
163 static void saveKeyboardThemeId(final int themeId, final SharedPreferences prefs, in saveKeyboardThemeId() argument
166 prefs.edit().putString(prefKey, Integer.toString(themeId)).apply(); in saveKeyboardThemeId()
197 final String lxxThemeIdString = prefs.getString(LXX_KEYBOARD_THEME_KEY, null); in getKeyboardTheme()
199 return getDefaultKeyboardTheme(prefs, sdkVersion, availableThemeArray); in getKeyboardTheme()
212 prefs.edit().remove(LXX_KEYBOARD_THEME_KEY).apply(); in getKeyboardTheme()
[all …]
/aosp12/packages/apps/MusicFX/src/com/android/musicfx/
H A DControlPanelEffect.java168 final SharedPreferences.Editor editor = prefs.edit(); in initEffectsPreferences()
530 final SharedPreferences.Editor editor = prefs.edit(); in setParameterBoolean()
554 value = prefs.getBoolean(key.toString(), value); in getParameterBoolean()
737 bandLevel = (short) prefs.getInt( in setParameterInt()
742 bandLevel = (short) prefs.getInt( in setParameterInt()
747 bandLevel = (short) prefs.getInt( in setParameterInt()
814 value = prefs.getInt(key, value); in getParameterInt()
931 value = prefs.getString(key, value); in getParameterString()
983 final SharedPreferences.Editor editor = prefs.edit(); in openSession()
1135 eQPreset = (short) prefs in openSession()
[all …]
/aosp12/packages/services/Telephony/src/com/android/phone/settings/
H A DVoicemailProviderSettingsUtil.java55 SharedPreferences prefs = getPrefs(context); in load() local
57 String vmNumberSetting = prefs.getString(key + VM_NUMBER_TAG, null); in load()
66 int fwdLen = prefs.getInt(fwdKey + FWD_SETTINGS_LENGTH_TAG, 0); in load()
72 cfi[i].status = prefs.getInt(settingKey + FWD_SETTING_STATUS, 0); in load()
73 cfi[i].reason = prefs.getInt( in load()
78 cfi[i].number = prefs.getString(settingKey + FWD_SETTING_NUMBER, ""); in load()
79 cfi[i].timeSeconds = prefs.getInt(settingKey + FWD_SETTING_TIME, 20); in load()
103 SharedPreferences prefs = getPrefs(context); in save() local
104 SharedPreferences.Editor editor = prefs.edit(); in save()
136 SharedPreferences prefs = getPrefs(context); in delete() local
[all …]
/aosp12/packages/apps/Calendar/src/com/android/calendar/
H A DCalendarUtils.java126 SharedPreferences prefs = getSharedPreferences((Context)cookie, mPrefsName); in onQueryComplete() local
128 setSharedPreference(prefs, KEY_HOME_TZ_ENABLED, mUseHomeTZ); in onQueryComplete()
129 setSharedPreference(prefs, KEY_HOME_TZ, mHomeTZ); in onQueryComplete()
223 SharedPreferences prefs = getSharedPreferences(context, mPrefsName); in setTimeZone() local
224 setSharedPreference(prefs, KEY_HOME_TZ_ENABLED, mUseHomeTZ); in setTimeZone()
225 setSharedPreference(prefs, KEY_HOME_TZ, mHomeTZ); in setTimeZone()
273 SharedPreferences prefs = getSharedPreferences(context, mPrefsName); in getTimeZone() local
274 mUseHomeTZ = prefs.getBoolean(KEY_HOME_TZ_ENABLED, false); in getTimeZone()
275 mHomeTZ = prefs.getString(KEY_HOME_TZ, Time.getCurrentTimezone()); in getTimeZone()
332 SharedPreferences.Editor editor = prefs.edit(); in setSharedPreference()
[all …]

12345678910>>...12