Home
last modified time | relevance | path

Searched refs:sharedPreferences (Results 1 – 25 of 42) sorted by relevance

12

/packages/apps/TvSettings/QuickSettings/src/com/android/tv/quicksettings/
DQuickSettingsPreferenceFragment.java85 final SharedPreferences sharedPreferences = getPreferenceManager().getSharedPreferences(); in onResume() local
86 sharedPreferences.registerOnSharedPreferenceChangeListener(this); in onResume()
87 sharedPreferences.registerOnSharedPreferenceChangeListener(mPresetSettingsListener); in onResume()
89 updateDescriptions(sharedPreferences); in onResume()
97 final SharedPreferences sharedPreferences = getPreferenceManager().getSharedPreferences(); in onPause() local
98 sharedPreferences.unregisterOnSharedPreferenceChangeListener(this); in onPause()
99 sharedPreferences.unregisterOnSharedPreferenceChangeListener(mPresetSettingsListener); in onPause()
102 private void updateDescriptions(SharedPreferences sharedPreferences) { in updateDescriptions() argument
105 mBacklightPref.setSummary(String.format("%d", sharedPreferences.getInt("backlight", in updateDescriptions()
107 mContrastPref.setSummary(String.format("%d", sharedPreferences.getInt("contrast", in updateDescriptions()
[all …]
DSetting.java38 public Setting(SharedPreferences sharedPreferences, String key, String title, int max) { in Setting() argument
39 mSharedPreferences = sharedPreferences; in Setting()
46 public Setting(SharedPreferences sharedPreferences, String key, String title) { in Setting() argument
47 mSharedPreferences = sharedPreferences; in Setting()
DPresetSettingsListener.java33 public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged() argument
37 final String preset = sharedPreferences.getString(key, "standard"); in onSharedPreferenceChanged()
59 final SharedPreferences.Editor prefs = sharedPreferences.edit(); in onSharedPreferenceChanged()
/packages/apps/Calendar/tests/src/com/android/calendar/
DDbTestUtils.java46 private final FakeSharedPreferences sharedPreferences; field in DbTestUtils
52 private SharedPreferences sharedPreferences; field in DbTestUtils.FakeContext
69 public void setSharedPreferences(SharedPreferences sharedPreferences) { in setSharedPreferences() argument
70 this.sharedPreferences = sharedPreferences; in setSharedPreferences()
75 if (sharedPreferences != null) { in getSharedPreferences()
76 return sharedPreferences; in getSharedPreferences()
176 this.sharedPreferences = new FakeSharedPreferences(); in DbTestUtils()
178 context.setSharedPreferences(sharedPreferences); in DbTestUtils()
194 return sharedPreferences; in getMockSharedPreferences()
/packages/apps/UnifiedEmail/src/com/android/mail/preferences/
DMailPrefs.java268 final SharedPreferences sharedPreferences = getSharedPreferences(); in getRemovalAction() local
270 sharedPreferences.getString(PreferenceKeys.REMOVAL_ACTION, null); in getRemovalAction()
274 return sharedPreferences.getString(PreferenceKeys.REMOVAL_ACTION, in getRemovalAction()
291 final SharedPreferences sharedPreferences = getSharedPreferences(); in getIsConversationListSwipeEnabled() local
292 return sharedPreferences.getBoolean(PreferenceKeys.CONVERSATION_LIST_SWIPE, true); in getIsConversationListSwipeEnabled()
384 final SharedPreferences sharedPreferences = getSharedPreferences(); in getDisplayImagesFromSender() local
387 final Set<String> currentPatterns = sharedPreferences.getStringSet( in getDisplayImagesFromSender()
434 final SharedPreferences sharedPreferences = getSharedPreferences(); in getSenderWhitelist() local
436 return sharedPreferences.getStringSet(PreferenceKeys.DISPLAY_IMAGES, defaultAddressSet); in getSenderWhitelist()
441 final SharedPreferences sharedPreferences = getSharedPreferences(); in getSenderWhitelistPatterns() local
[all …]
/packages/apps/Dialer/java/com/android/dialer/persistentlog/
DPersistentLogFileHandler.java66 private SharedPreferences sharedPreferences; field in PersistentLogFileHandler
88 if (sharedPreferences == null && UserManagerCompat.isUserUnlocked(context)) { in initializeSharedPreference()
89 sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); in initializeSharedPreference()
92 return sharedPreferences != null; in initializeSharedPreference()
215 int index = sharedPreferences.getInt(getNextFileKey(), 0); in getAndIncrementNextFileIndex()
216 sharedPreferences.edit().putInt(getNextFileKey(), index + 1).commit(); in getAndIncrementNextFileIndex()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/hint/
DAnswerHintFactory.java80 SharedPreferences sharedPreferences = in increaseAnsweredCount() local
82 int answeredCount = sharedPreferences.getInt(ANSWERED_COUNT_PREFERENCE_KEY, 0); in increaseAnsweredCount()
83 sharedPreferences.edit().putInt(ANSWERED_COUNT_PREFERENCE_KEY, answeredCount + 1).apply(); in increaseAnsweredCount()
90 SharedPreferences sharedPreferences, in shouldShowAnswerHint() argument
103 int answeredCount = sharedPreferences.getInt(ANSWERED_COUNT_PREFERENCE_KEY, 0); in shouldShowAnswerHint()
/packages/apps/Dialer/java/com/android/dialer/calllog/
DRefreshAnnotatedCallLogWorker.java71 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); in checkDirtyAndRebuildIfNecessary() local
73 sharedPreferences.getLong(CallLogFramework.PREF_LAST_REBUILD_TIMESTAMP_MILLIS, 0); in checkDirtyAndRebuildIfNecessary()
80 sharedPreferences.getBoolean(CallLogFramework.PREF_FORCE_REBUILD, false); in checkDirtyAndRebuildIfNecessary()
172 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); in rebuild() local
173 sharedPreferences in rebuild()
DCallLogFramework.java102 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); in markDirtyAndNotify() local
103 sharedPreferences.edit().putBoolean(PREF_FORCE_REBUILD, true).apply(); in markDirtyAndNotify()
/packages/apps/Messaging/src/com/android/messaging/ui/appsettings/
DApplicationSettingsActivity.java159 private void updateSoundSummary(final SharedPreferences sharedPreferences) { in updateSoundSummary() argument
164 String ringtoneString = sharedPreferences.getString(mRingtonePreferenceKey, null); in updateSoundSummary()
170 final SharedPreferences.Editor editor = sharedPreferences.edit(); in updateSoundSummary()
246 public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, in onSharedPreferenceChanged() argument
251 updateSoundSummary(sharedPreferences); in onSharedPreferenceChanged()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DLocalBluetoothPreferences.java82 SharedPreferences sharedPreferences = getSharedPreferences(context); in shouldShowDialogInForeground() local
85 long lastDiscoverableEndTime = sharedPreferences.getLong( in shouldShowDialogInForeground()
106 String lastSelectedDevice = sharedPreferences.getString( in shouldShowDialogInForeground()
110 long lastDeviceSelectedTime = sharedPreferences.getLong( in shouldShowDialogInForeground()
/packages/apps/Contacts/tests/src/com/android/contacts/tests/quickcontact/
DQuickContactTestsActivity.java87 final SharedPreferences sharedPreferences = getSharedPreferences(PREF_NAME, MODE_PRIVATE); in onCreate() local
88 final String uriString = sharedPreferences.getString(PREF_SETTING_URI, null); in onCreate()
113 final SharedPreferences sharedPreferences = getSharedPreferences(PREF_NAME, MODE_PRIVATE); in onDestroy() local
114 final Editor editor = sharedPreferences.edit(); in onDestroy()
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DTelephonyBackupAgent.java331 SharedPreferences sharedPreferences = getSharedPreferences(BACKUP_PREFS, MODE_PRIVATE); in onFullBackup() local
332 if (sharedPreferences.getLong(QUOTA_RESET_TIME, Long.MAX_VALUE) < in onFullBackup()
337 mBytesOverQuota = sharedPreferences.getLong(BACKUP_DATA_BYTES, 0) - in onFullBackup()
338 sharedPreferences.getLong(QUOTA_BYTES, Long.MAX_VALUE); in onFullBackup()
404 SharedPreferences sharedPreferences = getSharedPreferences(BACKUP_PREFS, MODE_PRIVATE); in onQuotaExceeded() local
405 if (sharedPreferences.contains(BACKUP_DATA_BYTES) in onQuotaExceeded()
406 && sharedPreferences.contains(QUOTA_BYTES)) { in onQuotaExceeded()
408 backupDataBytes += (sharedPreferences.getLong(BACKUP_DATA_BYTES, 0) in onQuotaExceeded()
409 - sharedPreferences.getLong(QUOTA_BYTES, 0)) * BYTES_OVER_QUOTA_MULTIPLIER; in onQuotaExceeded()
411 sharedPreferences.edit() in onQuotaExceeded()
/packages/apps/Dialer/java/com/android/dialer/blocking/
DBlockedNumbersAutoMigrator.java108 SharedPreferences sharedPreferences = in doInBackground() local
111 if (sharedPreferences.contains(HAS_CHECKED_AUTO_MIGRATE_KEY)) { in doInBackground()
126 sharedPreferences.edit().putBoolean(HAS_CHECKED_AUTO_MIGRATE_KEY, true).apply(); in doInBackground()
/packages/apps/Dialer/java/com/android/voicemail/impl/scheduling/
DTaskSchedulerJobService.java174 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); in createJobId() local
175 int jobId = sharedPreferences.getInt(NEXT_JOB_ID, 0); in createJobId()
176 sharedPreferences.edit().putInt(NEXT_JOB_ID, jobId + 1).apply(); in createJobId()
/packages/apps/EmergencyInfo/src/com/android/emergency/edit/
DEditInfoActivity.java139 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); in onClearAllPreferences() local
141 sharedPreferences.edit().remove(key).commit(); in onClearAllPreferences()
143 sharedPreferences.edit().remove(PreferenceKeys.KEY_EMERGENCY_CONTACTS).commit(); in onClearAllPreferences()
/packages/providers/PartnerBookmarksProvider/src/com/android/providers/partnerbookmarks/
DPartnerBookmarksProvider.java131 private final SharedPreferences sharedPreferences; field in PartnerBookmarksProvider.DatabaseHelper
135 sharedPreferences = context.getSharedPreferences( in DatabaseHelper()
149 sharedPreferences.getString(ACTIVE_CONFIGURATION_PREFNAME, null); in prepareForConfiguration()
160 Editor editor = sharedPreferences.edit(); in setActiveConfiguration()
/packages/apps/Dialer/java/com/android/contacts/common/testing/
DInjectedServices.java47 public void setSharedPreferences(SharedPreferences sharedPreferences) { in setSharedPreferences() argument
48 this.mSharedPreferences = sharedPreferences; in setSharedPreferences()
/packages/apps/Contacts/src/com/android/contacts/testing/
DInjectedServices.java45 public void setSharedPreferences(SharedPreferences sharedPreferences) { in setSharedPreferences() argument
46 this.mSharedPreferences = sharedPreferences; in setSharedPreferences()
/packages/apps/EmergencyInfo/src/com/android/emergency/view/
DViewEmergencyInfoFragment.java74 SharedPreferences sharedPreferences = in hasAtLeastOnePreferenceSet() local
77 if (!TextUtils.isEmpty(sharedPreferences.getString(key, ""))) { in hasAtLeastOnePreferenceSet()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
DSpellCheckerSettingsFragment.java59 public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged() argument
64 if (!sharedPreferences.getBoolean(key, false)) { in onSharedPreferenceChanged()
/packages/apps/TV/src/com/android/tv/
DTvApplication.java201 SharedPreferences sharedPreferences = this.getSharedPreferences( in checkTunerServiceOnFirstLaunch() local
203 boolean isFirstLaunch = sharedPreferences.getBoolean(PREFERENCE_IS_FIRST_LAUNCH, true); in checkTunerServiceOnFirstLaunch()
207 SharedPreferences.Editor editor = sharedPreferences.edit(); in checkTunerServiceOnFirstLaunch()
/packages/apps/Calendar/src/com/android/calendar/
DGeneralPreferences.java152 final SharedPreferences sharedPreferences = getSharedPreferences(activity); in onCreate() local
222 migrateOldPreferences(sharedPreferences); in onCreate()
280 public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged() argument
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/
DCorrectionSettingsFragment.java120 …public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key)… in onSharedPreferenceChanged() argument
124 if (!sharedPreferences.getBoolean(key, false)) { in onSharedPreferenceChanged()
/packages/apps/Dialer/java/com/android/contacts/common/location/
DCountryDetector.java171 final SharedPreferences sharedPreferences = in getLocationBasedCountryIso() local
173 return sharedPreferences.getString(KEY_PREFERENCE_CURRENT_COUNTRY, null); in getLocationBasedCountryIso()

12