/packages/apps/Dialer/java/com/android/dialer/promotion/impl/ |
D | DuoPromotion.java | 46 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()
|
D | RttPromotion.java | 36 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()
|
/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/shared/spe/logging/ |
D | JobServiceLoggerTest.java | 106 SharedPreferences sharedPreferences = in testPersistJobExecutionData_firstExecution() local 113 sharedPreferences.getLong( in testPersistJobExecutionData_firstExecution() 116 expect.that(sharedPreferences.getLong(keyExecutionPeriod, UNAVAILABLE_JOB_EXECUTION_PERIOD)) in testPersistJobExecutionData_firstExecution() 133 SharedPreferences sharedPreferences = in testPersistJobExecutionData_openEndedLastExecution() local 135 SharedPreferences.Editor editor = sharedPreferences.edit(); in testPersistJobExecutionData_openEndedLastExecution() 161 sharedPreferences.getLong( in testPersistJobExecutionData_openEndedLastExecution() 164 expect.that(sharedPreferences.getLong(keyExecutionPeriod, UNAVAILABLE_JOB_EXECUTION_PERIOD)) in testPersistJobExecutionData_openEndedLastExecution() 179 SharedPreferences sharedPreferences = in testPersistJobExecutionData_closeEndedLastExecution() local 181 SharedPreferences.Editor editor = sharedPreferences.edit(); in testPersistJobExecutionData_closeEndedLastExecution() 206 sharedPreferences.getLong( in testPersistJobExecutionData_closeEndedLastExecution() [all …]
|
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/hibernation/ |
D | HibernationPolicyTest.kt | 71 private lateinit var sharedPreferences: SharedPreferences variable in com.android.permissioncontroller.tests.mocking.hibernation.HibernationPolicyTest 87 sharedPreferences = in setup() 90 `when`(context.getSharedPreferences(anyString(), anyInt())).thenReturn(sharedPreferences) in setup() 112 sharedPreferences.getLong( in onReceive_shouldInitializeAndAdjustStartTimeOfUnusedAppTracking() 117 sharedPreferences.getLong(PREF_KEY_BOOT_TIME_SNAPSHOT, SNAPSHOT_UNINITIALIZED) in onReceive_shouldInitializeAndAdjustStartTimeOfUnusedAppTracking() 119 sharedPreferences.getLong(PREF_KEY_ELAPSED_REALTIME_SNAPSHOT, SNAPSHOT_UNINITIALIZED) in onReceive_shouldInitializeAndAdjustStartTimeOfUnusedAppTracking() 138 assertThat(getStartTimeOfUnusedAppTracking(sharedPreferences)) in getStartTimeOfUnusedAppTracking_shouldReturnExpectedValue() 142 sharedPreferences.getLong(PREF_KEY_BOOT_TIME_SNAPSHOT, SNAPSHOT_UNINITIALIZED) in getStartTimeOfUnusedAppTracking_shouldReturnExpectedValue() 143 sharedPreferences in getStartTimeOfUnusedAppTracking_shouldReturnExpectedValue() 147 assertThat(getStartTimeOfUnusedAppTracking(sharedPreferences)) in getStartTimeOfUnusedAppTracking_shouldReturnExpectedValue() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/configprovider/ |
D | SharedPrefConfigProvider.java | 55 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()
|
/packages/apps/Dialer/java/com/android/dialer/contacts/displaypreference/ |
D | ContactDisplayPreferencesImpl.java | 33 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()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
D | ColorPaletteHelper.java | 45 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()
|
/packages/apps/Calendar/tests/src/com/android/calendar/ |
D | DbTestUtils.java | 46 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()
|
/packages/apps/Dialer/java/com/android/dialer/calllog/ |
D | CallLogState.java | 35 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()
|
D | AnnotatedCallLogMigrator.java | 37 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();
|
/packages/apps/Dialer/java/com/android/dialer/calllog/config/ |
D | CallLogConfigImpl.java | 66 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);
|
/packages/modules/AdServices/sdksandbox/tests/manual-test-apps/SdkSandboxClient/src/com/android/sdksandboxclient/ |
D | BannerOptions.java | 102 public static BannerOptions fromSharedPreferences(SharedPreferences sharedPreferences) { in fromSharedPreferences() argument 104 ViewType.valueOf(sharedPreferences.getString("banner_view_type", "")), in fromSharedPreferences() 105 sharedPreferences.getString("banner_video_url", ""), in fromSharedPreferences() 106 OnClick.valueOf(sharedPreferences.getString("banner_on_click", "")), in fromSharedPreferences() 107 sharedPreferences.getString("package_to_open", ""), in fromSharedPreferences() 108 Placement.valueOf(sharedPreferences.getString("banner_placement", "")), in fromSharedPreferences() 109 AdSize.valueOf(sharedPreferences.getString("banner_ad_size", ""))); in fromSharedPreferences()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/consent/ |
D | AdExtDataConsentMigrationUtilsV2.java | 74 SharedPreferences sharedPreferences = in handleConsentMigrationFromAdExtDataIfNeededV2() local 82 context, sharedPreferences, transferStorage, adExtDataManager)) { in handleConsentMigrationFromAdExtDataIfNeededV2() 96 SharedPreferences.Editor editor = sharedPreferences.edit(); in handleConsentMigrationFromAdExtDataIfNeededV2() 128 SharedPreferences sharedPreferences, in isMigrationFromAdExtDataNeededV2() argument 156 if (isMigrationDone(sharedPreferences)) { in isMigrationFromAdExtDataNeededV2() 238 private static boolean isMigrationDone(SharedPreferences sharedPreferences) { in isMigrationDone() argument 239 return sharedPreferences.getBoolean( in isMigrationDone() 242 || sharedPreferences.getBoolean( in isMigrationDone() 244 || sharedPreferences.getBoolean( in isMigrationDone() 247 || sharedPreferences.getBoolean( in isMigrationDone()
|
D | AdExtDataConsentMigrationUtils.java | 75 SharedPreferences sharedPreferences = in handleConsentMigrationFromAdExtDataIfNeeded() local 82 sharedPreferences, in handleConsentMigrationFromAdExtDataIfNeeded() 99 SharedPreferences.Editor editor = sharedPreferences.edit(); in handleConsentMigrationFromAdExtDataIfNeeded() 131 SharedPreferences sharedPreferences, in isMigrationFromAdExtDataNeeded() argument 159 if (isMigrationDone(sharedPreferences)) { in isMigrationFromAdExtDataNeeded() 266 private static boolean isMigrationDone(SharedPreferences sharedPreferences) { in isMigrationDone() argument 267 return sharedPreferences.getBoolean( in isMigrationDone() 270 || sharedPreferences.getBoolean( in isMigrationDone() 272 || sharedPreferences.getBoolean( in isMigrationDone() 275 || sharedPreferences.getBoolean( in isMigrationDone()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/ |
D | DatabaseUtils.java | 814 final SharedPreferences sharedPreferences = getSharedPreferences(context); in removeUsageSource() local 815 if (sharedPreferences != null && sharedPreferences.contains(KEY_LAST_USAGE_SOURCE)) { in removeUsageSource() 816 sharedPreferences.edit().remove(KEY_LAST_USAGE_SOURCE).apply(); in removeUsageSource() 826 final SharedPreferences sharedPreferences = getSharedPreferences(context); in getUsageSource() local 827 if (sharedPreferences != null && sharedPreferences.contains(KEY_LAST_USAGE_SOURCE)) { in getUsageSource() 828 return sharedPreferences.getInt( in getUsageSource() 838 if (sharedPreferences != null) { in getUsageSource() 839 sharedPreferences.edit().putInt(KEY_LAST_USAGE_SOURCE, usageSource).apply(); in getUsageSource() 845 final SharedPreferences sharedPreferences = getSharedPreferences(context); in removeDismissedPowerAnomalyKeys() local 846 if (sharedPreferences != null in removeDismissedPowerAnomalyKeys() [all …]
|
D | AppOptModeSharedPreferencesUtils.kt | 185 val sharedPreferences = getSharedPreferences(context) in <lambda>() constant 186 val allKeys = sharedPreferences.all?.keys ?: emptySet() in <lambda>() 192 sharedPreferences.getString(key, null)?.let { in <lambda>() 203 val sharedPreferences = getSharedPreferences(context) in <lambda>() constant 204 sharedPreferences.edit().run { in <lambda>() 213 val sharedPreferences = getSharedPreferences(context) in <lambda>() constant 214 sharedPreferences.edit().run { in <lambda>()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryOptimizeLogUtils.java | 48 SharedPreferences sharedPreferences, in writeLog() argument 53 sharedPreferences, in writeLog() 63 SharedPreferences sharedPreferences, BatteryOptimizeHistoricalLogEntry logEntry) { in writeLog() argument 65 parseLogFromString(sharedPreferences.getString(LOGS_KEY, "")); in writeLog() 75 sharedPreferences.edit().putString(LOGS_KEY, loggingContent).apply(); in writeLog() 90 SharedPreferences sharedPreferences, PrintWriter writer) { in printBatteryOptimizeHistoricalLog() argument 93 parseLogFromString(sharedPreferences.getString(LOGS_KEY, "")); in printBatteryOptimizeHistoricalLog()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/hibernation/ |
D | HibernationPolicy.kt | 250 val sharedPreferences = context.sharedPreferences in setUnusedAppsReviewNeeded() constant 252 sharedPreferences.contains(PREF_KEY_UNUSED_APPS_REVIEW) && in setUnusedAppsReviewNeeded() 253 sharedPreferences.getBoolean(PREF_KEY_UNUSED_APPS_REVIEW, false) == needsReview in setUnusedAppsReviewNeeded() 257 sharedPreferences.edit().putBoolean(PREF_KEY_UNUSED_APPS_REVIEW, needsReview).apply() in setUnusedAppsReviewNeeded() 261 return context.sharedPreferences.getBoolean(PREF_KEY_UNUSED_APPS_REVIEW, false) in getUnusedAppsReviewNeeded() 287 initStartTimeOfUnusedAppTracking(context.sharedPreferences) in onReceive() 332 adjustStartTimeOfUnusedAppTracking(context.sharedPreferences) in onReceive() 384 val startTimeOfUnusedAppTracking = getStartTimeOfUnusedAppTracking(context.sharedPreferences) in getAppsToHibernate() 753 val Context.sharedPreferences: SharedPreferences constant 764 private fun getSystemTime(sharedPreferences: SharedPreferences): SystemTime { in getSystemTime() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/calllog/notifier/ |
D | RefreshAnnotatedCallLogNotifier.java | 44 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()
|
/packages/apps/Dialer/java/com/android/dialer/phonelookup/spam/ |
D | SpamPhoneLookup.java | 49 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();
|
/packages/modules/DeviceLock/DeviceLockController/src/com/android/devicelockcontroller/storage/ |
D | SetupParameters.java | 132 SharedPreferences sharedPreferences = getSharedPreferences(context); in createPrefs() local 133 if (sharedPreferences.contains(KEY_KIOSK_PACKAGE)) { in createPrefs() 138 populatePreferencesLocked(sharedPreferences, bundle); in createPrefs() 141 private static void populatePreferencesLocked(SharedPreferences sharedPreferences, in populatePreferencesLocked() argument 144 SharedPreferences.Editor editor = sharedPreferences.edit(); in populatePreferencesLocked() 194 SharedPreferences sharedPreferences = getSharedPreferences(context); in getKioskAllowlist() local 196 sharedPreferences.getStringSet(KEY_KIOSK_ALLOWLIST, null /* defValue */); in getKioskAllowlist()
|
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/service/ |
D | PermissionStorageTimeChangeReceiverTest.kt | 67 @Mock lateinit var sharedPreferences: SharedPreferences variable in com.android.permissioncontroller.tests.mocking.permission.service.PermissionStorageTimeChangeReceiverTest 90 `when`(context.getSharedPreferences(anyString(), anyInt())).thenReturn(sharedPreferences) in setup() 91 `when`(sharedPreferences.edit()).thenReturn(editor) in setup() 97 `when`(sharedPreferences.getLong(eq(PREF_KEY_SYSTEM_TIME_SNAPSHOT), anyLong())) in setup() 99 `when`(sharedPreferences.getLong(eq(PREF_KEY_ELAPSED_REALTIME_SNAPSHOT), anyLong())) in setup() 164 `when`(sharedPreferences.getLong(eq(PREF_KEY_SYSTEM_TIME_SNAPSHOT), anyLong())) in mockBootCompletedSnapshot() 166 `when`(sharedPreferences.getLong(eq(PREF_KEY_ELAPSED_REALTIME_SNAPSHOT), anyLong())) in mockBootCompletedSnapshot()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/provisioning/ |
D | ProvisioningActivity.java | 172 ManagedProvisioningSharedPreferences sharedPreferences = in writeSharedPreferences() local 174 sharedPreferences.writeNavigationBarColor(getWindow().getNavigationBarColor()); in writeSharedPreferences() 175 sharedPreferences.writeNavigationBarDividerColor( in writeSharedPreferences() 177 sharedPreferences.writeTextPrimaryColor(mUtils.getTextPrimaryColor(this)); in writeSharedPreferences() 178 sharedPreferences.writeTextSecondaryColor(mUtils.getTextSecondaryColor(this)); in writeSharedPreferences() 179 sharedPreferences.writeBackgroundColor(mUtils.getBackgroundColor(this)); in writeSharedPreferences() 180 sharedPreferences.writeAccentColor(mUtils.getAccentColor(this)); in writeSharedPreferences() 181 sharedPreferences.writeNotificationBackgroundColor( in writeSharedPreferences()
|
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/spe/logging/ |
D | JobServiceLogger.java | 257 SharedPreferences sharedPreferences = in logExecutionStats() local 259 SharedPreferences.Editor editor = sharedPreferences.edit(); in logExecutionStats() 268 sharedPreferences.getLong( in logExecutionStats() 272 sharedPreferences.getLong(executionPeriodKey, UNAVAILABLE_JOB_EXECUTION_PERIOD); in logExecutionStats() 398 SharedPreferences sharedPreferences = in persistJobExecutionData() local 421 sharedPreferences.getLong( in persistJobExecutionData() 424 sharedPreferences.getLong( in persistJobExecutionData() 427 sharedPreferences.getLong(executionPeriodKey, UNAVAILABLE_JOB_EXECUTION_PERIOD); in persistJobExecutionData() 432 SharedPreferences.Editor editor = sharedPreferences.edit(); in persistJobExecutionData()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/analytics/ |
D | AnalyticsUtils.java | 180 static long getProvisioningTime(ManagedProvisioningSharedPreferences sharedPreferences) { in getProvisioningTime() argument 181 return getProvisioningTime(sharedPreferences, SystemClock::elapsedRealtime); in getProvisioningTime() 185 static long getProvisioningTime(ManagedProvisioningSharedPreferences sharedPreferences, in getProvisioningTime() argument 187 if (sharedPreferences.getProvisioningStartedTimestamp() == 0) { in getProvisioningTime() 190 return getTimeFunction.getAsLong() - sharedPreferences.getProvisioningStartedTimestamp(); in getProvisioningTime()
|