/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/pipeline/data/repository/ |
D | CustomTileAddedSharedPreferencesRepositoryTest.kt | 42 val sharedPrefs = FakeSharedPreferences() in setTileAdded_inSharedPreferences() constant 43 val userFileManager = FakeUserFileManager(mapOf(userId to sharedPrefs)) in setTileAdded_inSharedPreferences() 48 assertThat(sharedPrefs.getForComponentName(TEST_COMPONENT)).isTrue() in setTileAdded_inSharedPreferences() 51 assertThat(sharedPrefs.getForComponentName(TEST_COMPONENT)).isFalse() in setTileAdded_inSharedPreferences() 57 val sharedPrefs = FakeSharedPreferences() in setTileAdded_differentComponents() constant 58 val userFileManager = FakeUserFileManager(mapOf(userId to sharedPrefs)) in setTileAdded_differentComponents() 64 assertThat(sharedPrefs.getForComponentName(TEST_COMPONENT)).isTrue() in setTileAdded_differentComponents() 65 assertThat(sharedPrefs.getForComponentName(OTHER_TEST_COMPONENT)).isFalse() in setTileAdded_differentComponents() 85 val sharedPrefs = FakeSharedPreferences() in isTileAdded_fromSharedPreferences() constant 86 val userFileManager = FakeUserFileManager(mapOf(userId to sharedPrefs)) in isTileAdded_fromSharedPreferences() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/panels/ |
D | AuthorizedPanelsRepositoryImplTest.kt | 63 val sharedPrefs = FakeSharedPreferences() in testPreApprovedPackagesAreSeededIfNoSavedPreferences() constant 64 val fileManager = FakeUserFileManager(mapOf(0 to sharedPrefs)) in testPreApprovedPackagesAreSeededIfNoSavedPreferences() 68 assertThat(sharedPrefs.getStringSet(KEY, null)).containsExactly(TEST_PACKAGE) in testPreApprovedPackagesAreSeededIfNoSavedPreferences() 77 val sharedPrefs = FakeSharedPreferences() in testPreApprovedPackagesNotSeededIfEmptySavedPreferences() constant 78 sharedPrefs.edit().putStringSet(KEY, emptySet()).apply() in testPreApprovedPackagesNotSeededIfEmptySavedPreferences() 79 val fileManager = FakeUserFileManager(mapOf(0 to sharedPrefs)) in testPreApprovedPackagesNotSeededIfEmptySavedPreferences() 82 assertThat(sharedPrefs.getStringSet(KEY, null)).isEmpty() in testPreApprovedPackagesNotSeededIfEmptySavedPreferences() 104 val sharedPrefs = FakeSharedPreferences() in testGetAuthorizedPackages() constant 105 sharedPrefs.edit().putStringSet(KEY, mutableSetOf(TEST_PACKAGE)).apply() in testGetAuthorizedPackages() 106 val fileManager = FakeUserFileManager(mapOf(0 to sharedPrefs)) in testGetAuthorizedPackages() [all …]
|
D | SelectedComponentRepositoryTest.kt | 221 private class FakeUserFileManager(private val sharedPrefs: Map<Int, SharedPreferences>) : constant in com.android.systemui.controls.panels.SelectedComponentRepositoryTest.FakeUserFileManager 238 return sharedPrefs.getValue(userId) in getSharedPreferences()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/wmshell/ |
D | BubbleEducationControllerTest.kt | 45 private lateinit var sharedPrefs: SharedPreferences variable in com.android.systemui.wmshell.BubbleEducationControllerTest 50 sharedPrefs = mContext.getSharedPreferences(mContext.packageName, Context.MODE_PRIVATE) in setUp() 51 sharedPrefs.edit { in setUp() 60 sharedPrefs.edit { putBoolean(PREF_STACK_EDUCATION, true) } in testSeenStackEducation_read() 67 assertThat(sharedPrefs.getBoolean(PREF_STACK_EDUCATION, false)).isTrue() in testSeenStackEducation_write() 72 sharedPrefs.edit { putBoolean(PREF_MANAGED_EDUCATION, true) } in testSeenManageEducation_read() 79 assertThat(sharedPrefs.getBoolean(PREF_MANAGED_EDUCATION, false)).isTrue() in testSeenManageEducation_write() 91 sharedPrefs.edit { putBoolean(PREF_STACK_EDUCATION, true) } in testShouldShowStackEducation() 94 sharedPrefs.edit { remove(PREF_STACK_EDUCATION) } in testShouldShowStackEducation() 107 sharedPrefs.edit { putBoolean(PREF_MANAGED_EDUCATION, true) } in testShouldShowManageEducation() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/ |
D | KeyguardQuickAffordanceLocalUserSelectionManager.kt | 59 private var sharedPrefs: SharedPreferences = instantiateSharedPrefs() in <lambda>() variable 133 sharedPrefs = instantiateSharedPrefs() in <lambda>() 140 sharedPrefs.registerOnSharedPreferenceChangeListener(listener) in <lambda>() 143 awaitClose { sharedPrefs.unregisterOnSharedPreferenceChangeListener(listener) } in <lambda>() 153 val slotKeys = sharedPrefs.all.keys.filter { it.startsWith(KEY_PREFIX_SLOT) } in <lambda>() 158 val value = sharedPrefs.getString(key, null) in <lambda>() 191 sharedPrefs.edit().putString(key, value).apply() in <lambda>()
|
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/ |
D | NetworkActivity.java | 100 SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); in onStart() local 104 sPref = sharedPrefs.getString("listPref", "Wi-Fi"); in onStart() 226 SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); in loadXmlFromNetwork() local 227 boolean pref = sharedPrefs.getBoolean("summaryPref", false); in loadXmlFromNetwork()
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/quickaffordance/ |
D | KeyguardQuickAffordanceLegacySettingSyncerTest.kt | 54 @Mock private lateinit var sharedPrefs: FakeSharedPreferences variable in com.android.systemui.keyguard.data.quickaffordance.KeyguardQuickAffordanceLegacySettingSyncerTest 68 sharedPrefs = FakeSharedPreferences() in setUp() 69 whenever(context.getSharedPreferences(anyString(), any())).thenReturn(sharedPrefs) in setUp()
|
D | KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt | 64 private lateinit var sharedPrefs: MutableMap<Int, SharedPreferences> variable in com.android.systemui.keyguard.data.quickaffordance.KeyguardQuickAffordanceLocalUserSelectionManagerTest 70 sharedPrefs = mutableMapOf() in setUp() 73 sharedPrefs.getOrPut(userId) { FakeSharedPreferences() } in setUp()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/ |
D | MuteQuickAffordanceCoreStartableTest.kt | 135 …val sharedPrefs = context.getSharedPreferences("quick_affordance_mute_ringer_mode_cache_test", Con… in <lambda>() constant 139 ).thenReturn(sharedPrefs) in <lambda>() 147 val result = sharedPrefs.getInt("key_last_non_silent_ringer_mode", -1) in <lambda>()
|
/frameworks/base/packages/WallpaperBackup/src/com/android/wallpaperbackup/ |
D | WallpaperBackupAgent.java | 171 SharedPreferences sharedPrefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); in onFullBackup() local 176 final int lastSysGeneration = sharedPrefs.getInt(SYSTEM_GENERATION, /* defValue= */ -1); in onFullBackup() 177 final int lastLockGeneration = sharedPrefs.getInt(LOCK_GENERATION, /* defValue= */ -1); in onFullBackup() 196 backupSystemWallpaperFile(sharedPrefs, sysChanged, sysGeneration, data); in onFullBackup() 197 backupLockWallpaperFileIfItExists(sharedPrefs, lockChanged, lockGeneration, data); in onFullBackup() 297 private void backupSystemWallpaperFile(SharedPreferences sharedPrefs, in backupSystemWallpaperFile() argument 324 sharedPrefs.edit().putInt(SYSTEM_GENERATION, sysGeneration).apply(); in backupSystemWallpaperFile() 335 private void backupLockWallpaperFileIfItExists(SharedPreferences sharedPrefs, in backupLockWallpaperFileIfItExists() argument 346 sharedPrefs.edit().putInt(LOCK_GENERATION, lockGeneration).apply(); in backupLockWallpaperFileIfItExists() 381 sharedPrefs.edit().putInt(LOCK_GENERATION, lockGeneration).apply(); in backupLockWallpaperFileIfItExists()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/resume/ |
D | MediaResumeListenerTest.kt | 91 @Mock private lateinit var sharedPrefs: SharedPreferences in capture() variable in com.android.systemui.media.controls.domain.resume.MediaResumeListenerTest 134 .thenReturn(sharedPrefs) in capture() 135 whenever(sharedPrefs.getString(any(), any())).thenReturn(RESUME_COMPONENTS) in capture() 136 whenever(sharedPrefs.edit()).thenReturn(sharedPrefsEditor) in capture() 435 whenever(sharedPrefs.getString(any(), any())).thenReturn(componentsString) in capture() 468 whenever(sharedPrefs.getString(any(), any())).thenReturn(componentsString) in capture() 511 whenever(sharedPrefs.getString(any(), any())).thenReturn(componentsString) in capture()
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/ |
D | CommunalPrefsRepositoryImplTest.kt | 163 private class FakeUserFileManager(private val sharedPrefs: Map<Int, SharedPreferences>) : in createCommunalPrefsRepositoryImpl() constant in com.android.systemui.communal.data.repository.CommunalPrefsRepositoryImplTest.FakeUserFileManager 177 return sharedPrefs.getValue(userId) in createCommunalPrefsRepositoryImpl()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/ |
D | PinStorage.java | 931 SharedPreferences sharedPrefs = in saveNumberOfCachedPins() local 934 int previousValue = sharedPrefs.getInt(SHARED_PREFS_STORED_PINS, 0); in saveNumberOfCachedPins() 935 sharedPrefs.edit().putInt(SHARED_PREFS_STORED_PINS, storedCount).commit(); in saveNumberOfCachedPins()
|