/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/ |
H A D | FakeHdmiCecConfig.java | 49 doReturn(true).when(resources).getBoolean( in buildResources() 51 doReturn(true).when(resources).getBoolean( in buildResources() 53 doReturn(true).when(resources).getBoolean( in buildResources() 55 doReturn(true).when(resources).getBoolean( in buildResources() 60 doReturn(true).when(resources).getBoolean( in buildResources() 62 doReturn(true).when(resources).getBoolean( in buildResources() 64 doReturn(true).when(resources).getBoolean( in buildResources() 66 doReturn(true).when(resources).getBoolean( in buildResources() 71 doReturn(true).when(resources).getBoolean( in buildResources() 73 doReturn(true).when(resources).getBoolean( in buildResources() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/ |
H A D | TypeClassifierTest.java | 34 import static org.mockito.Mockito.when; 64 when(mDataProvider.isUp()).thenReturn(false); in testPass_QuickSettings() 76 when(mDataProvider.isUp()).thenReturn(false); in testFalse_QuickSettings() 80 when(mDataProvider.isUp()).thenReturn(true); in testFalse_QuickSettings() 87 when(mDataProvider.isUp()).thenReturn(false); in testPass_PulseExpand() 99 when(mDataProvider.isUp()).thenReturn(false); in testFalse_PulseExpand() 103 when(mDataProvider.isUp()).thenReturn(true); in testFalse_PulseExpand() 126 when(mDataProvider.isUp()).thenReturn(true); in testFalse_NotificationDragDown() 138 when(mDataProvider.isUp()).thenReturn(true); in testPass_NotificationDismiss() 146 when(mDataProvider.isUp()).thenReturn(true); in testPass_NotificationDismiss() [all …]
|
H A D | DiagonalClassifierTest.java | 25 import static org.mockito.Mockito.when; 102 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe() 106 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe() 110 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe() 114 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe() 145 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyHorizontalSwipe() 149 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyHorizontalSwipe() 153 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyHorizontalSwipe() 157 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyHorizontalSwipe() 164 when(mDataProvider.getAngle()).thenReturn( in testPass_AffordanceSwipe() [all …]
|
H A D | BrightLineClassifierTest.java | 30 import static org.mockito.Mockito.when; 97 when(mClassifierA.classifyGesture(anyInt(), anyDouble(), anyDouble())) in setup() 99 when(mClassifierB.classifyGesture(anyInt(), anyDouble(), anyDouble())) in setup() 108 when(mKeyguardStateController.isShowing()).thenReturn(true); in setup() 109 when(mFalsingDataProvider.isUnfolded()).thenReturn(false); in setup() 150 when(mClassifierA.classifyGesture(anyInt(), anyDouble(), anyDouble())) in testIsFalseTouch_ClassifierARejects() 157 when(mClassifierA.classifyGesture(anyInt(), anyDouble(), anyDouble())) in testIsFalseTouch_SeekBar_FalseTouch() 196 when(mFalsingDataProvider.isJustUnlockedWithFace()).thenReturn(true); in testIsFalseTouch_FaceAuth() 206 when(mFalsingDataProvider.isDocked()).thenReturn(true); in testIsFalseTouch_Docked() 238 when(mHistoryTracker.falseBelief()).thenReturn(1.0); in testIsFalseSingleTap_RobustCheck_NoFaceAuth() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/ |
H A D | DozeConfigurationUtil.java | 21 import static org.mockito.Mockito.when; 37 when(params.getPulseOnSigMotion()).thenReturn(false); in createMockParameters() 38 when(params.getPickupVibrationThreshold()).thenReturn(0); in createMockParameters() 39 when(params.getProxCheckBeforePulse()).thenReturn(true); in createMockParameters() 44 when(params.longPressUsesProx()).thenReturn(true); in createMockParameters() 60 when(config.enabled(anyInt())).thenReturn(true); in createMockConfig() 63 when(config.doubleTapSensorType()).thenReturn(null); in createMockConfig() 64 when(config.longPressSensorType()).thenReturn(null); in createMockConfig() 66 when(config.quickPickupSensorType()).thenReturn(null); in createMockConfig() 69 when(config.tapSensorAvailable()).thenReturn(true); in createMockConfig() [all …]
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/people/prediction/ |
H A D | SharesheetModelScorerTest.java | 26 import static org.mockito.Mockito.when; 169 when(mEventIndex1.getActiveTimeSlots()).thenReturn( in testComputeScore() 173 when(mEventIndex4.getActiveTimeSlots()).thenReturn( in testComputeScore() 175 when(mEventIndex5.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScore() 192 when(mEventIndex8.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScore() 194 when(mEventIndex10.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScore() 220 when(mEventIndex1.getActiveTimeSlots()).thenReturn( in testComputeScoreForAppShare() 224 when(mEventIndex4.getActiveTimeSlots()).thenReturn( in testComputeScoreForAppShare() 226 when(mEventIndex5.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScoreForAppShare() 243 when(mEventIndex8.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScoreForAppShare() [all …]
|
H A D | ShareTargetPredictorTest.java | 30 import static org.mockito.Mockito.when; 119 when(mContext.createContextAsUser(any(), any())).thenReturn(mContext); in setUp() 122 when(mContext.getSystemService(AppPredictionManager.class)) in setUp() 160 when(mPackageData1.getEventHistory("sc1")).thenReturn(mEventHistory1); in testPredictTargets() 161 when(mPackageData1.getEventHistory("sc2")).thenReturn(mEventHistory2); in testPredictTargets() 162 when(mPackageData2.getEventHistory("sc3")).thenReturn(mEventHistory3); in testPredictTargets() 163 when(mEventHistory1.getEventIndex(anySet())).thenReturn(mEventIndex1); in testPredictTargets() 345 when(mDataManager.getPackage(PACKAGE_3, USER_ID)).thenReturn(null); in testSortTargets() 424 when(mockContext.getPackageName()).thenReturn(packageName); in buildShortcut() 425 when(mockContext.getUserId()).thenReturn(USER_ID); in buildShortcut() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ |
H A D | NotificationSwipeHelperTest.java | 34 import static org.mockito.Mockito.when; 235 when(mMenuRow.shouldShowMenu()).thenReturn(true); in testHandleUpEvent_menuRowWithoutMenu_dismiss() 251 when(mMenuRow.shouldShowMenu()).thenReturn(true); in testHandleUpEvent_menuRowWithoutMenu_snapback() 268 when(mMenuRow.shouldShowMenu()).thenReturn(true); in testHandleUpEvent_menuRowWithOpenMenu_dismissed() 285 when(mMenuRow.shouldShowMenu()).thenReturn(true); in testHandleUpEvent_menuRowWithOpenMenu_snapback() 614 doReturn(5f).when(mEvent).getRawX(); in testIsTouchInView() 615 doReturn(10f).when(mEvent).getRawY(); in testIsTouchInView() 631 doReturn(50f).when(mEvent).getRawX(); in testIsTouchInView() 642 doReturn(5f).when(mEvent).getRawX(); in testIsTouchInView_expandable() 643 doReturn(10f).when(mEvent).getRawY(); in testIsTouchInView_expandable() [all …]
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
H A D | LockSettingsShellCommandTest.java | 37 import static org.mockito.Mockito.when; 106 when(mLockPatternUtils.checkCredential( in testWrongPassword() 121 when(mLockPatternUtils.checkCredential( in testChangePin() 141 when(mLockPatternUtils.checkCredential( in testChangePin_nonCompliant() 168 when(mLockPatternUtils.checkCredential( in testChangePassword() 188 when(mLockPatternUtils.checkCredential( in testChangePassword_nonCompliant() 213 when(mLockPatternUtils.checkCredential( in testChangePattern() 232 when(mLockPatternUtils.checkCredential( in testChangePattern_nonCompliant() 258 when(mLockPatternUtils.checkCredential( in testClear() 277 when(mLockPatternUtils.checkCredential( in testClear_nonCompliant() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/ |
H A D | GlobalActionsColumnLayoutTest.java | 83 doReturn(50f).when(mColumnLayout).getAnimationDistance(); in testGetAnimationOffsetX() 97 doReturn(50f).when(mColumnLayout).getAnimationDistance(); in testGetAnimationOffsetY() 140 doReturn(true).when(mColumnLayout).shouldSnapToPowerButton(); in testUpdateSnap_snapThenSnap() 174 doReturn(1000).when(mColumnLayout).getMeasuredHeight(); in testShouldSnapToPowerButton_vertical() 176 doReturn(wrapper).when(mColumnLayout).getWrapper(); in testShouldSnapToPowerButton_vertical() 177 doReturn(500).when(wrapper).getMeasuredHeight(); in testShouldSnapToPowerButton_vertical() 181 doReturn(600).when(mColumnLayout).getMeasuredHeight(); in testShouldSnapToPowerButton_vertical() 190 doReturn(1000).when(mColumnLayout).getMeasuredWidth(); in testShouldSnapToPowerButton_horizontal() 192 doReturn(wrapper).when(mColumnLayout).getWrapper(); in testShouldSnapToPowerButton_horizontal() 193 doReturn(500).when(wrapper).getMeasuredWidth(); in testShouldSnapToPowerButton_horizontal() [all …]
|
H A D | GlobalActionsLayoutTest.java | 161 doReturn(0).when(mAdapter).countSeparatedItems(); in testOnUpdateList_noItems() 162 doReturn(0).when(mAdapter).countListItems(); in testOnUpdateList_noItems() 173 doReturn(1).when(mAdapter).countSeparatedItems(); in testOnUpdateList_oneSeparatedOneList() 174 doReturn(1).when(mAdapter).countListItems(); in testOnUpdateList_oneSeparatedOneList() 195 doReturn(2).when(mAdapter).countSeparatedItems(); in testOnUpdateList_twoSeparatedItems() 196 doReturn(0).when(mAdapter).countListItems(); in testOnUpdateList_twoSeparatedItems() 219 doReturn(2).when(mAdapter).countSeparatedItems(); in testOnUpdateList_twoSeparatedItems_reverse() 220 doReturn(0).when(mAdapter).countListItems(); in testOnUpdateList_twoSeparatedItems_reverse() 243 doReturn(0).when(mAdapter).countSeparatedItems(); in testOnUpdateList_fourInList() 244 doReturn(4).when(mAdapter).countListItems(); in testOnUpdateList_fourInList() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/ |
H A D | WifiStatusTrackerTest.java | 24 import static org.mockito.Mockito.when; 89 when(primaryWifiInfo.isPrimary()).thenReturn(true); in testWifiInfoClearedOnPrimaryNetworkLost() 91 when(primaryWifiInfo.getRssi()).thenReturn(primaryRssi); in testWifiInfoClearedOnPrimaryNetworkLost() 109 when(nonPrimaryWifiInfo.isPrimary()).thenReturn(false); in testWifiInfoClearedOnPrimaryNetworkLost() 143 when(primaryWifiInfo.isPrimary()).thenReturn(true); in isCarrierMerged_typicalWifi_false() 175 when(primaryWifiInfo.isPrimary()).thenReturn(true); in isCarrierMerged_cellularCarrierMergedWifi_true() 201 when(underlyingNetworkCapabilities.getTransportInfo()) in isCarrierMerged_cellularWithUnderlyingCarrierMergedWifi_true() 212 when(mainCapabilities.getUnderlyingNetworks()) in isCarrierMerged_cellularWithUnderlyingCarrierMergedWifi_true() 227 when(primaryWifiInfo.isPrimary()).thenReturn(true); in isDefaultNetwork_typicalWifi_true() 259 when(primaryWifiInfo.isPrimary()).thenReturn(true); in isDefaultNetwork_cellularCarrierMergedWifi_true() [all …]
|
/aosp14/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/ |
H A D | OneHandedControllerTest.java | 35 import static org.mockito.Mockito.when; 116 when(mMockDisplayAreaOrganizer.isReady()).thenReturn(true); in setUp() 342 when(mMockDisplayLayout.isLandscape()).thenReturn(true); in testRotation90CanNotStartOneHanded() 354 when(mMockDisplayAreaOrganizer.isReady()).thenReturn(true); in testRotation180CanStartOneHanded() 355 when(mMockDisplayLayout.isLandscape()).thenReturn(false); in testRotation180CanStartOneHanded() 367 when(mMockDisplayLayout.isLandscape()).thenReturn(true); in testRotation270CanNotStartOneHanded() 441 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testStateNotActive_shortcutRequestInActivate_skipAction() 453 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testStateNotActive_shortcutRequestActivate_doAction() 489 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testOneHandedDisabled_shortcutTrigger_thenAutoEnabled() 502 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testControllerInit_tutorialAddStateChangeListener() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
H A D | BiometricsUnlockControllerTest.java | 34 import static org.mockito.Mockito.when; 145 when(mVibratorHelper.hasVibrator()).thenReturn(true); in setUp() 479 when(mUpdateMonitor.isDreaming()).thenReturn(true); in onFPFailureNoHaptics_dreaming_showLockScreen() 508 when(mWakefulnessLifecycle.getLastWakeReason()) in onSideFingerprintSuccess_recentPowerButtonPress_noHaptic() 527 when(mWakefulnessLifecycle.getLastWakeReason()) in onSideFingerprintSuccess_oldPowerButtonPress_playHaptic() 549 when(mWakefulnessLifecycle.getLastWakeReason()) in onSideFingerprintSuccess_oldPowerButtonPress_playOneWayHaptic() 575 when(mWakefulnessLifecycle.getLastWakeReason()) in onSideFingerprintSuccess_recentGestureWakeUp_playHaptic() 596 when(mWakefulnessLifecycle.getLastWakeReason()) in onSideFingerprintSuccess_recentGestureWakeUp_playOnewayHaptic() 615 when(mWakefulnessLifecycle.getLastWakeReason()) in onSideFingerprintFail_alwaysPlaysHaptic() 632 when(mWakefulnessLifecycle.getLastWakeReason()) in onSideFingerprintFail_alwaysPlaysOneWayHaptic() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ |
H A D | NotificationMenuRowTest.java | 29 import static org.mockito.Mockito.when; 68 when(mRow.getEntry()).thenReturn(entry); in setup() 159 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 169 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 173 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 190 doReturn(30).when(row).getSpaceForMenu(); in testGetMenuSnapTarget() 289 when(row.getParent()).thenReturn(parent); in testCanBeDismissed() 329 doNothing().when(row).cancelDrag(); in onSnapBack() 367 doNothing().when(row).cancelDrag(); in testOnDismiss() 384 doNothing().when(row).beginDrag(); in testOnDown() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/ |
H A D | MediaOutputDialogTest.java | 25 import static org.mockito.Mockito.when; 177 when(mMediaDevice.isBLEDevice()).thenReturn(true); in getStopButtonVisibility_remoteBLEDevice_returnVisible() 190 when(mMediaDevice.isBLEDevice()).thenReturn(false); in getStopButtonVisibility_remoteNonBLEDevice_returnGone() 209 when(mMediaDevice.isBLEDevice()).thenReturn(true); in isBroadcastSupported_flagOnAndConnectBleDevice_returnsTrue() 221 when(mMediaDevice.isBLEDevice()).thenReturn(false); in isBroadcastSupported_flagOnAndNoBleDevice_returnsFalse() 241 when(mMediaDevice.isBLEDevice()).thenReturn(true); in isBroadcastSupported_flagOffAndConnectToBleDevice_returnsTrue() 288 when(mMediaDevice.isBLEDevice()).thenReturn(true); in getBroadcastIconVisibility_isBroadcasting_returnVisible() 299 when(mMediaDevice.isBLEDevice()).thenReturn(true); in getBroadcastIconVisibility_noBroadcasting_returnGone() 319 when(mMediaDescription.getIconBitmap()) in getHeaderIcon_getFromMediaControllerMetaData() 330 when(mMediaDescription.getTitle()) in getHeaderText_getFromMediaControllerMetaData() [all …]
|
H A D | MediaOutputControllerTest.java | 34 import static org.mockito.Mockito.when; 232 when(entry.getSbn()).thenReturn(sbn); in setUp() 238 when(token.getBinder()).thenReturn(binder); in setUp() 436 when(mMediaDevice1.getFeatures()).thenReturn( in advanced_onDeviceListUpdateWithConnectedDeviceRemote_verifyItemSize() 685 when(mMediaDevice1.getState()).thenReturn( in isAnyDeviceTransferring_deviceStateIsConnecting_returnsTrue() 697 when(mMediaDevice1.getState()).thenReturn( in isAnyDeviceTransferring_advancedLayoutSupport() 905 when(entry.getSbn()).thenReturn(sbn); in getNotificationLargeIcon_withoutLargeIcon_returnsNull() 924 when(entry.getSbn()).thenReturn(sbn); in getNotificationLargeIcon_withPackageNameAndMediaSession_returnsIconCompat() 943 when(entry.getSbn()).thenReturn(sbn); in getNotificationLargeIcon_withPackageNameAndNoMediaSession_returnsNull() 961 when(entry.getSbn()).thenReturn(sbn); in getNotificationSmallIcon_withoutSmallIcon_returnsNull() [all …]
|
/aosp14/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
H A D | ShortcutHelperTest.java | 27 import static org.mockito.Mockito.when; 255 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_notLongLived() 259 when(si.isEnabled()).thenReturn(true); in testGetValidShortcutInfo_notLongLived() 273 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_notSharingShortcut() 277 when(si.isEnabled()).thenReturn(true); in testGetValidShortcutInfo_notSharingShortcut() 290 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_notEnabled() 294 when(si.isEnabled()).thenReturn(false); in testGetValidShortcutInfo_notEnabled() 307 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_isValid() 311 when(si.isEnabled()).thenReturn(true); in testGetValidShortcutInfo_isValid() 328 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_isValidButUserLocked() [all …]
|
/aosp14/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
H A D | DisplayRotationImmersiveAppCompatPolicyTests.java | 30 import static com.android.dx.mockito.inline.extended.ExtendedMockito.when; 67 when(mMockTask.getWindowingMode()).thenReturn(WINDOWING_MODE_FULLSCREEN); in setUp() 68 when(mMockActivityRecord.getTask()).thenReturn(mMockTask); in setUp() 69 when(mMockActivityRecord.areBoundsLetterboxed()).thenReturn(false); in setUp() 73 when(mMockWindowState.getRequestedVisibleTypes()).thenReturn(0); in setUp() 74 when(mMockActivityRecord.findMainWindow()).thenReturn(mMockWindowState); in setUp() 78 when(mDisplayContent.getIgnoreOrientationRequest()).thenReturn(true); in setUp() 83 when(mMockLetterboxConfiguration in setUp() 173 when(mMockActivityRecord.areBoundsLetterboxed()).thenReturn(true); in testIsRotationLockEnforced_activityIsLetterboxed_lockNotEnforced() 184 when(mMockTask.getWindowingMode()).thenReturn(WINDOWING_MODE_PINNED); in testIsRotationLockEnforced_notFullscreen_lockNotEnforced() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/ |
H A D | QSSecurityFooterTest.java | 31 import static org.mockito.Mockito.when; 128 when(mSecurityController.getDeviceOwnerComponentOnAnyUser()) in setUp() 178 when(mSecurityController.getDeviceOwnerOrganizationName()) in testManagedOwnerName() 192 when(mSecurityController.getDeviceOwnerOrganizationName()) in testManagedFinancedDeviceWithOwnerName() 213 when(mockUserInfo.isDemo()).thenReturn(true); in testManagedDemoMode() 214 when(mUserTracker.getUserInfo()).thenReturn(mockUserInfo); in testManagedDemoMode() 264 when(mSecurityController.getDeviceOwnerOrganizationName()) in testNetworkLoggingEnabled_deviceOwner() 310 when(mSecurityController.isVpnEnabled()).thenReturn(true); in testManagedOneVpnEnabled() 321 when(mSecurityController.getDeviceOwnerOrganizationName()) in testManagedOneVpnEnabled() 334 when(mSecurityController.isVpnEnabled()).thenReturn(true); in testManagedTwoVpnsEnabled() [all …]
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/ |
H A D | InputDeviceDelegateTest.java | 30 import static org.mockito.Mockito.when; 91 when(mContextSpy.getSystemService(eq(Context.INPUT_SERVICE))) in setUp() 108 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in beforeSystemReady_ignoresAnyUpdate() 126 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice() 140 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() 145 when(mIInputManagerMock.getInputDevice(eq(1))) in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() 183 when(mIInputManagerMock.getInputDevice(eq(1))) in onInputDeviceChanged_deviceLosesVibrator_removesDevice() 198 when(mIInputManagerMock.getInputDevice(eq(1))) in onInputDeviceChanged_deviceLost_removesDevice() 213 when(mIInputManagerMock.getInputDevice(eq(1))) in onInputDeviceChanged_deviceAddsVibrator_addsDevice() 228 when(mIInputManagerMock.getInputDevice(eq(1))).thenReturn( in onInputDeviceRemoved_removesDevice() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/ |
H A D | InternetDialogControllerTest.java | 32 import static org.mockito.Mockito.when; 213 when(mSystemUIToast.getView()).thenReturn(mToastView); in setUp() 216 when(mWifiStateWorker.isWifiEnabled()).thenReturn(true); in setUp() 704 when(mWifiEntry1.isDefaultNetwork()).thenReturn(true); in onAccessPointsChanged_wifiIsDefaultButNoInternetAccess_putIntoWifiEntries() 819 doReturn(SUB_ID2).when(info).getSubscriptionId(); in getActiveAutoSwitchNonDdsSubId() 826 doReturn(true).when(info).isOpportunistic(); in getActiveAutoSwitchNonDdsSubId() 831 doReturn(false).when(info).isOpportunistic(); in getActiveAutoSwitchNonDdsSubId() 832 doReturn(SUB_ID).when(info).getSubscriptionId(); in getActiveAutoSwitchNonDdsSubId() 843 doReturn(SUB_ID2).when(info).getSubscriptionId(); in getActiveAutoSwitchNonDdsSubId_flagOff() 854 doReturn("EDGE").when(res1).getString(anyInt()); in getMobileNetworkSummary() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
H A D | HearingAidDeviceManagerTest.java | 30 import static org.mockito.Mockito.when; 114 when(mDevice1.getName()).thenReturn(DEVICE_NAME_1); in setUp() 115 when(mDevice2.getName()).thenReturn(DEVICE_NAME_2); in setUp() 116 when(mDevice1.getAlias()).thenReturn(DEVICE_ALIAS_1); in setUp() 117 when(mDevice2.getAlias()).thenReturn(DEVICE_ALIAS_2); in setUp() 243 when(mCachedDevice1.isConnected()).thenReturn(true); in updateHearingAidsDevices_firstPairedDevicesConnected_verifySubDevice() 267 when(mCachedDevice2.isConnected()).thenReturn(true); in updateHearingAidsDevices_secondPairedDeviceConnected_verifySubDevice() 288 when(mCachedDevice1.isConnected()).thenReturn(true); in updateHearingAidsDevices_BothConnected_verifySubDevice() 289 when(mCachedDevice2.isConnected()).thenReturn(true); in updateHearingAidsDevices_BothConnected_verifySubDevice() 320 when(mHearingAidProfile.getHiSyncId(mDevice1)). in updateHearingAidsDevices_invalidHiSyncId_doNothing() [all …]
|
H A D | A2dpProfileTest.java | 24 import static org.mockito.Mockito.when; 128 when(mBluetoothA2dp.getConnectionState(any())).thenReturn( in isHighQualityAudioEnabled() 139 when(mBluetoothA2dp.getConnectionState(any())).thenReturn( in isHighQualityAudioEnabled() 144 when(status.getCodecConfig()).thenReturn(config); in isHighQualityAudioEnabled() 145 when(config.isMandatoryCodec()).thenReturn(false); in isHighQualityAudioEnabled() 147 when(config.isMandatoryCodec()).thenReturn(true); in isHighQualityAudioEnabled() 171 when(mContext.getResources()).thenReturn(res); in setupLabelTest() 192 when(mBluetoothA2dp.getConnectionState(any())).thenReturn( in getLabelDeviceDisconnected() 208 when(config.isMandatoryCodec()).thenReturn(true); in getLabelDeviceConnectedButNotHighQualityCodec() 223 when(config.isMandatoryCodec()).thenReturn(false); in getLabelDeviceConnectedWithHighQualityCodec() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
H A D | InfoMediaManagerTest.java | 38 import static org.mockito.Mockito.when; 144 when(info.getId()).thenReturn(TEST_ID); in onRouteAdded_getAvailableRoutes_shouldAddMediaDevice() 216 when(info.getId()).thenReturn(TEST_ID); in onRouteAdded_buildAllRoutes_shouldAddMediaDevice() 246 when(info.getId()).thenReturn(TEST_ID); in onPreferredFeaturesChanged_samePackageName_shouldAddMediaDevice() 283 when(info.getId()).thenReturn(TEST_ID); in onRoutesChanged_getAvailableRoutes_shouldAddMediaDevice() 401 when(info.getId()).thenReturn(TEST_ID); in setUpSelectedRoutes() 440 when(info.getId()).thenReturn(TEST_ID); in onRoutesChanged_buildAllRoutes_shouldAddMediaDevice() 508 when(info.getId()).thenReturn(TEST_ID); in getRoutesListWithDuplicatedIds() 570 when(info.getId()).thenReturn(TEST_ID); in onRoutesRemoved_getAvailableRoutes_shouldAddMediaDevice() 592 when(info.getId()).thenReturn(TEST_ID); in onRoutesRemoved_buildAllRoutes_shouldAddMediaDevice() [all …]
|