/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/ |
D | VolumeOptionMenuControllerTest.java | 63 private VolumeOptionMenuController mController; field in VolumeOptionMenuControllerTest 80 mController = new VolumeOptionMenuController(mContext, mock(Fragment.class), in setUp() 88 mController.setSelectedStorageEntry(unsupportedStorageEntry); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() 90 mController.onPrepareOptionsMenu(mMenu); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() 92 verify(mController.mFormat, atLeastOnce()).setVisible(true); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() 93 verify(mController.mRename, never()).setVisible(true); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() 94 verify(mController.mMount, never()).setVisible(true); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() 95 verify(mController.mUnmount, never()).setVisible(true); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() 96 verify(mController.mFormatAsPortable, never()).setVisible(true); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() 97 verify(mController.mFormatAsInternal, never()).setVisible(true); in onPrepareOptionsMenu_unSupportedDiskInfo_formatIsVisible() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/ |
D | ChooseLockGenericControllerTest.java | 66 private ChooseLockGenericController mController; field in ChooseLockGenericControllerTest 80 mController = createBuilder().build(); in setUp() 94 assertWithMessage(lock + " visible").that(mController.isScreenLockVisible(lock)) in isScreenLockVisible_shouldRespectResourceConfig() 100 assertWithMessage("NONE visible").that(mController.isScreenLockVisible(ScreenLockType.NONE)) in isScreenLockVisible_shouldRespectResourceConfig() 103 mController.isScreenLockVisible(ScreenLockType.SWIPE)).isFalse(); in isScreenLockVisible_shouldRespectResourceConfig() 110 mController.isScreenLockVisible(ScreenLockType.SWIPE)).isFalse(); in isScreenLockVisible_ManagedProfile_shouldHideInsecure() 111 assertWithMessage("NONE visible").that(mController.isScreenLockVisible(ScreenLockType.NONE)) in isScreenLockVisible_ManagedProfile_shouldHideInsecure() 120 mController.isScreenLockVisible(ScreenLockType.MANAGED)).isTrue(); in isScreenLockVisible_managedPasswordChoosable_shouldShowManaged() 125 assertThat(mController.isScreenLockEnabled(ScreenLockType.NONE)).isTrue(); in isScreenLockEnabled_Default() 126 assertThat(mController.isScreenLockEnabled(ScreenLockType.SWIPE)).isTrue(); in isScreenLockEnabled_Default() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | OemUnlockPreferenceControllerTest.java | 80 private OemUnlockPreferenceController mController; field in OemUnlockPreferenceControllerTest 93 mController = new OemUnlockPreferenceController(mContext, mActivity, mFragment); in setup() 94 when(mPreferenceScreen.findPreference(mController.getPreferenceKey())) in setup() 98 mController.displayPreference(mPreferenceScreen); in setup() 115 boolean returnValue = mController.isAvailable(); in isAvailable_shouldReturnTrueWhenOemLockManagerIsNotNull() 123 mController = new OemUnlockPreferenceController(mContext, mActivity, mFragment); in isAvailable_shouldReturnFalseWhenOemLockManagerIsNull() 124 boolean returnValue = mController.isAvailable(); in isAvailable_shouldReturnFalseWhenOemLockManagerIsNull() 131 mController = spy(mController); in onPreferenceChanged_turnOnUnlock() 132 doReturn(false).when(mController).showKeyguardConfirmation(mResources, in onPreferenceChanged_turnOnUnlock() 134 doNothing().when(mController).confirmEnableOemUnlock(); in onPreferenceChanged_turnOnUnlock() [all …]
|
D | PictureColorModePreferenceControllerTest.java | 59 private PictureColorModePreferenceController mController; field in PictureColorModePreferenceControllerTest 66 mController = new PictureColorModePreferenceController(mContext, mLifecycle); in setup() 67 when(mPreferenceScreen.findPreference(mController.getPreferenceKey())) in setup() 71 mController.displayPreference(mPreferenceScreen); in setup() 76 mController = spy(mController); in isAvailable_shouldReturnFalseWhenWideColorGambit() 77 doReturn(2).when(mController).getColorModeDescriptionsSize(); in isAvailable_shouldReturnFalseWhenWideColorGambit() 78 doReturn(true).when(mController).isWideColorGamut(); in isAvailable_shouldReturnFalseWhenWideColorGambit() 80 assertThat(mController.isAvailable()).isFalse(); in isAvailable_shouldReturnFalseWhenWideColorGambit() 85 mController = spy(mController); in isAvailable_shouldReturnTrueWhenNotWideColorGambit() 86 doReturn(2).when(mController).getColorModeDescriptionsSize(); in isAvailable_shouldReturnTrueWhenNotWideColorGambit() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | BlockPreferenceControllerTest.java | 78 private BlockPreferenceController mController; field in BlockPreferenceControllerTest 88 mController = spy( in setUp() 101 mController.isAvailable(); in testNoCrashIfNoOnResume() 102 mController.onSwitchChanged(null, false); in testNoCrashIfNoOnResume() 107 mController.onResume(null, null, null, null, null, null, null); in testIsAvailable_notIfNull() 108 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 117 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_channelNotBlockable() 118 assertTrue(mController.isAvailable()); in testIsAvailable_channelNotBlockable() 127 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_channelNonDefault() 128 assertTrue(mController.isAvailable()); in testIsAvailable_channelNonDefault() [all …]
|
D | NotificationPreferenceControllerTest.java | 71 private TestPreferenceController mController; field in NotificationPreferenceControllerTest 80 mController = new TestPreferenceController(mContext, mBackend); in setUp() 85 mController.isAvailable(); in noCrashIfNoOnResume() 86 mController.updateState(mock(Preference.class)); in noCrashIfNoOnResume() 87 assertFalse(mController.checkCanBeVisible(IMPORTANCE_UNSPECIFIED)); in noCrashIfNoOnResume() 88 mController.saveChannel(); in noCrashIfNoOnResume() 89 assertFalse(mController.isChannelBlockable()); in noCrashIfNoOnResume() 90 assertFalse(mController.isChannelGroupBlockable()); in noCrashIfNoOnResume() 95 mController.onResume(null, null, null, null, null, null, null); in isAvailable_notIfNull() 96 assertFalse(mController.isAvailable()); in isAvailable_notIfNull() [all …]
|
D | BadgePreferenceControllerTest.java | 78 private BadgePreferenceController mController; field in BadgePreferenceControllerTest 87 mController = spy(new BadgePreferenceController(mContext, mBackend)); in setUp() 92 mController.isAvailable(); in testNoCrashIfNoOnResume() 93 mController.updateState(mock(RestrictedSwitchPreference.class)); in testNoCrashIfNoOnResume() 94 mController.onPreferenceChange(mock(RestrictedSwitchPreference.class), true); in testNoCrashIfNoOnResume() 101 mController.onResume(appRow, mock(NotificationChannel.class), null, null, null, null, null); in testIsAvailable_notIfAppBlocked() 102 assertFalse(mController.isAvailable()); in testIsAvailable_notIfAppBlocked() 110 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notIfChannelBlocked() 111 assertFalse(mController.isAvailable()); in testIsAvailable_notIfChannelBlocked() 120 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_channel_notIfAppOff() [all …]
|
D | ConversationPriorityPreferenceControllerTest.java | 78 private ConversationPriorityPreferenceController mController; field in ConversationPriorityPreferenceControllerTest 87 mController = spy(new ConversationPriorityPreferenceController( in setUp() 93 mController.isAvailable(); in testNoCrashIfNoOnResume() 94 mController.updateState(mock(Preference.class)); in testNoCrashIfNoOnResume() 95 mController.onPreferenceChange(mock(Preference.class), true); in testNoCrashIfNoOnResume() 101 mController.onResume(appRow, null, null, null, null, null, null); in testIsAvailable_notChannelNull() 102 assertFalse(mController.isAvailable()); in testIsAvailable_notChannelNull() 109 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable() 110 assertTrue(mController.isAvailable()); in testIsAvailable() 117 mController.onResume(appRow, channel, null, null, null, null, in testIsAvailable_filteredIn() [all …]
|
D | HeaderPreferenceControllerTest.java | 62 private HeaderPreferenceController mController; field in HeaderPreferenceControllerTest 80 mController = spy(new HeaderPreferenceController(mContext, fragment)); in setUp() 86 mController.isAvailable(); in testNoCrashIfNoOnResume() 87 mController.updateState(mock(LayoutPreference.class)); in testNoCrashIfNoOnResume() 92 mController.onResume(null, null, null, null, null, null, null); in testIsAvailable_notIfNull() 93 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 100 mController.onResume(appRow, null, null, null, null, null, null); in testIsAvailable() 101 assertTrue(mController.isAvailable()); in testIsAvailable() 108 mController.onResume(appRow, null, null, null, null, null, new ArrayList<>()); in testIsAvailable_ignoredFilter() 109 assertTrue(mController.isAvailable()); in testIsAvailable_ignoredFilter() [all …]
|
D | AllowSoundPreferenceControllerTest.java | 77 private AllowSoundPreferenceController mController; field in AllowSoundPreferenceControllerTest 86 mController = in setUp() 92 mController.isAvailable(); in testNoCrashIfNoOnResume() 93 mController.updateState(mock(RestrictedSwitchPreference.class)); in testNoCrashIfNoOnResume() 94 mController.onPreferenceChange(mock(RestrictedSwitchPreference.class), true); in testNoCrashIfNoOnResume() 99 mController.onResume(null, mock(NotificationChannel.class), null, null, null, null, null); in testIsAvailable_notIfNull() 100 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 102 mController.onResume(mock(NotificationBackend.AppRow.class), null, null, null, null, null, in testIsAvailable_notIfNull() 104 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 111 mController.onResume(appRow, mock(NotificationChannel.class), null, null, null, null, null); in testIsAvailable_notIfAppBlocked() [all …]
|
D | ImportancePreferenceControllerTest.java | 80 private ImportancePreferenceController mController; field in ImportancePreferenceControllerTest 89 mController = spy(new ImportancePreferenceController( in setUp() 95 mController.isAvailable(); in testNoCrashIfNoOnResume() 96 mController.updateState(mock(Preference.class)); in testNoCrashIfNoOnResume() 101 mController.onResume(null, null, null, null, null, null, null); in testIsAvailable_notIfNull() 102 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 109 mController.onResume(appRow, mock(NotificationChannel.class), null, null, null, null, null); in testIsAvailable_ifAppBlocked() 110 assertFalse(mController.isAvailable()); in testIsAvailable_ifAppBlocked() 120 mController.onResume(appRow, channel, group, null, null, null, null); in testIsAvailable_isGroupBlocked() 121 assertFalse(mController.isAvailable()); in testIsAvailable_isGroupBlocked() [all …]
|
D | SoundPreferenceControllerTest.java | 89 private SoundPreferenceController mController; field in SoundPreferenceControllerTest 98 mController = spy(new SoundPreferenceController( in setUp() 104 mController.isAvailable(); in testNoCrashIfNoOnResume() 105 mController.updateState(mock(NotificationSoundPreference.class)); in testNoCrashIfNoOnResume() 106 mController.onPreferenceChange(mock(NotificationSoundPreference.class), Uri.EMPTY); in testNoCrashIfNoOnResume() 107 mController.handlePreferenceTreeClick(mock(NotificationSoundPreference.class)); in testNoCrashIfNoOnResume() 108 mController.onActivityResult(1, 1, null); in testNoCrashIfNoOnResume() 115 mController.onResume(appRow, null, null, null, null, null, null); in testIsAvailable_notIfChannelNull() 116 assertFalse(mController.isAvailable()); in testIsAvailable_notIfChannelNull() 123 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notIfNotImportant() [all …]
|
D | VibrationPreferenceControllerTest.java | 77 private VibrationPreferenceController mController; field in VibrationPreferenceControllerTest 87 mController = spy(new VibrationPreferenceController(mContext, mBackend)); in setUp() 95 mController.isAvailable(); in testNoCrashIfNoOnResume() 96 mController.updateState(mock(RestrictedSwitchPreference.class)); in testNoCrashIfNoOnResume() 97 mController.onPreferenceChange(mock(RestrictedSwitchPreference.class), true); in testNoCrashIfNoOnResume() 105 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notSystemDoesNotHave() 106 assertFalse(mController.isAvailable()); in testIsAvailable_notSystemDoesNotHave() 113 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notIfNotImportant() 114 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNotImportant() 122 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notIfDefaultChannel() [all …]
|
D | LightsPreferenceControllerTest.java | 81 private LightsPreferenceController mController; field in LightsPreferenceControllerTest 90 mController = spy(new LightsPreferenceController(mContext, mBackend)); in setUp() 105 mController.isAvailable(); in testNoCrashIfNoOnResume() 106 mController.updateState(mock(RestrictedSwitchPreference.class)); in testNoCrashIfNoOnResume() 107 mController.onPreferenceChange(mock(RestrictedSwitchPreference.class), true); in testNoCrashIfNoOnResume() 116 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notIfConfigNotAllowed() 117 assertFalse(mController.isAvailable()); in testIsAvailable_notIfConfigNotAllowed() 125 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notIfSettingNotAllowed() 126 assertFalse(mController.isAvailable()); in testIsAvailable_notIfSettingNotAllowed() 133 mController.onResume(appRow, channel, null, null, null, null, null); in testIsAvailable_notIfNotImportant() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | AppButtonsPreferenceControllerTest.java | 127 private AppButtonsPreferenceController mController; field in AppButtonsPreferenceControllerTest 145 mController = spy(new AppButtonsPreferenceController(mSettingsActivity, mFragment, in setUp() 155 mController.mButtonsPref = mButtonPrefs; in setUp() 156 mController.mPackageInfo = mPackageInfo; in setUp() 174 assertThat(mController.isAvailable()).isTrue(); in isAvailable_validPackageName_isTrue() 191 mController.retrieveAppEntry(); in retrieveAppEntry_hasAppEntry_notNull() 193 assertThat(mController.mAppEntry).isNotNull(); in retrieveAppEntry_hasAppEntry_notNull() 194 assertThat(mController.mPackageInfo).isNotNull(); in retrieveAppEntry_hasAppEntry_notNull() 202 mController.retrieveAppEntry(); in retrieveAppEntry_noAppEntry_null() 204 assertThat(mController.mAppEntry).isNull(); in retrieveAppEntry_noAppEntry_null() [all …]
|
D | AppBatteryPreferenceControllerTest.java | 85 private AppBatteryPreferenceController mController; field in AppBatteryPreferenceControllerTest 101 mController = spy(new AppBatteryPreferenceController( in setUp() 107 mController.mBatteryUtils = mBatteryUtils; in setUp() 108 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mBatteryPreference); in setUp() 113 assertThat(mController.isAvailable()).isTrue(); in testAppBattery_byDefault_shouldBeShown() 119 assertThat(mController.isAvailable()).isFalse(); in testAppBattery_ifDisabled_shouldNotBeShown() 129 assertThat(mController.findTargetUidBatteryConsumer(mBatteryUsageStats, TARGET_UID)) in findTargetBatteryConsumer_findCorrectBatteryConsumer() 135 mController.displayPreference(mScreen); in updateBattery_noBatteryStats_summaryNo() 137 mController.updateBattery(); in updateBattery_noBatteryStats_summaryNo() 145 mController.mBatteryUsageStats = mBatteryUsageStats; in updateBattery_hasBatteryStats_summaryPercent() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | MobileNetworkSummaryControllerTest.java | 81 private MobileNetworkSummaryController mController; field in MobileNetworkSummaryControllerTest 97 mController = new MobileNetworkSummaryController(mContext, mLifecycle); in setUp() 99 mPreference.setKey(mController.getPreferenceKey()); in setUp() 100 when(mPreferenceScreen.findPreference(eq(mController.getPreferenceKey()))).thenReturn( in setUp() 115 assertThat(mController.isAvailable()).isFalse(); in isAvailable_wifiOnlyMode_notAvailable() 122 assertThat(mController.isAvailable()).isFalse(); in isAvailable_secondaryUser_notAvailable() 128 mController.displayPreference(mPreferenceScreen); in getSummary_noSubscriptions_correctSummaryAndClickHandler() 129 mController.onResume(); in getSummary_noSubscriptions_correctSummaryAndClickHandler() 130 assertThat(mController.getSummary()).isEqualTo("Add a network"); in getSummary_noSubscriptions_correctSummaryAndClickHandler() 142 assertThat(TextUtils.isEmpty(mController.getSummary())).isTrue(); in getSummary_noSubscriptionsNoEuiccMgr_correctSummaryAndClickHandler() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/ |
D | OwnerInfoPreferenceControllerTest.java | 73 private OwnerInfoPreferenceController mController; field in OwnerInfoPreferenceControllerTest 88 mController = spy(new OwnerInfoPreferenceController(mContext, mFragment)); in setUp() 89 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 90 ReflectionHelpers.setField(mController, "mLockPatternUtils", mLockPatternUtils); in setUp() 95 assertThat(mController.isAvailable()).isTrue(); in isAvailable_shouldReturnTrue() 100 mController.onResume(); in onResume_shouldUpdateEnableState() 102 verify(mController).updateEnableState(); in onResume_shouldUpdateEnableState() 107 mController.onResume(); in onResume_shouldUpdateSummary() 109 verify(mController).updateSummary(); in onResume_shouldUpdateSummary() 115 doReturn(true).when(mController).isDeviceOwnerInfoEnabled(); in updateSummary_deviceOwnerInfoEnabled_shouldSetDeviceOwnerInfoSummary() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/ |
D | StorageItemPreferenceControllerTest.java | 84 private StorageItemPreferenceController mController; field in StorageItemPreferenceControllerTest 98 mController = new StorageItemPreferenceController(mContext, mFragment, mVolume, mSvp, in setUp() 161 mController.handlePreferenceTreeClick(mPreference); in launchPublicStorageIntent_nonNullBrowseIntent_settingsIntent() 174 mController = new StorageItemPreferenceController(mockContext, mFragment, mVolume, in launchImagesIntent_resolveActionViewNull_settingsIntent() 176 mController.handlePreferenceTreeClick(mPreference); in launchImagesIntent_resolveActionViewNull_settingsIntent() 184 assertThat(intent.getData()).isEqualTo(mController.mImagesUri); in launchImagesIntent_resolveActionViewNull_settingsIntent() 191 mController = new StorageItemPreferenceController(mockContext, mFragment, mVolume, in launchAudioIntent_resolveActionViewNull_settingsIntent() 193 mController.handlePreferenceTreeClick(mPreference); in launchAudioIntent_resolveActionViewNull_settingsIntent() 201 assertThat(intent.getData()).isEqualTo(mController.mAudioUri); in launchAudioIntent_resolveActionViewNull_settingsIntent() 206 mController.displayPreference(mPreferenceScreen); in setVolume_nullVolume_hidePreferences() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/ |
D | PreferenceControllerTest.java | 63 private FakePreferenceController mController; field in PreferenceControllerTest 75 mController = mControllerHelper.getController(); in setUp() 89 assertThat(mController.getPreference()).isEqualTo(mPreference); in setPreference_correctType_setsPreference() 94 assertThat(mController.getCheckInitializedCallCount()).isEqualTo(1); in setPreference_callsCheckInitialized() 106 assertThat(mController.getHandlePreferenceChangedCallCount()).isEqualTo(1); in setPreference_registersOnPreferenceChangeListener() 107 assertThat(mController.getHandlePreferenceChangedPreferenceArg()).isEqualTo(mPreference); in setPreference_registersOnPreferenceChangeListener() 108 assertThat(mController.getHandlePreferenceChangedValueArg()).isEqualTo(newValue); in setPreference_registersOnPreferenceChangeListener() 119 assertThat(mController.getHandlePreferenceClickedCallCount()).isEqualTo(1); in setPreference_registersOnPreferenceClickListener() 120 assertThat(mController.getHandlePreferenceClickedArg()).isEqualTo(mPreference); in setPreference_registersOnPreferenceClickListener() 125 mController.onUxRestrictionsChanged(NO_SETUP_UX_RESTRICTIONS); in onUxRestrictionsChanged_updatesUxRestrictions() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/ |
D | SubscriptionsPreferenceControllerTest.java | 114 private FakeSubscriptionsPreferenceController mController; field in SubscriptionsPreferenceControllerTest 150 mController = new FakeSubscriptionsPreferenceController(mContext, mLifecycle, in setUp() 164 assertThat(mController.isAvailable()).isFalse(); in isAvailable_oneSubscription_availableFalse() 172 assertThat(mController.isAvailable()).isTrue(); in isAvailable_oneSubAndProviderOn_availableTrue() 179 assertThat(mController.isAvailable()).isTrue(); in isAvailable_twoSubscriptions_availableTrue() 187 assertThat(mController.isAvailable()).isTrue(); in isAvailable_fiveSubscriptions_availableTrue() 194 assertThat(mController.isAvailable()).isTrue(); in isAvailable_airplaneModeOn_availableFalse() 198 assertThat(mController.isAvailable()).isFalse(); in isAvailable_airplaneModeOn_availableFalse() 206 mController.onResume(); in onAirplaneModeChanged_airplaneModeTurnedOn_eventFired() 207 mController.displayPreference(mPreferenceScreen); in onAirplaneModeChanged_airplaneModeTurnedOn_eventFired() [all …]
|
D | EnabledNetworkModePreferenceControllerTest.java | 81 private EnabledNetworkModePreferenceController mController; field in EnabledNetworkModePreferenceControllerTest 107 mController = new EnabledNetworkModePreferenceController(mContext, KEY); in setUp() 110 mController.init(mLifecycle, SUB_ID); in setUp() 111 mPreference.setKey(mController.getPreferenceKey()); in setUp() 121 assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE); in getAvailabilityStatus_hideCarrierNetworkSettings_returnUnavailable() 133 assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE); in getAvailabilityStatus_hidePreferredNetworkType_returnUnavailable() 139 assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE); in getAvailabilityStatus_hidePreferredNetworkType_returnUnavailable() 142 assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE); in getAvailabilityStatus_hidePreferredNetworkType_returnUnavailable() 152 assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE); in getAvailabilityStatus_notWorldPhone_returnAvailable() 160 mController.updateState(mPreference); in updateState_LteWorldPhone_GlobalHasLte() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/defaultapps/ |
D | DefaultAppsPickerBasePreferenceControllerTest.java | 63 private TestDefaultAppsPickerBasePreferenceController mController; field in DefaultAppsPickerBasePreferenceControllerTest 82 mController = new TestDefaultAppsPickerBasePreferenceController(mContext, in setUp() 84 PreferenceControllerTestUtil.assignPreference(mController, mPreferenceGroup); in setUp() 89 mController.setCurrentDefault(""); in refreshUi_noCandidates_hasSingleNoneElement() 90 mController.onCreate(mLifecycleOwner); in refreshUi_noCandidates_hasSingleNoneElement() 91 mController.refreshUi(); in refreshUi_noCandidates_hasSingleNoneElement() 104 mController.setCurrentDefault(""); in refreshUi_noCandidates_noNoneElement() 105 mController.setIncludeNonePreference(false); in refreshUi_noCandidates_noNoneElement() 106 mController.onCreate(mLifecycleOwner); in refreshUi_noCandidates_noNoneElement() 107 mController.refreshUi(); in refreshUi_noCandidates_noNoneElement() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | AppPermissionsPreferenceControllerTest.java | 47 private AppPermissionsPreferenceController mController; field in AppPermissionsPreferenceControllerTest 54 mController = spy(new AppPermissionsPreferenceController(mContext, "pref_key")); in setUp() 59 assertThat(mController.isAvailable()).isTrue(); in isAvailable_shouldAlwaysReturnTrue() 64 doNothing().when(mController).queryPermissionSummary(); in updateState_shouldResetNumPackageChecked() 65 mController.mNumPackageChecked = 3; in updateState_shouldResetNumPackageChecked() 67 mController.updateState(mPreference); in updateState_shouldResetNumPackageChecked() 69 assertThat(mController.mNumPackageChecked).isEqualTo(0); in updateState_shouldResetNumPackageChecked() 74 doNothing().when(mController).queryPermissionSummary(); in updateSummary_noGrantedPermission_shouldSetNoPermissionGrantedSummary() 75 mController.updateState(mPreference); in updateSummary_noGrantedPermission_shouldSetNoPermissionGrantedSummary() 76 mController.mNumPackageChecked = 3; in updateSummary_noGrantedPermission_shouldSetNoPermissionGrantedSummary() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | VolumeSeekBarPreferenceControllerTest.java | 54 private VolumeSeekBarPreferenceControllerTestable mController; field in VolumeSeekBarPreferenceControllerTest 61 mController = new VolumeSeekBarPreferenceControllerTestable(mContext, mCallback, true, in setUp() 63 mController.setAudioHelper(mHelper); in setUp() 68 mController.displayPreference(mScreen); in displayPreference_available_shouldUpdatePreference() 77 mController = new VolumeSeekBarPreferenceControllerTestable(mContext, mCallback, false, in displayPreference_notAvailable_shouldNotUpdatePreference() 80 mController.displayPreference(mScreen); in displayPreference_notAvailable_shouldNotUpdatePreference() 89 mController.displayPreference(mScreen); in onResume_shouldResumePreference() 91 mController.onResume(); in onResume_shouldResumePreference() 98 mController.displayPreference(mScreen); in onPause_shouldPausePreference() 100 mController.onPause(); in onPause_shouldPausePreference() [all …]
|