Home
last modified time | relevance | path

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

1234

/aosp12/packages/apps/Dialer/java/com/android/dialer/promotion/impl/
H A DDuoPromotion.java46 private final SharedPreferences sharedPreferences; field in DuoPromotion
53 @Unencrypted SharedPreferences sharedPreferences) { in DuoPromotion() argument
57 this.sharedPreferences = sharedPreferences; in DuoPromotion()
78 if (sharedPreferences.getBoolean(SHARED_PREF_KEY_DUO_DISCLOSURE_DISMISSED, false)) { in isEligibleToBeShown()
84 if (!sharedPreferences.contains(SHARED_PREF_KEY_DUO_DISCLOSURE_FIRST_VIEW_TIME_MILLIS)) { in isEligibleToBeShown()
91 sharedPreferences.getLong(SHARED_PREF_KEY_DUO_DISCLOSURE_FIRST_VIEW_TIME_MILLIS, 0); in isEligibleToBeShown()
99 if (!sharedPreferences.contains(SHARED_PREF_KEY_DUO_DISCLOSURE_FIRST_VIEW_TIME_MILLIS)) { in onViewed()
100 sharedPreferences in onViewed()
110 sharedPreferences.edit().putBoolean(SHARED_PREF_KEY_DUO_DISCLOSURE_DISMISSED, true).apply(); in dismiss()
H A DRttPromotion.java36 private final SharedPreferences sharedPreferences; field in RttPromotion
47 @Unencrypted SharedPreferences sharedPreferences, in RttPromotion() argument
50 this.sharedPreferences = sharedPreferences; in RttPromotion()
56 return sharedPreferences.getBoolean(SHARED_PREFERENCE_KEY_ENABLED, false) in isEligibleToBeShown()
57 && !sharedPreferences.getBoolean(SHARED_PREFERENCE_KEY_DISMISSED, false); in isEligibleToBeShown()
92 sharedPreferences.edit().putBoolean(SHARED_PREFERENCE_KEY_DISMISSED, true).apply(); in dismiss()
/aosp12/packages/apps/Dialer/java/com/android/dialer/configprovider/
H A DSharedPrefConfigProvider.java55 private final SharedPreferences sharedPreferences; field in SharedPrefConfigProvider
58 SharedPrefConfigProvider(@Unencrypted SharedPreferences sharedPreferences) { in SharedPrefConfigProvider() argument
59 this.sharedPreferences = sharedPreferences; in SharedPrefConfigProvider()
98 sharedPreferences.edit().putBoolean(PREF_PREFIX + key, value).apply(); in putBoolean()
102 sharedPreferences.edit().putLong(PREF_PREFIX + key, value).apply(); in putLong()
106 sharedPreferences.edit().putString(PREF_PREFIX + key, value).apply(); in putString()
113 () -> sharedPreferences.getString(PREF_PREFIX + key, defaultValue)); in getString()
119 return StrictModeUtils.bypass(() -> sharedPreferences.getLong(PREF_PREFIX + key, defaultValue)); in getLong()
126 () -> sharedPreferences.getBoolean(PREF_PREFIX + key, defaultValue)); in getBoolean()
/aosp12/packages/apps/Dialer/java/com/android/dialer/contacts/displaypreference/
H A DContactDisplayPreferencesImpl.java33 private final SharedPreferences sharedPreferences; field in ContactDisplayPreferencesImpl
42 this.sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); in ContactDisplayPreferencesImpl()
50 if (!sharedPreferences.contains(displayOrderKey)) { in getDisplayOrder()
53 return DisplayOrder.fromValue(appContext, sharedPreferences.getString(displayOrderKey, null)); in getDisplayOrder()
58 sharedPreferences.edit().putString(displayOrderKey, displayOrder.getValue(appContext)).apply(); in setDisplayOrder()
64 if (!sharedPreferences.contains(sortOrderKey)) { in getSortOrder()
67 return SortOrder.fromValue(appContext, sharedPreferences.getString(sortOrderKey, null)); in getSortOrder()
72 sharedPreferences.edit().putString(sortOrderKey, sortOrder.getValue(appContext)).apply(); in setSortOrder()
90 sharedPreferences in migrate()
/aosp12/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
H A DColorPaletteHelper.java45 ManagedProvisioningSharedPreferences sharedPreferences) { in createColorPaletteMap() argument
47 result.put(COLOR_TYPE_ACCENT, sharedPreferences.getAccentColor()); in createColorPaletteMap()
48 result.put(COLOR_TYPE_PRIMARY_TEXT, sharedPreferences.getTextPrimaryColor()); in createColorPaletteMap()
49 result.put(COLOR_TYPE_SECONDARY_TEXT, sharedPreferences.getTextSecondaryColor()); in createColorPaletteMap()
50 result.put(COLOR_TYPE_BACKGROUND_SURFACE, sharedPreferences.getBackgroundColor()); in createColorPaletteMap()
52 sharedPreferences.getNotificationBackgroundColor()); in createColorPaletteMap()
53 result.put(COLOR_TYPE_NAVIGATION_BAR_COLOR, sharedPreferences.getNavigationBarColor()); in createColorPaletteMap()
55 sharedPreferences.getNavigationBarDividerColor()); in createColorPaletteMap()
/aosp12/packages/apps/Calendar/tests/src/com/android/calendar/
H A DDbTestUtils.java46 private final FakeSharedPreferences sharedPreferences; field in DbTestUtils
52 private SharedPreferences sharedPreferences; field in DbTestUtils.FakeContext
73 public void setSharedPreferences(SharedPreferences sharedPreferences) { in setSharedPreferences() argument
74 this.sharedPreferences = sharedPreferences; in setSharedPreferences()
79 if (sharedPreferences != null) { in getSharedPreferences()
80 return sharedPreferences; in getSharedPreferences()
180 this.sharedPreferences = new FakeSharedPreferences(); in DbTestUtils()
182 context.setSharedPreferences(sharedPreferences); in DbTestUtils()
198 return sharedPreferences; in getMockSharedPreferences()
/aosp12/packages/apps/Dialer/java/com/android/dialer/calllog/
H A DCallLogState.java35 private final SharedPreferences sharedPreferences; field in CallLogState
41 @Unencrypted SharedPreferences sharedPreferences, in CallLogState()
43 this.sharedPreferences = sharedPreferences; in CallLogState()
53 sharedPreferences.edit().putBoolean(ANNOTATED_CALL_LOG_BUILT_PREF, true).apply(); in markBuilt()
62 sharedPreferences.edit().remove(ANNOTATED_CALL_LOG_BUILT_PREF).apply(); in clearData()
74 () -> sharedPreferences.getBoolean(ANNOTATED_CALL_LOG_BUILT_PREF, false)); in isBuilt()
H A DAnnotatedCallLogMigrator.java37 private final SharedPreferences sharedPreferences; field in AnnotatedCallLogMigrator
43 @Unencrypted SharedPreferences sharedPreferences, in AnnotatedCallLogMigrator()
46 this.sharedPreferences = sharedPreferences; in AnnotatedCallLogMigrator()
66 sharedPreferences.edit().putBoolean(PREF_MIGRATED, true).apply(); in migrate()
75 return backgroundExecutor.submit(() -> !sharedPreferences.getBoolean(PREF_MIGRATED, false));
86 sharedPreferences.edit().remove(PREF_MIGRATED).apply();
H A DRefreshAnnotatedCallLogWorker.java53 private final SharedPreferences sharedPreferences; field in RefreshAnnotatedCallLogWorker
68 @Unencrypted SharedPreferences sharedPreferences, in RefreshAnnotatedCallLogWorker() argument
77 this.sharedPreferences = sharedPreferences; in RefreshAnnotatedCallLogWorker()
122 sharedPreferences.getBoolean(SharedPrefKeys.FORCE_REBUILD, true); in checkDirtyAndRebuildIfNecessary()
244 sharedPreferences.edit().putBoolean(SharedPrefKeys.FORCE_REBUILD, false).apply(); in rebuild()
/aosp12/packages/apps/Dialer/java/com/android/dialer/calllog/config/
H A DCallLogConfigImpl.java66 private final SharedPreferences sharedPreferences; field in CallLogConfigImpl
74 @Unencrypted SharedPreferences sharedPreferences, in CallLogConfigImpl() argument
79 this.sharedPreferences = sharedPreferences; in CallLogConfigImpl()
103 sharedPreferences in update()
122 sharedPreferences in update()
140 sharedPreferences in update()
157 return sharedPreferences.getBoolean(NEW_CALL_LOG_FRAGMENT_ENABLED_PREF_KEY, false);
162 return sharedPreferences.getBoolean(NEW_VOICEMAIL_FRAGMENT_ENABLED_PREF_KEY, false);
167 return sharedPreferences.getBoolean(NEW_PEER_ENABLED_PREF_KEY, false);
176 return sharedPreferences.getBoolean(NEW_CALL_LOG_FRAMEWORK_ENABLED_PREF_KEY, false);
/aosp12/packages/apps/Dialer/java/com/android/dialer/calllog/notifier/
H A DRefreshAnnotatedCallLogNotifier.java44 private final SharedPreferences sharedPreferences; field in RefreshAnnotatedCallLogNotifier
48 @ApplicationContext Context appContext, @Unencrypted SharedPreferences sharedPreferences) { in RefreshAnnotatedCallLogNotifier() argument
50 this.sharedPreferences = sharedPreferences; in RefreshAnnotatedCallLogNotifier()
61 sharedPreferences.edit().putBoolean(SharedPrefKeys.FORCE_REBUILD, true).apply(); in markDirtyAndNotify()
/aosp12/packages/apps/Dialer/java/com/android/dialer/phonelookup/spam/
H A DSpamPhoneLookup.java49 private final SharedPreferences sharedPreferences; field in SpamPhoneLookup
58 @Unencrypted SharedPreferences sharedPreferences, in SpamPhoneLookup() argument
62 this.sharedPreferences = sharedPreferences; in SpamPhoneLookup()
81 () -> sharedPreferences.getLong(PREF_LAST_TIMESTAMP_PROCESSED, 0L)); in isDirty()
144 sharedPreferences in onSuccessfulBulkUpdate()
166 sharedPreferences.edit().remove(PREF_LAST_TIMESTAMP_PROCESSED).apply();
/aosp12/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/
H A DCryptoSettings.java73 SharedPreferences sharedPreferences = in getInstance() local
75 return new CryptoSettings(sharedPreferences, context); in getInstance()
85 SharedPreferences sharedPreferences = in getInstanceForTesting() local
87 return new CryptoSettings(sharedPreferences, context); in getInstanceForTesting()
90 private CryptoSettings(SharedPreferences sharedPreferences, Context context) { in CryptoSettings() argument
91 mSharedPreferences = Objects.requireNonNull(sharedPreferences); in CryptoSettings()
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
H A DCustomTileStatePersisterTest.kt70 private lateinit var sharedPreferences: SharedPreferences
83 .thenReturn(sharedPreferences)
84 `when`(sharedPreferences.edit()).thenReturn(editor)
117 `when`(sharedPreferences.getString(eq(KEY.toString()), any()))
125 `when`(sharedPreferences.getString(any(), any())).thenAnswer {
147 `when`(sharedPreferences.getString(eq(KEY.toString()), any()))
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/external/
H A DCustomTileStatePersister.kt52 private val sharedPreferences = context.getSharedPreferences(FILE_NAME, 0) regex
62 val state = sharedPreferences.getString(key.toString(), null) ?: return null
79 sharedPreferences.edit().putString(key.toString(), state).apply()
88 sharedPreferences.edit().remove(key.toString()).apply()
/aosp12/packages/apps/Dialer/java/com/android/dialer/persistentlog/
H A DPersistentLogFileHandler.java73 private SharedPreferences sharedPreferences; field in PersistentLogFileHandler
95 if (sharedPreferences == null && UserManagerCompat.isUserUnlocked(context)) { in initializeSharedPreference()
96 sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); in initializeSharedPreference()
99 return sharedPreferences != null; in initializeSharedPreference()
268 int index = sharedPreferences.getInt(getNextFileKey(), 0); in getAndIncrementNextFileIndex()
269 sharedPreferences.edit().putInt(getNextFileKey(), index + 1).commit(); in getAndIncrementNextFileIndex()
/aosp12/packages/apps/Settings/src/com/android/settings/bluetooth/
H A DLocalBluetoothPreferences.java81 SharedPreferences sharedPreferences = getSharedPreferences(context); in shouldShowDialogInForeground() local
84 long lastDiscoverableEndTime = sharedPreferences.getLong( in shouldShowDialogInForeground()
105 String lastSelectedDevice = sharedPreferences.getString( in shouldShowDialogInForeground()
109 long lastDeviceSelectedTime = sharedPreferences.getLong( in shouldShowDialogInForeground()
/aosp12/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/provisioning/
H A DProvisioningActivity.java167 ManagedProvisioningSharedPreferences sharedPreferences = in writeSharedPreferences() local
169 sharedPreferences.writeNavigationBarColor(getWindow().getNavigationBarColor()); in writeSharedPreferences()
170 sharedPreferences.writeNavigationBarDividerColor( in writeSharedPreferences()
172 sharedPreferences.writeTextPrimaryColor(mUtils.getTextPrimaryColor(this)); in writeSharedPreferences()
173 sharedPreferences.writeTextSecondaryColor(mUtils.getTextSecondaryColor(this)); in writeSharedPreferences()
174 sharedPreferences.writeBackgroundColor(mUtils.getBackgroundColor(this)); in writeSharedPreferences()
175 sharedPreferences.writeAccentColor(mUtils.getAccentColor(this)); in writeSharedPreferences()
176 sharedPreferences.writeNotificationBackgroundColor( in writeSharedPreferences()
/aosp12/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/analytics/
H A DAnalyticsUtils.java211 static long getProvisioningTime(ManagedProvisioningSharedPreferences sharedPreferences) { in getProvisioningTime() argument
212 return getProvisioningTime(sharedPreferences, SystemClock::elapsedRealtime); in getProvisioningTime()
216 static long getProvisioningTime(ManagedProvisioningSharedPreferences sharedPreferences, in getProvisioningTime() argument
218 if (sharedPreferences.getProvisioningStartedTimestamp() == 0) { in getProvisioningTime()
221 return getTimeFunction.getAsLong() - sharedPreferences.getProvisioningStartedTimestamp(); in getProvisioningTime()
/aosp12/packages/apps/Contacts/tests/src/com/android/contacts/tests/quickcontact/
H A 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()
/aosp12/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
H A DBluetoothUtils.java113 SharedPreferences sharedPreferences = getSharedPreferences(context); in shouldShowDialogInForeground() local
116 long lastDiscoverableEndTime = sharedPreferences.getLong( in shouldShowDialogInForeground()
137 String lastSelectedDevice = sharedPreferences.getString( in shouldShowDialogInForeground()
141 long lastDeviceSelectedTime = sharedPreferences.getLong( in shouldShowDialogInForeground()
/aosp12/packages/apps/Messaging/src/com/android/messaging/ui/appsettings/
H A 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()
/aosp12/frameworks/opt/net/ims/src/java/com/android/ims/rcs/uce/util/
H A DUceUtils.java277 SharedPreferences sharedPreferences = in saveDeviceStateToPreference() local
279 SharedPreferences.Editor editor = sharedPreferences.edit(); in saveDeviceStateToPreference()
286 SharedPreferences sharedPreferences = in restoreDeviceState() local
289 String sharedPrefValue = sharedPreferences.getString(sharedPrefKey, ""); in restoreDeviceState()
319 SharedPreferences sharedPreferences = in removeDeviceStateFromPreference() local
321 SharedPreferences.Editor editor = sharedPreferences.edit(); in removeDeviceStateFromPreference()
/aosp12/packages/apps/Dialer/java/com/android/incallui/answer/impl/hint/
H A DAnswerHintFactory.java75 SharedPreferences sharedPreferences = StorageComponent.get(context).unencryptedSharedPrefs(); in increaseAnsweredCount() local
76 int answeredCount = sharedPreferences.getInt(ANSWERED_COUNT_PREFERENCE_KEY, 0); in increaseAnsweredCount()
77 sharedPreferences.edit().putInt(ANSWERED_COUNT_PREFERENCE_KEY, answeredCount + 1).apply(); in increaseAnsweredCount()
/aosp12/packages/apps/Dialer/java/com/android/dialer/blocking/
H A DBlockedNumbersAutoMigrator.java109 SharedPreferences sharedPreferences = in doInBackground() local
112 if (sharedPreferences.contains(HAS_CHECKED_AUTO_MIGRATE_KEY)) { in doInBackground()
127 sharedPreferences.edit().putBoolean(HAS_CHECKED_AUTO_MIGRATE_KEY, true).apply(); in doInBackground()

1234