/packages/apps/DeskClock/src/com/android/deskclock/data/ |
D | SettingsDAO.kt | 62 fun getGlobalIntentId(prefs: SharedPreferences): Int { in getGlobalIntentId() 63 return prefs.getInt(KEY_ALARM_GLOBAL_ID, -1) in getGlobalIntentId() 69 fun updateGlobalIntentId(prefs: SharedPreferences) { in updateGlobalIntentId() 70 val globalId: Int = prefs.getInt(KEY_ALARM_GLOBAL_ID, -1) + 1 in updateGlobalIntentId() 71 prefs.edit().putInt(KEY_ALARM_GLOBAL_ID, globalId).apply() in updateGlobalIntentId() 77 fun getCitySort(prefs: SharedPreferences): CitySort { in getCitySort() 79 val citySortOrdinal: Int = prefs.getInt(KEY_SORT_PREFERENCE, defaultSortOrdinal) in getCitySort() 86 fun toggleCitySort(prefs: SharedPreferences) { in toggleCitySort() 87 val oldSort = getCitySort(prefs) in toggleCitySort() 89 prefs.edit().putInt(KEY_SORT_PREFERENCE, newSort.ordinal).apply() in toggleCitySort() [all …]
|
D | SettingsDAO.java | 73 static int getGlobalIntentId(SharedPreferences prefs) { in getGlobalIntentId() argument 74 return prefs.getInt(KEY_ALARM_GLOBAL_ID, -1); in getGlobalIntentId() 80 static void updateGlobalIntentId(SharedPreferences prefs) { in updateGlobalIntentId() argument 81 final int globalId = prefs.getInt(KEY_ALARM_GLOBAL_ID, -1) + 1; in updateGlobalIntentId() 82 prefs.edit().putInt(KEY_ALARM_GLOBAL_ID, globalId).apply(); in updateGlobalIntentId() 88 static CitySort getCitySort(SharedPreferences prefs) { in getCitySort() argument 90 final int citySortOrdinal = prefs.getInt(KEY_SORT_PREFERENCE, defaultSortOrdinal); in getCitySort() 97 static void toggleCitySort(SharedPreferences prefs) { in toggleCitySort() argument 98 final CitySort oldSort = getCitySort(prefs); in toggleCitySort() 100 prefs.edit().putInt(KEY_SORT_PREFERENCE, newSort.ordinal()).apply(); in toggleCitySort() [all …]
|
D | TimerDAO.kt | 60 fun getTimers(prefs: SharedPreferences): MutableList<Timer> { in getTimers() 62 val timerIds: Set<String> = prefs.getStringSet(TIMER_IDS, emptySet<String>())!! in getTimers() 68 val stateValue: Int = prefs.getInt(STATE + id, Timer.State.RESET.value) in getTimers() 74 val length: Long = prefs.getLong(LENGTH + id, Long.MIN_VALUE) in getTimers() 75 val totalLength: Long = prefs.getLong(TOTAL_LENGTH + id, Long.MIN_VALUE) in getTimers() 76 val lastStartTime: Long = prefs.getLong(LAST_START_TIME + id, Timer.UNUSED) in getTimers() 77 val lastWallClockTime: Long = prefs.getLong(LAST_WALL_CLOCK_TIME + id, Timer.UNUSED) in getTimers() 78 val remainingTime: Long = prefs.getLong(REMAINING_TIME + id, totalLength) in getTimers() 79 val label: String? = prefs.getString(LABEL + id, null) in getTimers() 80 val deleteAfterUse: Boolean = prefs.getBoolean(DELETE_AFTER_USE + id, false) in getTimers() [all …]
|
D | TimerDAO.java | 72 static List<Timer> getTimers(SharedPreferences prefs) { in getTimers() argument 74 final Set<String> timerIds = prefs.getStringSet(TIMER_IDS, Collections.<String>emptySet()); in getTimers() 80 final int stateValue = prefs.getInt(STATE + id, RESET.getValue()); in getTimers() 86 final long length = prefs.getLong(LENGTH + id, Long.MIN_VALUE); in getTimers() 87 final long totalLength = prefs.getLong(TOTAL_LENGTH + id, Long.MIN_VALUE); in getTimers() 88 final long lastStartTime = prefs.getLong(LAST_START_TIME + id, Timer.UNUSED); in getTimers() 89 final long lastWallClockTime = prefs.getLong(LAST_WALL_CLOCK_TIME + id, in getTimers() 91 final long remainingTime = prefs.getLong(REMAINING_TIME + id, totalLength); in getTimers() 92 final String label = prefs.getString(LABEL + id, null); in getTimers() 93 final boolean deleteAfterUse = prefs.getBoolean(DELETE_AFTER_USE + id, false); in getTimers() [all …]
|
D | StopwatchDAO.kt | 47 fun getStopwatch(prefs: SharedPreferences): Stopwatch { in getStopwatch() 48 val stateIndex: Int = prefs.getInt(STATE, Stopwatch.State.RESET.ordinal) in getStopwatch() 50 val lastStartTime: Long = prefs.getLong(LAST_START_TIME, Stopwatch.UNUSED) in getStopwatch() 51 val lastWallClockTime: Long = prefs.getLong(LAST_WALL_CLOCK_TIME, Stopwatch.UNUSED) in getStopwatch() 52 val accumulatedTime: Long = prefs.getLong(ACCUMULATED_TIME, 0) in getStopwatch() 58 setStopwatch(prefs, s) in getStopwatch() 66 fun setStopwatch(prefs: SharedPreferences, stopwatch: Stopwatch) { in setStopwatch() 67 val editor: SharedPreferences.Editor = prefs.edit() in setStopwatch() 87 fun getLaps(prefs: SharedPreferences): MutableList<Lap> { in getLaps() 89 val lapCount: Int = prefs.getInt(LAP_COUNT, 0) in getLaps() [all …]
|
D | StopwatchDAO.java | 58 static Stopwatch getStopwatch(SharedPreferences prefs) { in getStopwatch() argument 59 final int stateIndex = prefs.getInt(STATE, RESET.ordinal()); in getStopwatch() 61 final long lastStartTime = prefs.getLong(LAST_START_TIME, Stopwatch.UNUSED); in getStopwatch() 62 final long lastWallClockTime = prefs.getLong(LAST_WALL_CLOCK_TIME, Stopwatch.UNUSED); in getStopwatch() 63 final long accumulatedTime = prefs.getLong(ACCUMULATED_TIME, 0); in getStopwatch() 69 setStopwatch(prefs, s); in getStopwatch() 77 static void setStopwatch(SharedPreferences prefs, Stopwatch stopwatch) { in setStopwatch() argument 78 final SharedPreferences.Editor editor = prefs.edit(); in setStopwatch() 98 static List<Lap> getLaps(SharedPreferences prefs) { in getLaps() argument 100 final int lapCount = prefs.getInt(LAP_COUNT, 0); in getLaps() [all …]
|
D | CustomRingtoneDAO.kt | 44 fun addCustomRingtone(prefs: SharedPreferences, uri: Uri, title: String?): CustomRingtone { in addCustomRingtone() 45 val id: Long = prefs.getLong(NEXT_RINGTONE_ID, 0) in addCustomRingtone() 46 val ids = getRingtoneIds(prefs) in addCustomRingtone() 49 prefs.edit() in addCustomRingtone() 62 fun removeCustomRingtone(prefs: SharedPreferences, id: Long) { in removeCustomRingtone() 63 val ids = getRingtoneIds(prefs) in removeCustomRingtone() 66 val editor: SharedPreferences.Editor = prefs.edit() in removeCustomRingtone() 83 fun getCustomRingtones(prefs: SharedPreferences): MutableList<CustomRingtone> { in getCustomRingtones() 84 val ids: Set<String> = prefs.getStringSet(RINGTONE_IDS, emptySet<String>())!! in getCustomRingtones() 89 val uri: Uri = Uri.parse(prefs.getString(RINGTONE_URI + id, null)) in getCustomRingtones() [all …]
|
D | CustomRingtoneDAO.java | 53 static CustomRingtone addCustomRingtone(SharedPreferences prefs, Uri uri, String title) { in addCustomRingtone() argument 54 final long id = prefs.getLong(NEXT_RINGTONE_ID, 0); in addCustomRingtone() 55 final Set<String> ids = getRingtoneIds(prefs); in addCustomRingtone() 58 prefs.edit() in addCustomRingtone() 71 static void removeCustomRingtone(SharedPreferences prefs, long id) { in removeCustomRingtone() argument 72 final Set<String> ids = getRingtoneIds(prefs); in removeCustomRingtone() 75 final SharedPreferences.Editor editor = prefs.edit(); in removeCustomRingtone() 90 static List<CustomRingtone> getCustomRingtones(SharedPreferences prefs) { in getCustomRingtones() argument 91 final Set<String> ids = prefs.getStringSet(RINGTONE_IDS, Collections.<String>emptySet()); in getCustomRingtones() 96 final Uri uri = Uri.parse(prefs.getString(RINGTONE_URI + id, null)); in getCustomRingtones() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/ |
D | Settings.java | 156 public void onSharedPreferenceChanged(final SharedPreferences prefs, final String key) { in onSharedPreferenceChanged() argument 177 final SharedPreferences prefs = mPrefs; in loadSettings() local 181 return new SettingsValues(context, prefs, res, inputAttributes); in loadSettings() 204 public static boolean readKeypressSoundEnabled(final SharedPreferences prefs, in readKeypressSoundEnabled() argument 206 return prefs.getBoolean(PREF_SOUND_ON, in readKeypressSoundEnabled() 210 public static boolean readVibrationEnabled(final SharedPreferences prefs, in readVibrationEnabled() argument 213 return hasVibrator && prefs.getBoolean(PREF_VIBRATE_ON, in readVibrationEnabled() 217 public static boolean readAutoCorrectEnabled(final SharedPreferences prefs, in readAutoCorrectEnabled() argument 219 return prefs.getBoolean(PREF_AUTO_CORRECTION, true); in readAutoCorrectEnabled() 226 public static boolean readBlockPotentiallyOffensive(final SharedPreferences prefs, in readBlockPotentiallyOffensive() argument [all …]
|
D | SettingsValues.java | 122 public SettingsValues(final Context context, final SharedPreferences prefs, final Resources res, in SettingsValues() argument 134 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() 137 mKeyPreviewPopupOn = Settings.readKeyPreviewPopupEnabled(prefs, res); in SettingsValues() 138 mSlidingKeyInputPreviewEnabled = prefs.getBoolean( in SettingsValues() 140 mShowsVoiceInputKey = needsToShowVoiceInputKey(prefs, res) in SettingsValues() 144 ? prefs.getBoolean(Settings.PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST, false) in SettingsValues() 147 ? Settings.readShowsLanguageSwitchKey(prefs) : true /* forcibly */; in SettingsValues() 148 mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true); in SettingsValues() [all …]
|
D | AdvancedSettingsFragment.java | 57 final SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); in onCreate() local 59 if (!Settings.isInternal(prefs)) { in onCreate() 88 Settings.readKeyPreviewPopupEnabled(prefs, res)); in onCreate() 100 final SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); in onResume() local 105 public void onSharedPreferenceChanged(final SharedPreferences prefs, final String key) { in onSharedPreferenceChanged() argument 109 Settings.readKeyPreviewPopupEnabled(prefs, res)); in onSharedPreferenceChanged() 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 [all …]
|
D | DebugSettingsFragment.java | 127 public void onSharedPreferenceChanged(final SharedPreferences prefs, final String key) { in onSharedPreferenceChanged() argument 129 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() 225 return Settings.readKeyPreviewAnimationDuration(prefs, key, defaultValue); in setupKeyPreviewAnimationDuration() [all …]
|
/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/testing/ |
D | TestWallpaperRefresher.java | 46 WallpaperPreferences prefs = InjectorProvider.getInjector().getPreferences(mAppContext); in refresh() local 48 if (BuildCompat.isAtLeastN() && prefs.getLockWallpaperId() > 0) { in refresh() 51 prefs.getHomeWallpaperAttributions(), in refresh() 52 prefs.getHomeWallpaperActionUrl(), in refresh() 53 prefs.getHomeWallpaperActionLabelRes(), in refresh() 54 prefs.getHomeWallpaperActionIconRes(), in refresh() 55 prefs.getHomeWallpaperCollectionId(), in refresh() 56 prefs.getHomeWallpaperBackingFileName(), in refresh() 59 prefs.getLockWallpaperAttributions(), in refresh() 60 prefs.getLockWallpaperActionUrl(), in refresh() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | BuglePrefsImpl.java | 45 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() 61 final SharedPreferences prefs = mContext.getSharedPreferences( in getBoolean() local 63 return prefs.getBoolean(key, defaultValue); in getBoolean() 69 final SharedPreferences prefs = mContext.getSharedPreferences( in getString() local 71 return prefs.getString(key, defaultValue); in getString() 83 final SharedPreferences prefs = mContext.getSharedPreferences( in putInt() local 85 final SharedPreferences.Editor editor = prefs.edit(); in putInt() [all …]
|
/packages/apps/MusicFX/src/com/android/musicfx/ |
D | ControlPanelEffect.java | 159 final SharedPreferences prefs = context.getSharedPreferences(packageName, in initEffectsPreferences() local 161 final SharedPreferences.Editor editor = prefs.edit(); in initEffectsPreferences() 167 final boolean isGlobalEnabled = prefs.getBoolean(Key.global_enabled.toString(), in initEffectsPreferences() 173 final boolean isVIEnabled = prefs.getBoolean(Key.virt_enabled.toString(), in initEffectsPreferences() 176 final int vIStrength = prefs.getInt(Key.virt_strength.toString(), in initEffectsPreferences() 199 final boolean isBBEnabled = prefs.getBoolean(Key.bb_enabled.toString(), in initEffectsPreferences() 201 final int bBStrength = prefs.getInt(Key.bb_strength.toString(), in initEffectsPreferences() 259 mEQPresetNames[preset] = prefs.getString( in initEffectsPreferences() 279 final short eQPreset = (short) prefs.getInt(Key.eq_current_preset.toString(), in initEffectsPreferences() 293 bandLevel[band] = (short) prefs.getInt( in initEffectsPreferences() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/ |
D | UsbDetailsFunctionsControllerTest.java | 112 List<RadioButtonPreference> prefs = getRadioPreferences(); in displayRefresh_allAllowed_shouldCreatePrefs() local 115 for (RadioButtonPreference pref : prefs) { in displayRefresh_allAllowed_shouldCreatePrefs() 138 List<RadioButtonPreference> prefs = getRadioPreferences(); in displayRefresh_onlyMidiAllowed_shouldCreateOnlyMidiPref() local 139 assertThat(prefs.size()).isEqualTo(1); in displayRefresh_onlyMidiAllowed_shouldCreateOnlyMidiPref() 140 assertThat(prefs.get(0).getKey()) in displayRefresh_onlyMidiAllowed_shouldCreateOnlyMidiPref() 150 List<RadioButtonPreference> prefs = getRadioPreferences(); in displayRefresh_mtpEnabled_shouldCheckSwitches() local 152 assertThat(prefs.get(0).getKey()) in displayRefresh_mtpEnabled_shouldCheckSwitches() 154 assertThat(prefs.get(0).isChecked()).isTrue(); in displayRefresh_mtpEnabled_shouldCheckSwitches() 164 List<RadioButtonPreference> prefs = getRadioPreferences(); in onClickMtp_noneEnabled_shouldEnableMtp() local 165 prefs.get(0).performClick(); in onClickMtp_noneEnabled_shouldEnableMtp() [all …]
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | QuickResponseUtils.java | 64 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 133 String currentValue1 = prefs.getString(QuickResponseUtils.KEY_CANNED_RESPONSE_PREF_1, ""); in maybeResetQuickResponses() 135 prefs.edit().remove(QuickResponseUtils.KEY_CANNED_RESPONSE_PREF_1).apply(); in maybeResetQuickResponses() 141 String currentValue2 = prefs.getString(QuickResponseUtils.KEY_CANNED_RESPONSE_PREF_2, ""); in maybeResetQuickResponses() [all …]
|
/packages/apps/Traceur/src/com/android/traceur/ |
D | Receiver.java | 74 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in onReceive() local 84 … prefs.edit().putBoolean(context.getString(R.string.pref_key_tracing_on), false).commit(); in onReceive() 100 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in updateTracing() local 102 prefs.getBoolean(context.getString(R.string.pref_key_tracing_on), false); in updateTracing() 109 Set<String> activeAvailableTags = getActiveTags(context, prefs, true); in updateTracing() 110 Set<String> activeTags = getActiveTags(context, prefs, false); in updateTracing() 113 postCategoryNotification(context, prefs); in updateTracing() 117 prefs.getString(context.getString(R.string.pref_key_buffer_size), in updateTracing() 120 … boolean appTracing = prefs.getBoolean(context.getString(R.string.pref_key_apps), true); in updateTracing() 121 … boolean longTrace = prefs.getBoolean(context.getString(R.string.pref_key_long_traces), true); in updateTracing() [all …]
|
/packages/apps/Car/tests/TestMediaApp/src/com/android/car/media/testmediaapp/prefs/ |
D | TmaPrefsFragment.java | 17 package com.android.car.media.testmediaapp.prefs; 27 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaAccountType; 28 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaBrowseNodeType; 29 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaLoginEventOrder; 30 import com.android.car.media.testmediaapp.prefs.TmaEnumPrefs.TmaReplyDelay; 31 import com.android.car.media.testmediaapp.prefs.TmaPrefs.PrefEntry; 39 TmaPrefs prefs = TmaPrefs.getInstance(context); in onCreatePreferences() local 42 screen.addPreference(createEnumPref(context, "Account Type", prefs.mAccountType, in onCreatePreferences() 44 screen.addPreference(createEnumPref(context, "Root node type", prefs.mRootNodeType, in onCreatePreferences() 46 screen.addPreference(createEnumPref(context, "Root reply delay", prefs.mRootReplyDelay, in onCreatePreferences() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
D | KeyboardTheme.java | 115 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() 170 final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in getKeyboardTheme() local 172 return getKeyboardTheme(prefs, BuildCompatUtils.EFFECTIVE_SDK_INT, availableThemeArray); in getKeyboardTheme() 195 static KeyboardTheme getKeyboardTheme(final SharedPreferences prefs, final int sdkVersion, in getKeyboardTheme() argument [all …]
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | Utils.java | 219 SharedPreferences prefs = GeneralPreferences.getSharedPreferences(activity); in getViewTypeFromIntentAndSharedPref() local 227 return prefs.getInt(GeneralPreferences.KEY_DETAILED_VIEW, in getViewTypeFromIntentAndSharedPref() 236 return prefs.getInt( in getViewTypeFromIntentAndSharedPref() 301 public static boolean getDefaultVibrate(Context context, SharedPreferences prefs) { in getDefaultVibrate() argument 303 if (prefs.contains(KEY_ALERTS_VIBRATE_WHEN)) { in getDefaultVibrate() 308 String vibrateWhen = prefs.getString(KEY_ALERTS_VIBRATE_WHEN, null); in getDefaultVibrate() 311 prefs.edit().remove(KEY_ALERTS_VIBRATE_WHEN).commit(); in getDefaultVibrate() 315 vibrate = prefs.getBoolean(GeneralPreferences.KEY_ALERTS_VIBRATE, in getDefaultVibrate() 322 SharedPreferences prefs = GeneralPreferences.getSharedPreferences(context); in getSharedPreference() local 323 Set<String> ss = prefs.getStringSet(key, null); in getSharedPreference() [all …]
|
D | CalendarUtils.java | 126 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() 330 public static void setSharedPreference(SharedPreferences prefs, String key, String value) { in setSharedPreference() argument [all …]
|
/packages/services/Telephony/src/com/android/phone/settings/ |
D | VoicemailProviderSettingsUtil.java | 55 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 …]
|
/packages/apps/Dialer/java/com/android/voicemail/impl/settings/ |
D | VisualVoicemailSettingsUtil.java | 139 VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phoneAccount); in isEnabled() local 140 if (prefs.contains(IS_ENABLED_KEY)) { in isEnabled() 143 return prefs.getBoolean(IS_ENABLED_KEY, false); in isEnabled() 151 VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phoneAccount); in isArchiveEnabled() local 152 return prefs.getBoolean(ARCHIVE_ENABLED_KEY, false); in isArchiveEnabled() 159 VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phoneAccount); in isVoicemailTranscriptionEnabled() local 160 return prefs.getBoolean(TRANSCRIBE_VOICEMAILS_KEY, false); in isVoicemailTranscriptionEnabled() 167 VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phoneAccount); in isVoicemailDonationEnabled() local 168 return prefs.getBoolean(DONATE_VOICEMAILS_KEY, false); in isVoicemailDonationEnabled() 181 VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phoneAccount); in isEnabledUserSet() local [all …]
|
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastConfigService.java | 110 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); in enableCellBroadcastChannels() local 117 boolean enableAlertsMasterToggle = prefs.getBoolean( in enableCellBroadcastChannels() 126 boolean enableCmasExtremeAlerts = enableAlertsMasterToggle && prefs.getBoolean( in enableCellBroadcastChannels() 129 boolean enableCmasSevereAlerts = enableAlertsMasterToggle && prefs.getBoolean( in enableCellBroadcastChannels() 132 boolean enableCmasAmberAlerts = enableAlertsMasterToggle && prefs.getBoolean( in enableCellBroadcastChannels() 137 && prefs.getBoolean(CellBroadcastSettings.KEY_ENABLE_TEST_ALERTS, false); in enableCellBroadcastChannels() 141 && prefs.getBoolean(CellBroadcastSettings.KEY_ENABLE_AREA_UPDATE_INFO_ALERTS, in enableCellBroadcastChannels() 145 && prefs.getBoolean(CellBroadcastSettings.KEY_ENABLE_PUBLIC_SAFETY_MESSAGES, in enableCellBroadcastChannels() 148 && prefs.getBoolean(CellBroadcastSettings.KEY_ENABLE_STATE_LOCAL_TEST_ALERTS, in enableCellBroadcastChannels() 151 boolean enableEmergencyAlerts = enableAlertsMasterToggle && prefs.getBoolean( in enableCellBroadcastChannels()
|