/packages/apps/Settings/tests/robotests/src/com/android/settings/core/ |
D | BasePreferenceControllerTest.java | 53 private FakeBasePreferenceController mPreferenceController; field in BasePreferenceControllerTest 58 mPreferenceController = new FakeBasePreferenceController(mContext, KEY); in setUp() 74 mPreferenceController.setAvailability(AVAILABLE); in isAvailable_availableStatusAvailable_returnsTrue() 76 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_availableStatusAvailable_returnsTrue() 81 mPreferenceController.setAvailability(AVAILABLE_UNSEARCHABLE); in isAvailable_availableStatusUnSearchable_returnsTrue() 83 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_availableStatusUnSearchable_returnsTrue() 88 mPreferenceController.setAvailability(UNSUPPORTED_ON_DEVICE); in isAvailable_availableStatusUnsupportedOnDevice_returnsFalse() 90 assertThat(mPreferenceController.isAvailable()).isFalse(); in isAvailable_availableStatusUnsupportedOnDevice_returnsFalse() 96 mPreferenceController.setAvailability(CONDITIONALLY_UNAVAILABLE); in isAvailable_availableStatusConditionallyUnavailable_returnsFalse() 98 assertThat(mPreferenceController.isAvailable()).isFalse(); in isAvailable_availableStatusConditionallyUnavailable_returnsFalse() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/details/ |
D | WifiPrivacyPreferenceControllerTest.java | 47 private WifiPrivacyPreferenceController mPreferenceController; field in WifiPrivacyPreferenceControllerTest 59 mPreferenceController = spy(preferenceController); in setUp() 69 doReturn(PRIVACY_TRUSTED).when(mPreferenceController).getRandomizationValue(); in testUpdateState_wifiPrivacy_setCorrectValue() 71 mPreferenceController.updateState(mDropDownPreference); in testUpdateState_wifiPrivacy_setCorrectValue() 73 int prefValue = mPreferenceController.translateMacRandomizedValueToPrefValue( in testUpdateState_wifiPrivacy_setCorrectValue() 80 doReturn(PRIVACY_RANDOMIZED).when(mPreferenceController).getRandomizationValue(); in testUpdateState_wifiNotMetered_setCorrectValue() 82 mPreferenceController.updateState(mDropDownPreference); in testUpdateState_wifiNotMetered_setCorrectValue() 84 int prefValue = mPreferenceController.translateMacRandomizedValueToPrefValue( in testUpdateState_wifiNotMetered_setCorrectValue() 91 mPreferenceController = spy(new WifiPrivacyPreferenceController(mContext)); in testController_resilientToNullConfig() 93 mPreferenceController.getRandomizationValue(); in testController_resilientToNullConfig() [all …]
|
D | WifiMeteredPreferenceControllerTest.java | 47 private WifiMeteredPreferenceController mPreferenceController; field in WifiMeteredPreferenceControllerTest 55 mPreferenceController = spy( in setUp() 64 doReturn(METERED_OVERRIDE_METERED).when(mPreferenceController).getMeteredOverride(); in testUpdateState_wifiMetered_setCorrectValue() 66 mPreferenceController.updateState(mDropDownPreference); in testUpdateState_wifiMetered_setCorrectValue() 73 doReturn(METERED_OVERRIDE_NOT_METERED).when(mPreferenceController).getMeteredOverride(); in testUpdateState_wifiNotMetered_setCorrectValue() 75 mPreferenceController.updateState(mDropDownPreference); in testUpdateState_wifiNotMetered_setCorrectValue() 82 doReturn(METERED_OVERRIDE_NONE).when(mPreferenceController).getMeteredOverride(); in testUpdateState_wifiAuto_setCorrectValue() 84 mPreferenceController.updateState(mDropDownPreference); in testUpdateState_wifiAuto_setCorrectValue() 91 mPreferenceController = spy(new WifiMeteredPreferenceController(mContext, null)); in testController_resilientToNullConfig() 93 mPreferenceController.getMeteredOverride(); in testController_resilientToNullConfig() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | AccessibilityHearingAidPreferenceControllerTest.java | 77 private AccessibilityHearingAidPreferenceController mPreferenceController; field in AccessibilityHearingAidPreferenceControllerTest 100 mPreferenceController = new AccessibilityHearingAidPreferenceController(mContext, in setUp() 102 mPreferenceController.setPreference(mHearingAidPreference); in setUp() 114 mPreferenceController.onResume(); in onHearingAidStateChanged_connected_updateHearingAidSummary() 124 mPreferenceController.onResume(); in onHearingAidStateChanged_disconnected_updateHearingAidSummary() 135 mPreferenceController.onResume(); in onBluetoothStateChanged_bluetoothOff_updateHearingAidSummary() 146 mPreferenceController = spy(new AccessibilityHearingAidPreferenceController(mContext, in handleHearingAidPreferenceClick_noHearingAid_launchHearingAidInstructionDialog() 148 mPreferenceController.setPreference(mHearingAidPreference); in handleHearingAidPreferenceClick_noHearingAid_launchHearingAidInstructionDialog() 149 doNothing().when(mPreferenceController).launchHearingAidInstructionDialog(); in handleHearingAidPreferenceClick_noHearingAid_launchHearingAidInstructionDialog() 150 mPreferenceController.handlePreferenceTreeClick(mHearingAidPreference); in handleHearingAidPreferenceClick_noHearingAid_launchHearingAidInstructionDialog() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryAppListPreferenceControllerTest.java | 81 private BatteryAppListPreferenceController mPreferenceController; field in BatteryAppListPreferenceControllerTest 101 mPreferenceController = new BatteryAppListPreferenceController(mContext, KEY_APP_LIST, null, in setUp() 103 mPreferenceController.mBatteryUtils = mBatteryUtils; in setUp() 104 mPreferenceController.mAppListGroup = mAppListGroup; in setUp() 112 final String key = mPreferenceController.extractKeyFromSipper(mNormalBatterySipper); in testExtractKeyFromSipper_typeAPPUidObjectNull_returnPackageNames() 121 final String key = mPreferenceController.extractKeyFromSipper(mNormalBatterySipper); in testExtractKeyFromSipper_typeOther_returnDrainType() 131 final String key = mPreferenceController.extractKeyFromSipper(mNormalBatterySipper); in testExtractKeyFromSipper_typeUser_returnDrainTypeWithUserId() 140 final String key = mPreferenceController.extractKeyFromSipper(mNormalBatterySipper); in testExtractKeyFromSipper_typeAPPUidObjectNotNull_returnUid() 148 mPreferenceController.setUsageSummary(mPreference, mNormalBatterySipper); in testSetUsageSummary_timeLessThanOneMinute_DoNotSetSummary() 159 mPreferenceController.setUsageSummary(mPreference, mNormalBatterySipper); in testSetUsageSummary_timeMoreThanOneMinute_normalApp_setScreenSummary() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/ |
D | NightDisplayIntensityPreferenceControllerTest.java | 36 private NightDisplayIntensityPreferenceController mPreferenceController; field in NightDisplayIntensityPreferenceControllerTest 41 mPreferenceController = new NightDisplayIntensityPreferenceController(mContext, in setUp() 55 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_configuredAvailable_isActivated_available() 63 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_configuredAvailable_isNotActivated_available() 70 assertThat(mPreferenceController.isAvailable()).isFalse(); in isAvailable_configuredUnavailable_unavailable() 80 mPreferenceController.onPreferenceChange(null, 20); in onPreferenceChange_changesTemperature() 94 assertThat(mPreferenceController.getMax() - mPreferenceController.getMin()) in rangeOfSlider_staysWithinValidRange() 100 assertThat(mPreferenceController.getMin()).isEqualTo(0); in getMin_alwaysReturnsZero() 105 assertThat(mPreferenceController.isSliceable()).isTrue(); in isSliceableCorrectKey_returnsTrue()
|
D | NightDisplayActivationPreferenceControllerTest.java | 50 private NightDisplayActivationPreferenceController mPreferenceController; field in NightDisplayActivationPreferenceControllerTest 59 mPreferenceController = new NightDisplayActivationPreferenceController(mContext, in setUp() 61 mPreferenceController.displayPreference(mScreen); in setUp() 73 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_configuredAvailable() 80 assertThat(mPreferenceController.isAvailable()).isFalse(); in isAvailable_configuredUnavailable()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | DefaultAppsPreferenceControllerTest.java | 61 private DefaultAppsPreferenceController mPreferenceController; field in DefaultAppsPreferenceControllerTest 80 mPreferenceController = new DefaultAppsPreferenceController(mContext, PREFERENCE_KEY); in setUp() 85 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_shouldReturnTrue() 97 assertThat(mPreferenceController.getSummary()).isEqualTo("Browser1, Phone1, and Sms1"); in getSummary_allAvailable_shouldReturnAll() 108 assertThat(mPreferenceController.getSummary()).isEqualTo("Browser1 and Phone1"); in getSummary_browserAndDialerAvailable_shouldReturnBrowserAndDialer() 120 assertThat(mPreferenceController.getSummary()).isEqualTo("Browser1 and Sms1"); in getSummary_browserAndSmsAvailable_shouldReturnBrowserAndSms() 132 assertThat(mPreferenceController.getSummary()).isEqualTo("Phone1 and Sms1"); in getSummary_dialerAndSmsAvailable_shouldReturnDialerAndSms() 143 assertThat(mPreferenceController.getSummary()).isEqualTo("Browser1"); in getSummary_browserAvailable_shouldReturnBrowser() 154 assertThat(mPreferenceController.getSummary()).isEqualTo("Phone1"); in getSummary_dialerAvailable_shouldReturnDialer() 166 assertThat(mPreferenceController.getSummary()).isEqualTo("Sms1"); in getSummary_smsAvailable_shouldReturnSms() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/ |
D | PreferenceControllerTestHelper.java | 61 private final T mPreferenceController; field in PreferenceControllerTestHelper 75 mPreferenceController = ReflectionHelpers.callConstructor(preferenceControllerType, in PreferenceControllerTestHelper() 105 mPreferenceController.setPreference(preference); in setPreference() 113 return mPreferenceController; in getController() 174 mPreferenceController.onCreate(this::getLifecycle); in dispatchEvent() 177 mPreferenceController.onStart(this::getLifecycle); in dispatchEvent() 180 mPreferenceController.onResume(this::getLifecycle); in dispatchEvent() 183 mPreferenceController.onPause(this::getLifecycle); in dispatchEvent() 186 mPreferenceController.onStop(this::getLifecycle); in dispatchEvent() 190 mPreferenceController.onDestroy(this::getLifecycle); in dispatchEvent()
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/ |
D | StorageProfileFragment.java | 57 private StorageItemPreferenceController mPreferenceController; field in StorageProfileFragment 73 mPreferenceController.setVolume(mVolume); in onCreate() 75 mPreferenceController.setUserId(UserHandle.of(mUserId)); in onCreate() 103 mPreferenceController = in createPreferenceControllers() 110 controllers.add(mPreferenceController); in createPreferenceControllers() 127 mPreferenceController.onLoadFinished(result, mUserId); in onLoadFinished() 136 mPreferenceController = controller; in setPreferenceController()
|
D | StorageDashboardFragment.java | 77 private StorageItemPreferenceController mPreferenceController; field in StorageDashboardFragment 145 mPreferenceController.setVolume(mVolume); in onReceivedSizes() 146 mPreferenceController.setUsedSize(privateUsedBytes); in onReceivedSizes() 147 mPreferenceController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes() 161 mPreferenceController.onLoadFinished(mAppsResult, UserHandle.myUserId()); in onReceivedSizes() 192 mPreferenceController = new StorageItemPreferenceController(context, this, in createPreferenceControllers() 194 controllers.add(mPreferenceController); in createPreferenceControllers()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/ |
D | StorageProfileFragment.java | 57 private StorageItemPreferenceController mPreferenceController; field in StorageProfileFragment 73 mPreferenceController.setVolume(mVolume); in onCreate() 75 mPreferenceController.setUserId(UserHandle.of(mUserId)); in onCreate() 103 mPreferenceController = in createPreferenceControllers() 110 controllers.add(mPreferenceController); in createPreferenceControllers() 127 mPreferenceController.onLoadFinished(result, mUserId); in onLoadFinished() 136 mPreferenceController = controller; in setPreferenceController()
|
D | StorageDashboardFragment.java | 77 private StorageItemPreferenceController mPreferenceController; field in StorageDashboardFragment 145 mPreferenceController.setVolume(mVolume); in onReceivedSizes() 146 mPreferenceController.setUsedSize(privateUsedBytes); in onReceivedSizes() 147 mPreferenceController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes() 161 mPreferenceController.onLoadFinished(mAppsResult, UserHandle.myUserId()); in onReceivedSizes() 192 mPreferenceController = new StorageItemPreferenceController(context, this, in createPreferenceControllers() 194 controllers.add(mPreferenceController); in createPreferenceControllers()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | TelephonyBasePreferenceControllerTest.java | 47 private TestPreferenceController mPreferenceController; field in TelephonyBasePreferenceControllerTest 58 mPreferenceController = new TestPreferenceController(mContext, "prefKey"); in setUp() 63 mPreferenceController.init(VALID_SUB_ID); in isAvailable_validSubIdSet_returnTrue() 65 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_validSubIdSet_returnTrue() 73 assertThat(mPreferenceController.isAvailable()).isTrue(); in isAvailable_noIdSetHoweverHasDefaultOne_returnTrue() 78 assertThat(mPreferenceController.isAvailable()).isFalse(); in isAvailable_noDefaultAndNoSet_returnFalse()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | NotificationAssistantPreferenceControllerTest.java | 48 private NotificationAssistantPreferenceController mPreferenceController; field in NotificationAssistantPreferenceControllerTest 54 mPreferenceController = new TestPreferenceController(mContext, mBackend); in setUp() 62 assertEquals(noneLabel, mPreferenceController.getSummary()); in testGetSummary_noAssistant() 70 assertEquals(testName, mPreferenceController.getSummary()); in testGetSummary_TestAssistant()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/display/ |
D | ThemePreferenceControllerTest.java | 54 private ThemePreferenceController mPreferenceController; field in ThemePreferenceControllerTest 67 mPreferenceController = new ThemePreferenceController(mContext, mMockOverlayManager); in setup() 90 mPreferenceController.updateState(pref); in testUpdateState() 129 mPreferenceController.updateState(pref); in testUpdateState_withStaticOverlay()
|
/packages/apps/Settings/src/com/android/settings/slices/ |
D | SliceData.java | 69 private final String mPreferenceController; field in SliceData 111 return mPreferenceController; in getPreferenceController() 135 mPreferenceController = builder.mPrefControllerClassName; in SliceData()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/slices/ |
D | SliceData.java | 69 private final String mPreferenceController; field in SliceData 111 return mPreferenceController; in getPreferenceController() 135 mPreferenceController = builder.mPrefControllerClassName; in SliceData()
|