/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/inputmethod/ |
D | KeyboardManagementPreferenceControllerTest.java | 91 private LogicalPreferenceGroup mPreferenceGroup; field in KeyboardManagementPreferenceControllerTest 128 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 129 screen.addPreference(mPreferenceGroup); in setUp() 130 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreferenceGroup); in setUp() 153 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(4); in refreshUi_permitAllInputMethods_preferenceCountIs4() 170 for (int i = 0; i < mPreferenceGroup.getPreferenceCount(); i++) { in refreshUi_multiplteAllowedImeByOrganization_allPreferencesVisible() 171 assertThat(mPreferenceGroup.getPreference(i).isVisible()).isTrue(); in refreshUi_multiplteAllowedImeByOrganization_allPreferencesVisible() 189 for (int i = 0; i < mPreferenceGroup.getPreferenceCount(); i++) { in refreshUi_multipleEnabledInputMethods_allPreferencesEnabled() 190 assertThat(mPreferenceGroup.getPreference(i).isEnabled()).isTrue(); in refreshUi_multipleEnabledInputMethods_allPreferencesEnabled() 208 for (int i = 0; i < mPreferenceGroup.getPreferenceCount(); i++) { in refreshUi_multipleEnabledInputMethods_allPreferencesChecked() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/ |
D | AccountSyncDetailsPreferenceControllerTest.java | 85 private LogicalPreferenceGroup mPreferenceGroup; field in AccountSyncDetailsPreferenceControllerTest 100 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 101 helper.setPreference(mPreferenceGroup); in setUp() 121 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in refreshUi_syncAdapterDoesNotHaveSameAccountType_shouldNotBeShown() 134 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in refreshUi_syncAdapterIsNotVisible_shouldNotBeShown() 149 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in refreshUi_syncAdapterIsNotSyncable_shouldNotBeShown() 166 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in refreshUi_syncAdapterDoesNotHaveProviderInfo_shouldNotBeShown() 191 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in refreshUi_providerInfoDoesNotHaveLabel_shouldNotBeShown() 216 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in refreshUi_providerLabelShouldBeSet() 217 Preference pref = mPreferenceGroup.getPreference(0); in refreshUi_providerLabelShouldBeSet() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicesGroupPreferenceControllerTest.java | 76 private PreferenceGroup mPreferenceGroup; field in BluetoothDevicesGroupPreferenceControllerTest 102 mPreferenceGroup = new PreferenceCategory(context); in setUp() 108 controllerHelper.setPreference(mPreferenceGroup); in setUp() 127 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in refreshUi_filterMatch_addsToGroup() 129 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in refreshUi_filterMatch_addsToGroup() 142 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in refreshUi_filterMatch_addsToPreferenceMap() 153 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in refreshUi_filterMismatch_removesFromGroup() 155 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in refreshUi_filterMismatch_removesFromGroup() 161 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in refreshUi_filterMismatch_removesFromGroup() 170 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in refreshUi_filterMismatch_removesFromPreferenceMap() [all …]
|
D | BluetoothDevicePickerPreferenceControllerTest.java | 80 private PreferenceGroup mPreferenceGroup; field in BluetoothDevicePickerPreferenceControllerTest 113 mPreferenceGroup = new LogicalPreferenceGroup(context); in setUp() 128 () -> mControllerHelper.setPreference(mPreferenceGroup)); in checkInitialized_noLaunchIntentSet_throwsIllegalStateException() 138 mControllerHelper.setPreference(mPreferenceGroup); in onStart_appliesFilterType() 142 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in onStart_appliesFilterType() 143 assertThat(((BluetoothDevicePreference) mPreferenceGroup.getPreference( in onStart_appliesFilterType() 154 mControllerHelper.setPreference(mPreferenceGroup); in onDeviceClicked_bondedDevice_sendsPickedIntent() 157 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in onDeviceClicked_bondedDevice_sendsPickedIntent() 175 mControllerHelper.setPreference(mPreferenceGroup); in onDeviceClicked_bondedDevice_goesBack() 178 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in onDeviceClicked_bondedDevice_goesBack() [all …]
|
D | BluetoothDeviceProfilesPreferenceControllerTest.java | 65 private PreferenceGroup mPreferenceGroup; field in BluetoothDeviceProfilesPreferenceControllerTest 81 mPreferenceGroup = new PreferenceCategory(context); in setUp() 87 controllerHelper.setPreference(mPreferenceGroup); in setUp() 104 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in refreshUi_addsNewProfiles() 112 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in refreshUi_addsNewProfiles() 114 (BluetoothDeviceProfilePreference) mPreferenceGroup.getPreference(1); in refreshUi_addsNewProfiles() 128 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in refreshUi_removesRemovedProfiles() 135 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in refreshUi_removesRemovedProfiles() 137 (BluetoothDeviceProfilePreference) mPreferenceGroup.getPreference(0); in refreshUi_removesRemovedProfiles() 149 assertThat(mPreferenceGroup.isVisible()).isTrue(); in refreshUi_profiles_showsPreference() [all …]
|
D | BluetoothUnbondedDevicesPreferenceControllerTest.java | 83 private PreferenceGroup mPreferenceGroup; field in BluetoothUnbondedDevicesPreferenceControllerTest 122 mPreferenceGroup = new LogicalPreferenceGroup(context); in setUp() 124 BluetoothUnbondedDevicesPreferenceController.class, mPreferenceGroup); in setUp() 137 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in showsUnbondedDevices() 139 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in showsUnbondedDevices() 147 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in configUnbondedDeviceFilterIncludesPhones_showsUnbondedPhones() 149 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in configUnbondedDeviceFilterIncludesPhones_showsUnbondedPhones() 157 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in onDeviceClicked_startsPairing() 168 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in onDeviceClicked_pairingStartFails_resumesScanning() 182 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in onDeviceClicked_requestsPhonebookAccess() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/ |
D | AvailableMediaDeviceGroupControllerTest.java | 81 private PreferenceGroup mPreferenceGroup; field in AvailableMediaDeviceGroupControllerTest 95 mPreferenceGroup = spy(new PreferenceScreen(mContext, null)); in setUp() 96 when(mPreferenceGroup.getPreferenceManager()).thenReturn(mPreferenceManager); in setUp() 109 mAvailableMediaDeviceGroupController.mPreferenceGroup = mPreferenceGroup; in setUp() 121 assertThat(mPreferenceGroup.isVisible()).isTrue(); in onDeviceAdded_firstAdd_becomeVisibleAndPreferenceAdded() 122 assertThat((Preference) mPreferenceGroup.findPreference(PREFERENCE_KEY_1)) in onDeviceAdded_firstAdd_becomeVisibleAndPreferenceAdded() 128 mPreferenceGroup.addPreference(mPreference); in onDeviceRemoved_lastRemove_becomeInvisibleAndPreferenceRemoved() 132 assertThat(mPreferenceGroup.isVisible()).isFalse(); in onDeviceRemoved_lastRemove_becomeInvisibleAndPreferenceRemoved() 133 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in onDeviceRemoved_lastRemove_becomeInvisibleAndPreferenceRemoved() 138 mPreferenceGroup.setVisible(true); in onDeviceRemoved_notLastRemove_stillVisible() [all …]
|
D | ConnectedDeviceGroupControllerTest.java | 74 private PreferenceGroup mPreferenceGroup; field in ConnectedDeviceGroupControllerTest 88 mPreferenceGroup = spy(new PreferenceScreen(mContext, null)); in setUp() 89 when(mPreferenceGroup.getPreferenceManager()).thenReturn(mPreferenceManager); in setUp() 96 mConnectedDeviceGroupController.mPreferenceGroup = mPreferenceGroup; in setUp() 103 assertThat(mPreferenceGroup.isVisible()).isTrue(); in onDeviceAdded_firstAdd_becomeVisibleAndPreferenceAdded() 104 assertThat((Preference) mPreferenceGroup.findPreference(PREFERENCE_KEY_1)) in onDeviceAdded_firstAdd_becomeVisibleAndPreferenceAdded() 110 mPreferenceGroup.addPreference(mPreference); in onDeviceRemoved_lastRemove_becomeInvisibleAndPreferenceRemoved() 114 assertThat(mPreferenceGroup.isVisible()).isFalse(); in onDeviceRemoved_lastRemove_becomeInvisibleAndPreferenceRemoved() 115 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in onDeviceRemoved_lastRemove_becomeInvisibleAndPreferenceRemoved() 120 mPreferenceGroup.setVisible(true); in onDeviceRemoved_notLastRemove_stillVisible() [all …]
|
D | PreviouslyConnectedDevicePreferenceControllerTest.java | 110 private PreferenceGroup mPreferenceGroup; field in PreviouslyConnectedDevicePreferenceControllerTest 149 mPreferenceGroup = spy(new PreferenceCategory(mContext)); in setUp() 150 doReturn(mPreferenceManager).when(mPreferenceGroup).getPreferenceManager(); in setUp() 151 mPreferenceGroup.setVisible(false); in setUp() 152 mPreConnectedDeviceController.setPreferenceGroup(mPreferenceGroup); in setUp() 208 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in onDeviceAdded_addDevicePreference_displayIt() 218 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in onDeviceAdded_addDockDevicePreference_displayIt() 241 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(4); in onDeviceAdded_addFourDevicePreference_onlyDisplayThree() 252 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in onDeviceAdded_addPreferenceNotExistInRecentlyDevices_noCrash() 261 mPreferenceGroup.addPreference(preference1); in onDeviceRemoved_removeLastDevice_showSeeAllPreference() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/defaultapps/ |
D | DefaultAppsPickerBasePreferenceControllerTest.java | 62 private PreferenceGroup mPreferenceGroup; field in DefaultAppsPickerBasePreferenceControllerTest 80 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 81 screen.addPreference(mPreferenceGroup); in setUp() 84 PreferenceControllerTestUtil.assignPreference(mController, mPreferenceGroup); in setUp() 94 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in refreshUi_noCandidates_hasSingleNoneElement() 96 Preference preference = mPreferenceGroup.getPreference(0); in refreshUi_noCandidates_hasSingleNoneElement() 110 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in refreshUi_noCandidates_noNoneElement() 124 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in refreshUi_hasAdditionalCandidate_hasTwoElements() 139 CarUiRadioButtonPreference preference = mPreferenceGroup.findPreference(testKey); in refreshUi_hasAdditionalCandidateAsDefault_secondElementIsSelected() 155 CarUiRadioButtonPreference currentDefault = mPreferenceGroup.findPreference(testKey); in performClick_currentDefaultApp_nothingHappened() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/ |
D | ProfilesBasePreferenceControllerTest.java | 83 private PreferenceGroup mPreferenceGroup; field in ProfilesBasePreferenceControllerTest 93 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 95 TestProfilesBasePreferenceController.class, mPreferenceGroup); in setUp() 123 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(3); in onCreate_populatesUsers() 141 for (int i = 0; i < mPreferenceGroup.getPreferenceCount(); i++) { in refreshUi_userChange_updatesGroup() 142 currentPreferences.add(mPreferenceGroup.getPreference(i)); in refreshUi_userChange_updatesGroup() 155 for (int i = 0; i < mPreferenceGroup.getPreferenceCount(); i++) { in refreshUi_userChange_updatesGroup() 156 newPreferences.add(mPreferenceGroup.getPreference(i)); in refreshUi_userChange_updatesGroup() 168 for (int i = 0; i < mPreferenceGroup.getPreferenceCount(); i++) { in refreshUi_noChange_doesNotUpdateGroup() 169 currentPreferences.add(mPreferenceGroup.getPreference(i)); in refreshUi_noChange_doesNotUpdateGroup() [all …]
|
D | PermissionsPreferenceControllerTest.java | 59 private PreferenceGroup mPreferenceGroup; field in PermissionsPreferenceControllerTest 68 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 69 mPreferenceControllerHelper.setPreference(mPreferenceGroup); in setUp() 81 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(5); in testRefreshUi_populatesGroup() 88 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(5); in testRefreshUi_callingTwice_noDuplicates() 93 SwitchPreference preference = getPreferenceForRestriction(mPreferenceGroup, in testRefreshUi_setToFalse() 104 SwitchPreference preference = getPreferenceForRestriction(mPreferenceGroup, in testRefreshUi_setToTrue() 115 SwitchPreference preference = getPreferenceForRestriction(mPreferenceGroup, in testOnPreferenceChange_changeToFalse() 126 SwitchPreference preference = getPreferenceForRestriction(mPreferenceGroup, in testOnPreferenceChange_changeToTrue()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/language/ |
D | LocalePreferenceProviderTest.java | 69 private LogicalPreferenceGroup mPreferenceGroup; field in LocalePreferenceProviderTest 89 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 90 screen.addPreference(mPreferenceGroup); in setUp() 108 mLocalePreferenceProvider.populateBasePreference(mPreferenceGroup, mIgnorables, mock( in testPopulateBasePreference_noSubSections() 110 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(3); in testPopulateBasePreference_noSubSections() 133 mLocalePreferenceProvider.populateBasePreference(mPreferenceGroup, mIgnorables, mock( in testPopulateBasePreference_withSubSections() 135 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in testPopulateBasePreference_withSubSections() 137 PreferenceCategory firstCategory = (PreferenceCategory) mPreferenceGroup.getPreference(0); in testPopulateBasePreference_withSubSections() 142 PreferenceCategory secondCategory = (PreferenceCategory) mPreferenceGroup.getPreference(1); in testPopulateBasePreference_withSubSections() 160 mLocalePreferenceProvider.populateBasePreference(mPreferenceGroup, mIgnorables, listener); in testClickListenerTriggered() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/ |
D | ExtraSettingsPreferenceControllerTest.java | 55 private PreferenceGroup mPreferenceGroup; field in ExtraSettingsPreferenceControllerTest 73 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 74 mPreferenceGroup.setIntent(FAKE_INTENT); in setUp() 76 ExtraSettingsPreferenceController.class, mPreferenceGroup); in setUp() 94 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in testRefreshUi_notInitializedYet() 106 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in testRefreshUi_initialized_noPreferenceAdded() 107 assertThat(mPreferenceGroup.isVisible()).isEqualTo(false); in testRefreshUi_initialized_noPreferenceAdded() 119 assertThat(mPreferenceGroup.isVisible()).isEqualTo(false); in testRefreshUi_noPreferenceAdded_shouldNotBeVisible() 131 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in testRefreshUi_initialized_preferenceAdded() 143 assertThat(mPreferenceGroup.isVisible()).isEqualTo(true); in testRefreshUi_preferenceAdded_shouldBeVisible() [all …]
|
/packages/apps/Settings/src/com/android/settings/connecteddevice/ |
D | AvailableMediaDeviceGroupController.java | 53 PreferenceGroup mPreferenceGroup; field in AvailableMediaDeviceGroupController 88 mPreferenceGroup = screen.findPreference(KEY); in displayPreference() 89 mPreferenceGroup.setVisible(false); in displayPreference() 112 if (mPreferenceGroup.getPreferenceCount() == 0) { in onDeviceAdded() 113 mPreferenceGroup.setVisible(true); in onDeviceAdded() 115 mPreferenceGroup.addPreference(preference); in onDeviceAdded() 120 mPreferenceGroup.removePreference(preference); in onDeviceRemoved() 121 if (mPreferenceGroup.getPreferenceCount() == 0) { in onDeviceRemoved() 122 mPreferenceGroup.setVisible(false); in onDeviceRemoved() 144 mPreferenceGroup. in updateTitle() [all …]
|
D | SavedDeviceGroupController.java | 49 PreferenceGroup mPreferenceGroup; field in SavedDeviceGroupController 77 mPreferenceGroup = screen.findPreference(KEY); in displayPreference() 78 mPreferenceGroup.setVisible(false); in displayPreference() 104 if (mPreferenceGroup.getPreferenceCount() == 0) { in onDeviceAdded() 105 mPreferenceGroup.setVisible(true); in onDeviceAdded() 107 mPreferenceGroup.addPreference(preference); in onDeviceAdded() 112 mPreferenceGroup.removePreference(preference); in onDeviceRemoved() 113 if (mPreferenceGroup.getPreferenceCount() == 0) { in onDeviceRemoved() 114 mPreferenceGroup.setVisible(false); in onDeviceRemoved()
|
D | ConnectedDeviceGroupController.java | 50 PreferenceGroup mPreferenceGroup; field in ConnectedDeviceGroupController 78 mPreferenceGroup = screen.findPreference(KEY); in displayPreference() 79 mPreferenceGroup.setVisible(false); in displayPreference() 109 if (mPreferenceGroup.getPreferenceCount() == 0) { in onDeviceAdded() 110 mPreferenceGroup.setVisible(true); in onDeviceAdded() 112 mPreferenceGroup.addPreference(preference); in onDeviceAdded() 117 mPreferenceGroup.removePreference(preference); in onDeviceRemoved() 118 if (mPreferenceGroup.getPreferenceCount() == 0) { in onDeviceRemoved() 119 mPreferenceGroup.setVisible(false); in onDeviceRemoved()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/sound/ |
D | VolumeSettingsPreferenceControllerTest.java | 68 private PreferenceGroup mPreferenceGroup; field in VolumeSettingsPreferenceControllerTest 99 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 100 screen.addPreference(mPreferenceGroup); in setUp() 103 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreferenceGroup); in setUp() 109 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in testRefreshUi_serviceNotStarted() 116 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in testRefreshUi_serviceStarted() 135 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in testRefreshUi_serviceStarted_multipleCalls() 142 SeekBarPreference preference = (SeekBarPreference) mPreferenceGroup.getPreference(0); in testRefreshUi_createdPreferenceHasMinMax() 152 SeekBarPreference preference = (SeekBarPreference) mPreferenceGroup.getPreference(0); in testOnPreferenceChange_ringtonePlays() 161 SeekBarPreference preference = (SeekBarPreference) mPreferenceGroup.getPreference(0); in testOnPreferenceChange_audioManagerSet() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/wifi/ |
D | WifiEntryListPreferenceControllerTest.java | 66 private PreferenceGroup mPreferenceGroup; field in WifiEntryListPreferenceControllerTest 94 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 95 screen.addPreference(mPreferenceGroup); in setUp() 99 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreferenceGroup); in setUp() 112 assertThat(mPreferenceGroup.isVisible()).isEqualTo(false); in refreshUi_emptyList_notVisible() 121 assertThat(mPreferenceGroup.isVisible()).isEqualTo(true); in refreshUi_notEmpty_visible() 130 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(wifiEntryList.size()); in refreshUi_notEmpty_listCount() 141 (CarUiTwoActionIconPreference) mPreferenceGroup.getPreference(0); in refreshUi_notSavedWifiEntry_noForgetButton() 153 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(wifiEntryList.size()); in onUxRestrictionsChanged_switchToSavedWifiEntriesOnly() 158 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(savedWifiEntryList.size()); in onUxRestrictionsChanged_switchToSavedWifiEntriesOnly() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/bluetooth/ |
D | BluetoothBondedDevicesPreferenceControllerTest.java | 71 private PreferenceGroup mPreferenceGroup; field in BluetoothBondedDevicesPreferenceControllerTest 123 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 124 screen.addPreference(mPreferenceGroup); in setUp() 129 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreferenceGroup); in setUp() 136 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in showsOnlyBondedDevices() 138 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in showsOnlyBondedDevices() 146 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in onDeviceBondStateChanged_refreshesUi() 154 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in onDeviceBondStateChanged_refreshesUi() 164 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in onDeviceClicked_connected_launchesDeviceDetailsFragment() 178 (BluetoothDevicePreference) mPreferenceGroup.getPreference(0); in bluetoothButtonClicked_connected_disconnectsFromDevice() [all …]
|
/packages/apps/Settings/src/com/android/settings/wifi/savedaccesspoints2/ |
D | SavedAccessPointsPreferenceController2.java | 40 private PreferenceGroup mPreferenceGroup; field in SavedAccessPointsPreferenceController2 64 mPreferenceGroup = screen.findPreference(getPreferenceKey()); in displayPreference() 94 final int preferenceCount = mPreferenceGroup.getPreferenceCount(); in updatePreference() 96 final String key = mPreferenceGroup.getPreference(i).getKey(); in updatePreference() 103 mPreferenceGroup.removePreference( in updatePreference() 104 mPreferenceGroup.findPreference(removedPreferenceKey)); in updatePreference() 109 if (mPreferenceGroup.findPreference(wifiEntry.getKey()) == null) { in updatePreference() 114 mPreferenceGroup.addPreference(preference); in updatePreference()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/ |
D | ApplicationsSettingsPreferenceControllerTest.java | 61 private LogicalPreferenceGroup mPreferenceGroup; field in ApplicationsSettingsPreferenceControllerTest 79 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 80 screen.addPreference(mPreferenceGroup); in setUp() 83 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreferenceGroup); in setUp() 89 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(0); in defaultInitialize_hasNoPreference() 108 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(1); in onDataLoaded_addPreference_hasOnePreference() 109 assertThat(mPreferenceGroup.getPreference(0).getTitle()).isEqualTo(LABEL); in onDataLoaded_addPreference_hasOnePreference() 110 assertThat(mPreferenceGroup.getPreference(0).getSummary()).isEqualTo(SIZE_STR); in onDataLoaded_addPreference_hasOnePreference() 130 Preference preference = mPreferenceGroup.getPreference(0); in preferenceClick_launchesDetailFragment()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/tts/ |
D | PreferredEngineOptionsPreferenceControllerTest.java | 70 private PreferenceGroup mPreferenceGroup; field in PreferredEngineOptionsPreferenceControllerTest 101 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 102 screen.addPreference(mPreferenceGroup); in setUp() 105 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreferenceGroup); in setUp() 119 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in onCreate_populatesGroup() 129 mPreferenceGroup.findPreference(CURRENT_ENGINE_INFO.name).getSummary()).isEqualTo( in refreshUi_currentEngineInfoSummarySet() 139 assertThat(mPreferenceGroup.findPreference(OTHER_ENGINE_INFO.name).getSummary()).isEqualTo( in refreshUi_otherEngineInfoSummaryEmpty() 148 Preference currentEngine = mPreferenceGroup.findPreference(CURRENT_ENGINE_INFO.name); in performClick_currentEngine_returnFalse() 158 Preference otherEngine = mPreferenceGroup.findPreference(OTHER_ENGINE_INFO.name); in performClick_otherEngine_returnTrue() 170 Preference otherEngine = mPreferenceGroup.findPreference(OTHER_ENGINE_INFO.name); in performClick_otherEngine_initSuccess_changeCurrentEngine() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/datetime/ |
D | TimeZonePickerScreenPreferenceControllerTest.java | 63 private PreferenceGroup mPreferenceGroup; field in TimeZonePickerScreenPreferenceControllerTest 83 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 84 screen.addPreference(mPreferenceGroup); in setUp() 87 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreferenceGroup); in setUp() 107 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(4); in testOnCreate_hasElements() 117 Preference preference = mPreferenceGroup.findPreference("testKey"); in testOnPreferenceClick_setTimeZoneCalled() 131 Preference preference = mPreferenceGroup.findPreference("testKey"); in testOnPreferenceClick_fragmentControllerGoBack() 143 Preference preference = mPreferenceGroup.findPreference("testKey"); in testOnPreferenceClick_broadcastFired() 173 for (int i = 0; i < mPreferenceGroup.getPreferenceCount(); i++) { in testTimeZonesComparator() 174 computedOrder.add(mPreferenceGroup.getPreference(i).getTitle().toString()); in testTimeZonesComparator()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/specialaccess/ |
D | AppOpsPreferenceControllerTest.java | 79 private PreferenceGroup mPreferenceGroup; field in AppOpsPreferenceControllerTest 90 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp() 96 mControllerHelper.setPreference(mPreferenceGroup); in setUp() 116 () -> mControllerHelper.setPreference(mPreferenceGroup)); in checkInitialized_noOpCode_throwsIllegalStateException() 128 () -> mControllerHelper.setPreference(mPreferenceGroup)); in checkInitialized_noPermission_throwsIllegalStateException() 140 () -> mControllerHelper.setPreference(mPreferenceGroup)); in checkInitialized_noNegativeOpMode_throwsIllegalStateException() 174 assertThat(mPreferenceGroup.getPreferenceCount()).isEqualTo(2); in onAppEntryListChanged_addsPreferencesForEntries() 175 assertThat(((TwoStatePreference) mPreferenceGroup.getPreference(0)).isChecked()).isTrue(); in onAppEntryListChanged_addsPreferencesForEntries() 176 assertThat(((TwoStatePreference) mPreferenceGroup.getPreference(1)).isChecked()).isFalse(); in onAppEntryListChanged_addsPreferencesForEntries() 187 TwoStatePreference appPref = (TwoStatePreference) mPreferenceGroup.getPreference(0); in onPreferenceChange_checkedState_setsAppOpModeAllowed() [all …]
|