/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/ |
D | FakeHdmiCecConfig.java | 42 doReturn(buildResources(context)).when(contextSpy).getResources(); in buildContext() 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() 57 doReturn(false).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() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/ |
D | TypeClassifierTest.java | 34 import static org.mockito.Mockito.when; 63 when(mDataProvider.isVertical()).thenReturn(true); in testPass_QuickSettings() 64 when(mDataProvider.isUp()).thenReturn(false); in testPass_QuickSettings() 66 when(mDataProvider.isRight()).thenReturn(false); // right should cause no effect. in testPass_QuickSettings() 69 when(mDataProvider.isRight()).thenReturn(true); in testPass_QuickSettings() 75 when(mDataProvider.isVertical()).thenReturn(false); in testFalse_QuickSettings() 76 when(mDataProvider.isUp()).thenReturn(false); in testFalse_QuickSettings() 79 when(mDataProvider.isVertical()).thenReturn(true); in testFalse_QuickSettings() 80 when(mDataProvider.isUp()).thenReturn(true); in testFalse_QuickSettings() 86 when(mDataProvider.isVertical()).thenReturn(true); in testPass_PulseExpand() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/ |
D | PerSimStatusTest.java | 83 doReturn(0).when(mPhone).getPhoneId(); in onPullAtom_perSimStatus() 84 doReturn(1).when(mPhone).getSubId(); in onPullAtom_perSimStatus() 85 doReturn(100).when(mPhone).getCarrierId(); in onPullAtom_perSimStatus() 87 .when(mSubscriptionManagerService) in onPullAtom_perSimStatus() 90 .when(mSubscriptionManagerService) in onPullAtom_perSimStatus() 93 .when(mSubscriptionManagerService) in onPullAtom_perSimStatus() 96 doReturn("us").when(subscriptionInfo1).getCountryIso(); in onPullAtom_perSimStatus() 98 .setCountryIso("us").build()).when(mSubscriptionManagerService) in onPullAtom_perSimStatus() 103 doReturn(imsMmTelManager1).when(imsManager).getImsMmTelManager(1); in onPullAtom_perSimStatus() 104 doReturn(true).when(imsMmTelManager1).isAdvancedCallingSettingEnabled(); in onPullAtom_perSimStatus() [all …]
|
D | VoiceCallSessionStatsTest.java | 49 import static org.mockito.Mockito.when; 176 doReturn(CARRIER_ID_SLOT_0).when(mPhone).getCarrierId(); in setUp() 178 doReturn(CARRIER_ID_SLOT_1).when(mSecondPhone).getCarrierId(); in setUp() 179 doReturn(mContext).when(mSecondPhone).getContext(); in setUp() 180 doReturn(mSignalStrength).when(mSecondPhone).getSignalStrength(); in setUp() 181 doReturn(mSecondServiceStateTracker).when(mSecondPhone).getServiceStateTracker(); in setUp() 182 doReturn(mSecondServiceState).when(mSecondServiceStateTracker).getServiceState(); in setUp() 187 doReturn(true).when(mPhysicalSlot).isActive(); in setUp() 188 doReturn(CardState.CARDSTATE_PRESENT).when(mPhysicalSlot).getCardState(); in setUp() 189 doReturn(false).when(mPhysicalSlot).isEuicc(); in setUp() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/ |
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() 40 when(params.doubleTapReportsTouchCoordinates()).thenReturn(false); in createMockParameters() 41 when(params.getDisplayNeedsBlanking()).thenReturn(false); in createMockParameters() 42 when(params.getSelectivelyRegisterSensorsUsingProx()).thenReturn(false); in createMockParameters() 43 when(params.singleTapUsesProx(anyInt())).thenReturn(true); in createMockParameters() 44 when(params.longPressUsesProx()).thenReturn(true); in createMockParameters() 45 when(params.getQuickPickupAodDuration()).thenReturn(500); in createMockParameters() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | BluetoothUtilsTest.java | 27 import static org.mockito.Mockito.when; 99 when(mLocalBluetoothManager.getProfileManager()).thenReturn(mProfileManager); in setUp() 100 when(mProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp() 101 when(mProfileManager.getLeAudioBroadcastAssistantProfile()).thenReturn(mAssistant); in setUp() 106 when(mCachedBluetoothDevice.getBtClass().getMajorDeviceClass()).thenReturn( in getBtClassDrawableWithDescription_typePhone_returnPhoneDrawable() 116 when(mCachedBluetoothDevice.getBtClass().getMajorDeviceClass()).thenReturn( in getBtClassDrawableWithDescription_typeComputer_returnComputerDrawable() 126 when(mCachedBluetoothDevice.isHearingAidDevice()).thenReturn(true); in getBtClassDrawableWithDescription_typeHearingAid_returnHearingAidDrawable() 134 when(mBluetoothDevice.getMetadata( in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon() 136 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon() 137 when(mCachedBluetoothDevice.getAddress()).thenReturn("1f:aa:bb"); in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon() [all …]
|
D | HearingAidDeviceManagerTest.java | 40 import static org.mockito.Mockito.when; 131 when(mDevice1.getAddress()).thenReturn(DEVICE_ADDRESS_1); in setUp() 132 when(mDevice2.getAddress()).thenReturn(DEVICE_ADDRESS_2); in setUp() 133 when(mDevice1.getName()).thenReturn(DEVICE_NAME_1); in setUp() 134 when(mDevice2.getName()).thenReturn(DEVICE_NAME_2); in setUp() 135 when(mDevice1.getAlias()).thenReturn(DEVICE_ALIAS_1); in setUp() 136 when(mDevice2.getAlias()).thenReturn(DEVICE_ALIAS_2); in setUp() 137 when(mDevice1.getBluetoothClass()).thenReturn(DEVICE_CLASS); in setUp() 138 when(mDevice2.getBluetoothClass()).thenReturn(DEVICE_CLASS); in setUp() 139 when(mLocalBluetoothManager.getEventManager()).thenReturn(mBluetoothEventManager); in setUp() [all …]
|
D | CsipDeviceManagerTest.java | 23 import static org.mockito.Mockito.when; 102 when(mDevice1.getAddress()).thenReturn(DEVICE_ADDRESS_1); in setUp() 103 when(mDevice2.getAddress()).thenReturn(DEVICE_ADDRESS_2); in setUp() 104 when(mDevice3.getAddress()).thenReturn(DEVICE_ADDRESS_3); in setUp() 105 when(mDevice1.getName()).thenReturn(DEVICE_NAME_1); in setUp() 106 when(mDevice2.getName()).thenReturn(DEVICE_NAME_2); in setUp() 107 when(mDevice3.getName()).thenReturn(DEVICE_NAME_3); in setUp() 108 when(mDevice1.getAlias()).thenReturn(DEVICE_ALIAS_1); in setUp() 109 when(mDevice2.getAlias()).thenReturn(DEVICE_ALIAS_2); in setUp() 110 when(mDevice3.getAlias()).thenReturn(DEVICE_ALIAS_3); in setUp() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/people/prediction/ |
D | SharesheetModelScorerTest.java | 26 import static org.mockito.Mockito.when; 163 when(mEventHistory1.getEventIndex(anySet())).thenReturn(mEventIndex1); in testComputeScore() 164 when(mEventHistory2.getEventIndex(anySet())).thenReturn(mEventIndex2); in testComputeScore() 165 when(mEventHistory3.getEventIndex(anySet())).thenReturn(mEventIndex3); in testComputeScore() 166 when(mEventHistory4.getEventIndex(anySet())).thenReturn(mEventIndex4); in testComputeScore() 167 when(mEventHistory5.getEventIndex(anySet())).thenReturn(mEventIndex5); in testComputeScore() 169 when(mEventIndex1.getActiveTimeSlots()).thenReturn( in testComputeScore() 171 when(mEventIndex2.getActiveTimeSlots()).thenReturn(List.of(TWO_DAYS_AGO, TWELVE_DAYS_AGO)); in testComputeScore() 172 when(mEventIndex3.getActiveTimeSlots()).thenReturn(List.of(FIVE_DAYS_AGO, TWENTY_DAYS_AGO)); in testComputeScore() 173 when(mEventIndex4.getActiveTimeSlots()).thenReturn( in testComputeScore() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ |
D | NotificationSwipeHelperTest.java | 34 import static org.mockito.Mockito.when; 130 doNothing().when(mSwipeHelper).setExposedMenuView(mView); in testClearExposedMenuView() 146 doNothing().when(mSwipeHelper).setTranslatingParentView(null); in testClearTranslatingParentView() 165 doNothing().when(mSwipeHelper).setCurrentMenuRow(null); in testClearCurrentMenuRow() 172 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_ExpandableNotificationRow() 173 when(mSwipeHelper.getFalsingCheck()).thenReturn(mFalsingCheck); in testOnDownUpdate_ExpandableNotificationRow() 174 doNothing().when(mSwipeHelper).resetExposedMenuView(true, false); in testOnDownUpdate_ExpandableNotificationRow() 175 doNothing().when(mSwipeHelper).clearCurrentMenuRow(); in testOnDownUpdate_ExpandableNotificationRow() 176 doNothing().when(mSwipeHelper).initializeRow(any()); in testOnDownUpdate_ExpandableNotificationRow() 188 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_notExpandableNotificationRow() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | LockSettingsShellCommandTest.java | 37 import static org.mockito.Mockito.when; 98 when(mLockPatternUtils.hasSecureLockScreen()).thenReturn(true); in setUp() 103 when(mLockPatternUtils.isSecure(mUserId)).thenReturn(true); in testWrongPassword() 104 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testWrongPassword() 105 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testWrongPassword() 106 when(mLockPatternUtils.checkCredential( in testWrongPassword() 116 when(mLockPatternUtils.isSecure(mUserId)).thenReturn(true); in testChangePin() 117 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testChangePin() 118 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testChangePin() 119 when(mLockPatternUtils.getKeyguardStoredPasswordQuality(mUserId)).thenReturn( in testChangePin() [all …]
|
/frameworks/native/services/inputflinger/reader/mapper/gestures/ |
D | GestureConverter.cpp | 88 std::list<NotifyArgs> GestureConverter::reset(nsecs_t when) { in reset() argument 92 out += endScroll(when, when); in reset() 95 out += handleMultiFingerSwipeLift(when, when); in reset() 98 out += endPinch(when, when); in reset() 105 out += releaseAllButtons(when, when); in reset() 138 std::list<NotifyArgs> GestureConverter::handleGesture(nsecs_t when, nsecs_t readTime, in handleGesture() argument 148 return handleMove(when, readTime, gestureStartTime, gesture); in handleGesture() 150 return handleButtonsChange(when, readTime, gesture); in handleGesture() 152 return handleScroll(when, readTime, gesture); in handleGesture() 154 return handleFling(when, readTime, gestureStartTime, gesture); in handleGesture() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/ |
D | GlobalActionsColumnLayoutTest.java | 58 doReturn(View.LAYOUT_DIRECTION_LTR).when(mColumnLayout).getCurrentLayoutDirection(); in testShouldReverseListItems() 60 doReturn(RotationUtils.ROTATION_LANDSCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems() 63 doReturn(RotationUtils.ROTATION_NONE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems() 66 doReturn(RotationUtils.ROTATION_SEASCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems() 69 doReturn(View.LAYOUT_DIRECTION_RTL).when(mColumnLayout).getCurrentLayoutDirection(); in testShouldReverseListItems() 71 doReturn(RotationUtils.ROTATION_LANDSCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems() 74 doReturn(RotationUtils.ROTATION_NONE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems() 77 doReturn(RotationUtils.ROTATION_SEASCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems() 83 doReturn(50f).when(mColumnLayout).getAnimationDistance(); in testGetAnimationOffsetX() 85 doReturn(RotationUtils.ROTATION_NONE).when(mColumnLayout).getCurrentRotation(); in testGetAnimationOffsetX() [all …]
|
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() 178 doReturn(view1).when(mAdapter).getView(eq(0), any(), any()); in testOnUpdateList_oneSeparatedOneList() 179 doReturn(true).when(mAdapter).shouldBeSeparated(0); in testOnUpdateList_oneSeparatedOneList() 181 doReturn(view2).when(mAdapter).getView(eq(1), any(), any()); in testOnUpdateList_oneSeparatedOneList() 182 doReturn(false).when(mAdapter).shouldBeSeparated(1); in testOnUpdateList_oneSeparatedOneList() 195 doReturn(2).when(mAdapter).countSeparatedItems(); in testOnUpdateList_twoSeparatedItems() 196 doReturn(0).when(mAdapter).countListItems(); in testOnUpdateList_twoSeparatedItems() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/ |
D | WifiStatusTrackerTest.java | 24 import static org.mockito.Mockito.when; 88 when(primaryWifiInfo.makeCopy(anyLong())).thenReturn(primaryWifiInfo); in testWifiInfoClearedOnPrimaryNetworkLost() 89 when(primaryWifiInfo.isPrimary()).thenReturn(true); in testWifiInfoClearedOnPrimaryNetworkLost() 91 when(primaryWifiInfo.getRssi()).thenReturn(primaryRssi); in testWifiInfoClearedOnPrimaryNetworkLost() 99 when(primaryNetwork.getNetId()).thenReturn(primaryNetworkId); in testWifiInfoClearedOnPrimaryNetworkLost() 108 when(nonPrimaryWifiInfo.makeCopy(anyLong())).thenReturn(nonPrimaryWifiInfo); in testWifiInfoClearedOnPrimaryNetworkLost() 109 when(nonPrimaryWifiInfo.isPrimary()).thenReturn(false); in testWifiInfoClearedOnPrimaryNetworkLost() 111 when(primaryWifiInfo.getRssi()).thenReturn(nonPrimaryRssi); in testWifiInfoClearedOnPrimaryNetworkLost() 119 when(nonPrimaryNetwork.getNetId()).thenReturn(nonPrimaryNetworkId); in testWifiInfoClearedOnPrimaryNetworkLost() 143 when(primaryWifiInfo.isPrimary()).thenReturn(true); in isCarrierMerged_typicalWifi_false() [all …]
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/ |
D | OneHandedControllerTest.java | 35 import static org.mockito.Mockito.when; 113 when(mMockDisplayController.getDisplay(anyInt())).thenReturn(mDisplay); in setUp() 114 when(mMockDisplayController.getDisplayLayout(anyInt())).thenReturn(null); in setUp() 115 when(mMockDisplayAreaOrganizer.getDisplayAreaTokenMap()).thenReturn(new ArrayMap<>()); in setUp() 116 when(mMockDisplayAreaOrganizer.isReady()).thenReturn(true); in setUp() 117 when(mMockSettingsUitl.getSettingsOneHandedModeEnabled(any(), anyInt())).thenReturn( in setUp() 119 when(mMockSettingsUitl.getSettingsOneHandedModeTimeout(any(), anyInt())).thenReturn( in setUp() 121 when(mMockSettingsUitl.getSettingsTapsAppToExit(any(), anyInt())).thenReturn( in setUp() 123 when(mMockSettingsUitl.getSettingsSwipeToNotificationEnabled(any(), anyInt())).thenReturn( in setUp() 125 when(mMockSettingsUitl.getShortcutEnabled(any(), anyInt())).thenReturn(false); in setUp() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ |
D | NotificationMenuRowTest.java | 29 import static org.mockito.Mockito.when; 68 when(mRow.getEntry()).thenReturn(entry); in setup() 102 when(mRow.getShowSnooze()).thenReturn(false); in testNoAppOpsInSlowSwipe() 115 when(mRow.getShowSnooze()).thenReturn(false); in testNoSnoozeInSlowSwipe() 128 when(mRow.getShowSnooze()).thenReturn(true); in testSnoozeInSlowSwipe() 141 when(mRow.getShowSnooze()).thenReturn(true); in testSlowSwipe_newDismiss() 157 when(row.isMenuVisible()).thenReturn(true); in testIsSnappedAndOnSameSide() 158 when(row.isMenuSnapped()).thenReturn(true); in testIsSnappedAndOnSameSide() 159 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 160 when(row.isMenuSnappedOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() [all …]
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | ShortcutHelperTest.java | 27 import static org.mockito.Mockito.when; 99 when(mSbn.getPackageName()).thenReturn(PKG); in setUp() 100 when(mShortcutInfo.getId()).thenReturn(SHORTCUT_ID); in setUp() 101 when(mNotif.getBubbleMetadata()).thenReturn(mBubbleMetadata); in setUp() 102 when(mBubbleMetadata.getShortcutId()).thenReturn(SHORTCUT_ID); in setUp() 103 when(mUserManager.isUserUnlocked(any(UserHandle.class))).thenReturn(true); in setUp() 109 when(mockRecord.getKey()).thenReturn(key); in setUpMockNotificationRecord() 110 when(mockRecord.getSbn()).thenReturn(mSbn); in setUpMockNotificationRecord() 111 when(mockRecord.getNotification()).thenReturn(mNotif); in setUpMockNotificationRecord() 112 when(mockRecord.getShortcutInfo()).thenReturn(mShortcutInfo); in setUpMockNotificationRecord() [all …]
|
/frameworks/opt/net/wifi/libs/WifiTrackerLib/tests/src/com/android/wifitrackerlib/ |
D | PasspointWifiEntryTest.java | 28 import static org.mockito.Mockito.when; 76 when(mMockWifiInfo.isPrimary()).thenReturn(true); in setUp() 77 when(mMockWifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID); in setUp() 78 when(mMockWifiInfo.getRssi()).thenReturn(WifiInfo.INVALID_RSSI); in setUp() 79 when(mMockNetworkCapabilities.getTransportInfo()).thenReturn(mMockWifiInfo); in setUp() 80 when(mMockInjector.getContext()).thenReturn(mMockContext); in setUp() 81 when(mMockContext.getResources()).thenReturn(mMockResources); in setUp() 82 when(mMockContext.getString(R.string.wifitrackerlib_summary_separator)).thenReturn("/"); in setUp() 84 when(mMockContext.getSystemService(ConnectivityManager.class)) in setUp() 93 when(mMockContext.getString(R.string.wifitrackerlib_wifi_passpoint_expired)) in testGetSummary_expiredTimeNotAvailable_notShowExpired() [all …]
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
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() 70 when(mMockActivityRecord.getRequestedConfigurationOrientation()).thenReturn( in setUp() 73 when(mMockWindowState.getRequestedVisibleTypes()).thenReturn(0); in setUp() 74 when(mMockActivityRecord.findMainWindow()).thenReturn(mMockWindowState); in setUp() 77 doReturn(mMockActivityRecord).when(mDisplayContent).topRunningActivity(); in setUp() 78 when(mDisplayContent.getIgnoreOrientationRequest()).thenReturn(true); in setUp() 81 when(mMockLetterboxConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled()) in setUp() [all …]
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/ |
D | BubblesTransitionObserverTest.java | 30 import static org.mockito.Mockito.when; 81 when(mBubbleData.isExpanded()).thenReturn(true); in testOnTransitionReady_open_collapsesStack() 82 when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); in testOnTransitionReady_open_collapsesStack() 83 when(mBubble.getTaskId()).thenReturn(1); in testOnTransitionReady_open_collapsesStack() 84 when(mBubbleController.isStackAnimating()).thenReturn(false); in testOnTransitionReady_open_collapsesStack() 95 when(mBubbleData.isExpanded()).thenReturn(true); in testOnTransitionReady_toFront_collapsesStack() 96 when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); in testOnTransitionReady_toFront_collapsesStack() 97 when(mBubble.getTaskId()).thenReturn(1); in testOnTransitionReady_toFront_collapsesStack() 98 when(mBubbleController.isStackAnimating()).thenReturn(false); in testOnTransitionReady_toFront_collapsesStack() 109 when(mBubbleData.isExpanded()).thenReturn(true); in testOnTransitionReady_noTaskInfo_skip() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/ |
D | InternetDialogDelegateControllerTest.java | 33 import static org.mockito.Mockito.when; 206 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(anyInt()); in setUp() 207 when(mTelephonyManager.getSignalStrength()).thenReturn(mSignalStrength); in setUp() 208 when(mSignalStrength.getLevel()).thenReturn(SIGNAL_STRENGTH_GREAT); in setUp() 209 when(mKeyguardStateController.isUnlocked()).thenReturn(true); in setUp() 210 when(mConnectedEntry.isDefaultNetwork()).thenReturn(true); in setUp() 211 when(mConnectedEntry.hasInternetAccess()).thenReturn(true); in setUp() 212 when(mWifiEntry1.getConnectedState()).thenReturn(WifiEntry.CONNECTED_STATE_DISCONNECTED); in setUp() 213 when(mWifiEntry2.getConnectedState()).thenReturn(WifiEntry.CONNECTED_STATE_DISCONNECTED); in setUp() 214 when(mWifiEntry3.getConnectedState()).thenReturn(WifiEntry.CONNECTED_STATE_DISCONNECTED); in setUp() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/ |
D | MediaOutputDialogTest.java | 25 import static org.mockito.Mockito.when; 126 when(mLocalBluetoothManager.getProfileManager()).thenReturn(mLocalBluetoothProfileManager); in setUp() 127 when(mLocalBluetoothProfileManager.getLeAudioBroadcastProfile()).thenReturn(null); in setUp() 128 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in setUp() 129 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_NONE); in setUp() 130 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE); in setUp() 131 when(mMediaController.getMetadata()).thenReturn(mMediaMetadata); in setUp() 132 when(mMediaMetadata.getDescription()).thenReturn(mMediaDescription); in setUp() 135 when(mUserTracker.getUserHandle()).thenReturn(userHandle); in setUp() 136 when(mMediaSessionManager.getActiveSessionsForUser(any(), in setUp() [all …]
|
/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/ |
D | InputDeviceDelegateTest.java | 30 import static org.mockito.Mockito.when; 84 when(mContextSpy.getSystemService(eq(Context.INPUT_SERVICE))) in setUp() 87 .when(mIInputManagerMock).registerInputDevicesChangedListener(any()); in setUp() 103 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in beforeSystemReady_ignoresAnyUpdate() 121 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice() 125 when(mIInputManagerMock.getVibratorIds(eq(1))).thenReturn(new int[]{1}); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice() 126 when(mIInputManagerMock.getInputDevice(eq(1))).thenReturn(createInputDeviceWithVibrator(1)); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice() 135 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() 139 when(mIInputManagerMock.getVibratorIds(eq(1))).thenReturn(new int[0]); in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() 140 when(mIInputManagerMock.getInputDevice(eq(1))) in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
D | InfoMediaManagerTest.java | 40 import static org.mockito.Mockito.when; 145 doReturn(mMediaSessionManager).when(mContext).getSystemService( in setUp() 171 when(mRouterManager.getRoutingSessions(anyString())) in stopScan_startFirst_callsUnregister() 173 when(mRouterManager.getSelectedRoutes(any())) in stopScan_startFirst_callsUnregister() 189 when(sessionInfo.getSelectedRoutes()).thenReturn(selectedRoutes); in onRouteAdded_getAvailableRoutes_shouldAddMediaDevice() 193 when(info.getId()).thenReturn(TEST_ID); in onRouteAdded_getAvailableRoutes_shouldAddMediaDevice() 194 when(info.getClientPackageName()).thenReturn(TEST_PACKAGE_NAME); in onRouteAdded_getAvailableRoutes_shouldAddMediaDevice() 195 when(info.getDeduplicationIds()).thenReturn(Set.of()); in onRouteAdded_getAvailableRoutes_shouldAddMediaDevice() 217 when(mRouterManager.getRoutingSessions(anyString())) in onSessionReleased_shouldUpdateConnectedDevice() 219 when(mRouterManager.getSelectedRoutes(TEST_SYSTEM_ROUTING_SESSION)) in onSessionReleased_shouldUpdateConnectedDevice() [all …]
|