/packages/apps/DeskClock/src/com/android/deskclock/data/ |
D | SettingsModel.kt | 33 private val mPrefs: SharedPreferences, constant in com.android.deskclock.data.SettingsModel 43 SettingsDAO.setDefaultDisplayClockSeconds(mContext, mPrefs) 47 get() = SettingsDAO.getGlobalIntentId(mPrefs) 50 SettingsDAO.updateGlobalIntentId(mPrefs) in updateGlobalIntentId() 54 get() = SettingsDAO.getCitySort(mPrefs) 57 SettingsDAO.toggleCitySort(mPrefs) in toggleCitySort() 61 get() = SettingsDAO.getHomeTimeZone(mContext, mPrefs, TimeZone.getDefault()) 64 get() = SettingsDAO.getClockStyle(mContext, mPrefs) 67 get() = SettingsDAO.getDisplayClockSeconds(mPrefs) 69 SettingsDAO.setDisplayClockSeconds(mPrefs, shouldDisplaySeconds) [all …]
|
D | StopwatchModel.kt | 35 private val mPrefs: SharedPreferences, constant in com.android.deskclock.data.StopwatchModel 84 mStopwatch = StopwatchDAO.getStopwatch(mPrefs) 96 StopwatchDAO.setStopwatch(mPrefs, stopwatch) in setStopwatch() 136 StopwatchDAO.addLap(mPrefs, lapNumber, totalTime) in addLap() 162 StopwatchDAO.clearLaps(mPrefs) in clearLaps() 230 mLaps = StopwatchDAO.getLaps(mPrefs)
|
D | RingtoneModel.kt | 47 internal class RingtoneModel(private val mContext: Context, private val mPrefs: SharedPreferences) { constant in com.android.deskclock.data.RingtoneModel 75 val ringtone = CustomRingtoneDAO.addCustomRingtone(mPrefs, uri, title) in addCustomRingtone() 85 CustomRingtoneDAO.removeCustomRingtone(mPrefs, ringtone.id) in removeCustomRingtone() 186 mCustomRingtones = CustomRingtoneDAO.getCustomRingtones(mPrefs)
|
/packages/services/DeviceAsWebcam/src/com/android/DeviceAsWebcam/utils/ |
D | UserPrefs.java | 30 private final SharedPreferences mPrefs; field in UserPrefs 35 mPrefs = context.getSharedPreferences(context.getString(R.string.prefs_file_name), in UserPrefs() 37 mPrefsEditor = mPrefs.edit(); in UserPrefs() 45 return mPrefs.getFloat(mContext.getString(R.string.prefs_zoom_ratio_key, cameraId), in fetchZoomRatio() 63 return mPrefs.getString(mContext.getString(R.string.prefs_camera_id_key), defaultCameraId); in fetchCameraId() 80 return mPrefs.getString(mContext.getString(R.string.prefs_back_camera_id_key), in fetchBackCameraId() 98 return mPrefs.getString(mContext.getString(R.string.prefs_front_camera_id_key), in fetchFrontCameraId() 115 return mPrefs.getBoolean(mContext.getString(R.string.prefs_high_quality_mode_enabled), in fetchHighQualityModeEnabled() 129 return mPrefs.getBoolean(mContext.getString(R.string.prefs_high_quality_warning_enabled), in fetchHighQualityWarningEnabled()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/ |
D | KeyboardThemeTests.java | 48 private SharedPreferences mPrefs; field in KeyboardThemeTests 61 mPrefs = PreferenceManager.getDefaultSharedPreferences(getContext()); in setUp() 84 mPrefs.edit().putString(prefKey, themeIdString).apply(); in setKeyboardThemePreference() 89 mPrefs.edit().remove(prefKey).apply(); in setKeyboardThemePreference() 94 mPrefs.edit().putString(prefKey, ILLEGAL_THEME_ID_STRING).apply(); in setKeyboardThemePreference() 99 mPrefs, sdkVersion, KeyboardTheme.KEYBOARD_THEMES); in assertKeyboardTheme() 165 mPrefs, sdkVersion, KeyboardTheme.KEYBOARD_THEMES); in assertDefaultKeyboardTheme() 171 assertEquals(isValidKeyboardThemeId(previousThemeId), mPrefs.contains(oldPrefKey)); in assertDefaultKeyboardTheme() 175 assertFalse(mPrefs.contains(oldPrefKey)); in assertDefaultKeyboardTheme() 222 mPrefs, sdkVersion, KeyboardTheme.KEYBOARD_THEMES); in assertUpgradeKeyboardToLxxOn() [all …]
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarConfidenceChecker.java | 69 final SharedPreferences mPrefs; field in CalendarConfidenceChecker 73 mPrefs = mContext.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); in CalendarConfidenceChecker() 106 mPrefs.edit() in updateLastCheckTime() 123 lastBootCount = mPrefs.getLong(LAST_CHECK_BOOT_COUNT_PREF_KEY, -1); in checkLastCheckTime() 124 lastCheckTime = mPrefs.getLong(LAST_CHECK_REALTIME_PREF_KEY, -1); in checkLastCheckTime() 125 lastWtfTime = mPrefs.getLong(LAST_WTF_REALTIME_PREF_KEY, 0); in checkLastCheckTime() 169 mPrefs.edit() in checkLastCheckTime()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | AppManifestConfigMetricsLoggerTest.java | 93 private final FakeSharedPreferences mPrefs = new FakeSharedPreferences(); field in AppManifestConfigMetricsLoggerTest 104 when(mMockContext.getSharedPreferences(any(String.class), anyInt())).thenReturn(mPrefs); in setExpectations() 122 mPrefs.onEditThrows(); // will throw if edit() is called in testLogUsage_callWithInvalidResult() 137 Map<String, ?> allProps = mPrefs.getAll(); in testLogUsage_firstTime() 151 mPrefs.onEditThrows(); // will throw if edit() is called in testLogUsage_secondTimeSameResult() 154 Map<String, ?> allProps = mPrefs.getAll(); in testLogUsage_secondTimeSameResult() 171 int valueBefore = mPrefs.getInt(KEY_PKG_NAME_API, RESULT_UNSPECIFIED); in testLogUsage_secondTimeDifferentResult() 181 Map<String, ?> allProps = mPrefs.getAll(); in testLogUsage_secondTimeDifferentResult() 187 int valueAfter = mPrefs.getInt(KEY_PKG_NAME_API, RESULT_UNSPECIFIED); in testLogUsage_secondTimeDifferentResult() 212 mPrefs.onCommitReturns(/* result= */ false); in testLogUsage_commitFailed() [all …]
|
/packages/services/BuiltInPrintService/src/com/android/bips/ |
D | P2pPermissionManager.java | 58 private final SharedPreferences mPrefs; field in P2pPermissionManager 63 mPrefs = mContext.getSharedPreferences(TAG, 0); in P2pPermissionManager() 80 if (DEBUG) Log.d(TAG, "State from " + mPrefs.getString(STATE_KEY, "?") + " to " + state); in setState() 81 mPrefs.edit().putString(STATE_KEY, state.name()).apply(); in setState() 147 if (explain && (rationale || mPrefs.getBoolean(PERMISSION_RATIONALE_KEY, false))) { in request() 154 mPrefs.edit().putBoolean(PERMISSION_RATIONALE_KEY, true).apply(); in request() 164 mPrefs.unregisterOnSharedPreferenceChangeListener(preferenceListener); in request() 209 mPrefs.unregisterOnSharedPreferenceChangeListener(this); in listenForPreferenceChanges() 213 mPrefs.registerOnSharedPreferenceChangeListener(preferenceListener); in listenForPreferenceChanges() 270 String stateString = mPrefs.getString(STATE_KEY, State.DENIED.name()); in getState()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/accounts/ |
D | AccountsChangedReceiverTests.java | 47 private SharedPreferences mPrefs; field in AccountsChangedReceiverTests 56 mPrefs = PreferenceManager.getDefaultSharedPreferences(getContext()); in setUp() 58 mLastKnownAccount = mPrefs.getString(LocalSettingsConstants.PREF_ACCOUNT_NAME, null); in setUp() 120 mPrefs.edit().remove(LocalSettingsConstants.PREF_ACCOUNT_NAME).apply(); in updateAccountName() 122 mPrefs.edit().putString(LocalSettingsConstants.PREF_ACCOUNT_NAME, accountName).apply(); in updateAccountName() 128 mPrefs.getString(LocalSettingsConstants.PREF_ACCOUNT_NAME, null)); in assertAccountName()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/ |
D | Settings.java | 125 private SharedPreferences mPrefs; field in Settings 146 mPrefs = PreferenceManager.getDefaultSharedPreferences(context); in onCreate() 147 mPrefs.registerOnSharedPreferenceChangeListener(this); in onCreate() 148 upgradeAutocorrectionSettings(mPrefs, mRes); in onCreate() 152 mPrefs.unregisterOnSharedPreferenceChangeListener(this); in onDestroy() 177 final SharedPreferences prefs = mPrefs; in loadSettings() 383 mPrefs.edit().remove(PREF_LAST_USED_PERSONALIZATION_TOKEN).apply(); in writeLastUsedPersonalizationToken() 386 mPrefs.edit().putString(PREF_LAST_USED_PERSONALIZATION_TOKEN, tokenStr).apply(); in writeLastUsedPersonalizationToken() 391 final String tokenStr = mPrefs.getString(PREF_LAST_USED_PERSONALIZATION_TOKEN, null); in readLastUsedPersonalizationToken() 396 mPrefs.edit().putLong(PREF_LAST_PERSONALIZATION_DICT_WIPED_TIME, timestamp).apply(); in writeLastPersonalizationDictWipedTime() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/ |
D | DataMigrationTest.java | 76 private SharedPreferences mPrefs; field in DataMigrationTest 87 mPrefs = mTargetContext.getSharedPreferences(TEST_PREF, Context.MODE_PRIVATE); in setUp() 88 mPrefs.edit().clear().apply(); in setUp() 94 when(mMockContext.getSharedPreferences(anyString(), anyInt())).thenReturn(mPrefs); in setUp() 99 mPrefs.edit().clear().apply(); in tearDown() 172 assertThat(mPrefs.getInt(DataMigration.MIGRATION_ATTEMPT_PROPERTY, -1)).isEqualTo(-1); in testTooManyAttempt() 176 assertThat(mPrefs.getInt(DataMigration.MIGRATION_ATTEMPT_PROPERTY, -1)) in testTooManyAttempt() 180 assertThat(mPrefs.getInt(DataMigration.MIGRATION_ATTEMPT_PROPERTY, -1)) in testTooManyAttempt() 195 assertThat(mPrefs.getBoolean("keyBoolean", false)).isTrue(); in testSharedPreferencesMigration() 199 assertThat(mPrefs.getLong("keyLong", -1)).isEqualTo(42); in testSharedPreferencesMigration() [all …]
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | RespondViaSmsSettings.java | 45 private SharedPreferences mPrefs; field in RespondViaSmsSettings 58 mPrefs = getPreferenceManager().getSharedPreferences(); in onCreate() 59 QuickResponseUtils.maybeResetQuickResponses(this, mPrefs); in onCreate() 116 SharedPreferences.Editor editor = mPrefs.edit(); in onPreferenceChange() 121 QuickResponseUtils.maybeResetQuickResponses(this, mPrefs); in onPreferenceChange() 150 pref.setText(mPrefs.getString(pref.getKey(), pref.getText())); in initPref()
|
/packages/apps/WallpaperPicker2/tests/common/src/com/android/wallpaper/testing/ |
D | TestWallpaperPersister.java | 44 private WallpaperPreferences mPrefs; field in TestWallpaperPersister 65 mPrefs = InjectorProvider.getInjector().getPreferences(appContext); in TestWallpaperPersister() 84 mPrefs.setHomeWallpaperAttributions(wallpaperInfo.getAttributions(mAppContext)); in setIndividualWallpaper() 85 mPrefs.setWallpaperPresentationMode( in setIndividualWallpaper() 87 mPrefs.setHomeWallpaperRemoteId(wallpaperInfo.getWallpaperId()); in setIndividualWallpaper() 91 mPrefs.setLockWallpaperAttributions(wallpaperInfo.getAttributions(mAppContext)); in setIndividualWallpaper() 92 mPrefs.setLockWallpaperRemoteId(wallpaperInfo.getWallpaperId()); in setIndividualWallpaper()
|
/packages/apps/Contacts/tests/src/com/android/contacts/model/ |
D | AccountTypeManagerTest.java | 61 @Mock private SharedPreferences mPrefs; field in AccountTypeManagerTest 101 when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn( in testGetDefaultAccount_NoAccounts_DefaultPreferenceSet() 113 when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn( in testGetDefaultAccount_DefaultAccountPreferenceSet() 120 when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn( in testGetDefaultAccount_DefaultAccountPreferenceSet_NonGoogleAccountType() 127 when(mPrefs.getString(Mockito.anyString(), Mockito.any())).thenReturn( in testGetDefaultAccount_DefaultAccountPreferenceSet_UnknownName() 135 mAccountManager, mPrefs, "contact_editor_default_account_key"); in getDefaultGoogleAccountName()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/prefs/ |
D | PreferencesMonitor.java | 37 private final SharedPreferences mPrefs; field in PreferencesMonitor 47 mPrefs = prefs; in PreferencesMonitor() 52 mPrefs.registerOnSharedPreferenceChangeListener(mListener); in start() 56 mPrefs.unregisterOnSharedPreferenceChangeListener(mListener); in stop()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/prefs/ |
D | PreferencesMonitorTest.java | 40 private SharedPreferences mPrefs; field in PreferencesMonitorTest 47 mPrefs = InstrumentationRegistry.getContext().getSharedPreferences("MonitorTest0", 0); in setUp() 48 mMonitor = new PreferencesMonitor("Poodles", mPrefs, mConsumer); in setUp() 59 mPrefs.edit().putInt(LOCAL_PREFERENCE, 1).apply(); in testReportsChangesToListener()
|
/packages/services/Telephony/src/com/android/phone/vvm/ |
D | VisualVoicemailSmsFilterConfig.java | 152 private final SharedPreferences mPrefs; field in VisualVoicemailSmsFilterConfig.Reader 156 mPrefs = getSharedPreferences(context); in Reader() 161 return mPrefs.getInt(makeKey(key), defaultValue); in getInt() 165 return mPrefs.getString(makeKey(key), defaultValue); in getString() 169 return mPrefs.getBoolean(makeKey(key), defaultValue); in getBoolean() 173 Set<String> result = mPrefs.getStringSet(makeKey(key), null); in getStringSet()
|
/packages/apps/Traceur/src/com/android/traceur/ |
D | MainFragment.java | 77 private SharedPreferences mPrefs; field in MainFragment 100 mPrefs = PreferenceManager.getDefaultSharedPreferences( in onCreate() 344 mTracingOn.setChecked(mPrefs.getBoolean(mTracingOn.getKey(), false)); in refreshUi() 345 mStackSamplingOn.setChecked(mPrefs.getBoolean(mStackSamplingOn.getKey(), false)); in refreshUi() 346 mHeapDumpOn.setChecked(mPrefs.getBoolean(mHeapDumpOn.getKey(), false)); in refreshUi() 350 stopOnReport.setChecked(mPrefs.getBoolean(stopOnReport.getKey(), false)); in refreshUi() 354 continuousHeapDump.setChecked(mPrefs.getBoolean(continuousHeapDump.getKey(), false)); in refreshUi() 378 if (restoreDefaultTags || !mPrefs.contains(context.getString(R.string.pref_key_tags))) { in refreshUi() 384 !mPrefs.contains(context.getString(R.string.pref_key_heap_dump_processes))) { in refreshUi() 444 mPrefs.edit().putBoolean( in refreshUi()
|
/packages/apps/Launcher3/src/com/android/launcher3/secondarydisplay/ |
D | PinnedAppsAdapter.java | 62 private final SharedPreferences mPrefs; field in PinnedAppsAdapter 77 mPrefs = launcher.getSharedPreferences(PINNED_APPS_KEY, MODE_PRIVATE); in PinnedAppsAdapter() 162 mPrefs.registerOnSharedPreferenceChangeListener(this); in init() 163 onSharedPreferenceChanged(mPrefs, PINNED_APPS_KEY); in init() 170 mPrefs.unregisterOnSharedPreferenceChangeListener(this); in destroy() 182 mPrefs.edit().putStringSet(PINNED_APPS_KEY, in update()
|
/packages/apps/QuickAccessWallet/src/com/android/systemui/plugin/globalactions/wallet/ |
D | WalletPanelViewController.java | 72 private final SharedPreferences mPrefs; field in WalletPanelViewController 87 mPrefs = mSysuiContext.getSharedPreferences(TAG, Context.MODE_PRIVATE); in WalletPanelViewController() 100 if (!mPrefs.getBoolean(PREFS_HAS_CARDS, false)) { in WalletPanelViewController() 201 mPrefs.edit().putBoolean(PREFS_HAS_CARDS, !data.isEmpty()).apply(); in onWalletCardsRetrieved() 307 mPrefs.edit().putInt(PREFS_WALLET_VIEW_HEIGHT, 0).apply(); in showEmptyStateView() 333 int expectedHeight = mPrefs.getInt(PREFS_WALLET_VIEW_HEIGHT, -1); in getExpectedMinHeight() 348 mPrefs.edit().putInt(PREFS_WALLET_VIEW_HEIGHT, bottom - top).apply(); in removeMinHeightAndRecordHeightOnLayout()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/emoji/ |
D | EmojiCategory.java | 150 private final SharedPreferences mPrefs; field in EmojiCategory 165 mPrefs = prefs; in EmojiCategory() 208 mCurrentCategoryId = Settings.readLastShownEmojiCategoryId(mPrefs, defaultCategoryId); in EmojiCategory() 280 Settings.writeLastShownEmojiCategoryId(mPrefs, categoryId); in setCurrentCategoryId() 293 mPrefs, mCurrentCategoryId, mCurrentCategoryPageId); in saveLastTypedCategoryPage() 313 Settings.readLastTypedEmojiCategoryPageId(mPrefs, categoryId); in getPageIdFromCategoryId() 373 final DynamicGridKeyboard kbd = new DynamicGridKeyboard(mPrefs, in getKeyboard() 384 final DynamicGridKeyboard tempKeyboard = new DynamicGridKeyboard(mPrefs, in getKeyboard()
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | FastScrollingIndexCacheTest.java | 31 private MockSharedPreferences mPrefs; field in FastScrollingIndexCacheTest 55 mPrefs = new MockSharedPreferences(); in setUp() 56 mCache = FastScrollingIndexCache.getInstanceForTest(mPrefs); in setUp() 143 FastScrollingIndexCache cache2 = FastScrollingIndexCache.getInstanceForTest(mPrefs); in testPutAndGet() 151 mPrefs.edit().putString(FastScrollingIndexCache.PREFERENCE_KEY, "123"); in testMalformedPreferences()
|
/packages/apps/WallpaperPicker2/tests/robotests/src/com/android/wallpaper/module/ |
D | DefaultWallpaperPersisterTest.java | 72 private TestWallpaperPreferences mPrefs; field in DefaultWallpaperPersisterTest 81 mPrefs = new TestWallpaperPreferences(); in setUp() 89 mPersister = new DefaultWallpaperPersister(mContext, mManager, mPrefs, changedNotifier, in setUp() 129 assertThat(mPrefs.getHomeWallpaperActionUrl()).isEqualTo(ACTION_URL); in setBitmapWallpaper_setsActionUrl() 130 assertThat(mPrefs.getLockWallpaperActionUrl()).isEqualTo(ACTION_URL); in setBitmapWallpaper_setsActionUrl()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | FastScrollingIndexCache.java | 70 private final SharedPreferences mPrefs; field in FastScrollingIndexCache 112 mPrefs = prefs; in FastScrollingIndexCache() 255 mPrefs.edit().remove(PREFERENCE_KEY).commit(); in invalidate() 280 mPrefs.edit().putString(PREFERENCE_KEY, sb.toString()).apply(); in save() 295 final String savedValue = mPrefs.getString(PREFERENCE_KEY, null); in ensureLoaded()
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
D | ContactBrowseListFragment.java | 75 private SharedPreferences mPrefs; field in ContactBrowseListFragment 177 mPrefs = PreferenceManager.getDefaultSharedPreferences(activity); in onAttach() 626 ContactListFilter.storeToPreferences(mPrefs, mFilter); in saveSelectedUri() 628 Editor editor = mPrefs.edit(); in saveSelectedUri() 644 String selectedUri = mPrefs.getString(getPersistentSelectionKey(), null); in restoreSelectedUri() 653 ContactListFilter.storeToPreferences(mPrefs, mFilter); in saveFilter() 657 mFilter = ContactListFilter.restoreDefaultPreferences(mPrefs); in restoreFilter()
|