Home
last modified time | relevance | path

Searched refs:whenever (Results 1 – 25 of 561) sorted by relevance

12345678910>>...23

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bluetooth/qsdialog/
DDeviceItemActionInteractorTest.kt49 import org.mockito.kotlin.whenever
124 whenever(cachedBluetoothDevice.address).thenReturn(DEVICE_ADDRESS) in testOnClick_connectedMedia_setActive()
125 whenever(BluetoothUtils.isAudioSharingEnabled()).thenReturn(false) in testOnClick_connectedMedia_setActive()
141 whenever(cachedBluetoothDevice.address).thenReturn(DEVICE_ADDRESS) in testOnClick_activeMedia_disconnect()
142 whenever(BluetoothUtils.isAudioSharingEnabled()).thenReturn(false) in testOnClick_activeMedia_disconnect()
158 whenever(cachedBluetoothDevice.address).thenReturn(DEVICE_ADDRESS) in testOnClick_connectedOtherDevice_disconnect()
159 whenever(BluetoothUtils.isAudioSharingEnabled()).thenReturn(false) in testOnClick_connectedOtherDevice_disconnect()
175 whenever(cachedBluetoothDevice.address).thenReturn(DEVICE_ADDRESS) in testOnClick_saved_connect()
176 whenever(BluetoothUtils.isAudioSharingEnabled()).thenReturn(false) in testOnClick_saved_connect()
192 whenever(cachedBluetoothDevice.address).thenReturn(DEVICE_ADDRESS) in testOnClick_audioSharingDisabled_shouldNotLaunchSettings()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/
DSensitiveContentCoordinatorTest.kt59 import org.mockito.Mockito.`when` as whenever
136 whenever(sensitiveNotificationProtectionController.isSensitiveStateActive) in screenshareSecretFilter_sensitiveInctive_noFiltersSecret()
154 whenever(sensitiveNotificationProtectionController.isSensitiveStateActive).thenReturn(true) in screenshareSecretFilter_sensitiveActive_filtersSecret()
176 whenever(lockscreenUserManager.currentUserId).thenReturn(1) in onBeforeRenderList_deviceUnlocked_notifDoesNotNeedRedaction()
177 whenever(lockscreenUserManager.isLockscreenPublicMode(1)).thenReturn(false) in onBeforeRenderList_deviceUnlocked_notifDoesNotNeedRedaction()
178 whenever(lockscreenUserManager.userAllowsPrivateNotificationsInPublic(1)).thenReturn(true) in onBeforeRenderList_deviceUnlocked_notifDoesNotNeedRedaction()
179 whenever(dynamicPrivacyController.isDynamicallyUnlocked).thenReturn(false) in onBeforeRenderList_deviceUnlocked_notifDoesNotNeedRedaction()
196 whenever(lockscreenUserManager.currentUserId).thenReturn(1) in onBeforeRenderList_deviceUnlocked_notifDoesNotNeedRedaction_sensitiveActive()
197 whenever(lockscreenUserManager.isLockscreenPublicMode(1)).thenReturn(false) in onBeforeRenderList_deviceUnlocked_notifDoesNotNeedRedaction_sensitiveActive()
198 whenever(lockscreenUserManager.userAllowsPrivateNotificationsInPublic(1)).thenReturn(true) in onBeforeRenderList_deviceUnlocked_notifDoesNotNeedRedaction_sensitiveActive()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/
DNotificationShelfTest.kt34 import org.mockito.Mockito.`when` as whenever
65 whenever(ambientState.largeScreenShadeInterpolator).thenReturn(largeScreenShadeInterpolator) in setUp()
66 whenever(ambientState.isSmallScreen).thenReturn(true) in setUp()
162 whenever(expandableView.shelfIcon).thenReturn(mock(StatusBarIconView::class.java)) in getAmountInShelf_lastViewBelowShelf_completelyInShelf()
163 whenever(expandableView.translationY).thenReturn(viewStart) in getAmountInShelf_lastViewBelowShelf_completelyInShelf()
164 whenever(expandableView.actualHeight).thenReturn(20) in getAmountInShelf_lastViewBelowShelf_completelyInShelf()
166 whenever(expandableView.minHeight).thenReturn(20) in getAmountInShelf_lastViewBelowShelf_completelyInShelf()
167 whenever(expandableView.shelfTransformationTarget).thenReturn(null) // use translationY in getAmountInShelf_lastViewBelowShelf_completelyInShelf()
168 whenever(expandableView.isInShelf).thenReturn(true) in getAmountInShelf_lastViewBelowShelf_completelyInShelf()
170 whenever(ambientState.isOnKeyguard).thenReturn(true) in getAmountInShelf_lastViewBelowShelf_completelyInShelf()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/data/repository/
DConnectivityRepositoryImplTest.kt55 import org.mockito.Mockito.`when` as whenever
166 whenever(connectivitySlots.getSlotFromName(SLOT_WIFI)).thenReturn(ConnectivitySlot.WIFI) in forceHiddenSlots_someInvalidSlotNames_flowHasValidSlotsOnly()
167 whenever(connectivitySlots.getSlotFromName(SLOT_MOBILE)).thenReturn(null) in forceHiddenSlots_someInvalidSlotNames_flowHasValidSlotsOnly()
199 whenever(connectivitySlots.getSlotFromName(SLOT_WIFI)).thenReturn(null) in forceHiddenSlots_allInvalidOrEmptySlotNames_flowHasEmpty()
200 whenever(connectivitySlots.getSlotFromName(SLOT_ETHERNET)).thenReturn(null) in forceHiddenSlots_allInvalidOrEmptySlotNames_flowHasEmpty()
201 whenever(connectivitySlots.getSlotFromName(SLOT_MOBILE)).thenReturn(null) in forceHiddenSlots_allInvalidOrEmptySlotNames_flowHasEmpty()
245 whenever(it.hasTransport(TRANSPORT_CELLULAR)).thenReturn(false) in defaultConnections_noTransports_nothingIsDefault()
246 whenever(it.hasTransport(TRANSPORT_ETHERNET)).thenReturn(false) in defaultConnections_noTransports_nothingIsDefault()
247 whenever(it.hasTransport(TRANSPORT_WIFI)).thenReturn(false) in defaultConnections_noTransports_nothingIsDefault()
268 whenever(it.hasTransport(TRANSPORT_CELLULAR)).thenReturn(true) in defaultConnections_cellularTransport_mobileIsDefault()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/
DWifiRepositoryImplTest.kt42 import com.android.systemui.util.mockito.whenever
95 mock<WifiManager>().apply { whenever(this.maxSignalLevel).thenReturn(10) } in <lambda>()
108 whenever(wifiPickerTrackerFactory.create(any(), capture(callbackCaptor), any())) in setUp()
126 whenever(wifiPickerTracker.wifiState).thenReturn(WifiManager.WIFI_STATE_ENABLED) in isWifiEnabled_enabled_true()
137 whenever(wifiPickerTracker.wifiState).thenReturn(WifiManager.WIFI_STATE_ENABLING) in isWifiEnabled_enabling_false()
148 whenever(wifiPickerTracker.wifiState).thenReturn(WifiManager.WIFI_STATE_DISABLING) in isWifiEnabled_disabling_true()
159 whenever(wifiPickerTracker.wifiState).thenReturn(WifiManager.WIFI_STATE_DISABLED) in isWifiEnabled_disabled_false()
171 whenever(wifiPickerTracker.wifiState).thenReturn(WifiManager.WIFI_STATE_ENABLED) in isWifiEnabled_respondsToUpdates()
176 whenever(wifiPickerTracker.wifiState).thenReturn(WifiManager.WIFI_STATE_DISABLED) in isWifiEnabled_respondsToUpdates()
192 mock<WifiEntry>().apply { whenever(this.isDefaultNetwork).thenReturn(true) } in isWifiDefault_wifiNetwork_isTrue()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/volume/panel/component/mediaoutput/domain/interactor/
DTestMediaDevicesFactory.kt30 import com.android.systemui.util.mockito.whenever
39 whenever(name).thenReturn(deviceName) in builtInMediaDevice()
40 whenever(icon).thenReturn(deviceIcon) in builtInMediaDevice()
48 whenever(deviceType) in wiredMediaDevice()
50 whenever(name).thenReturn(deviceName) in wiredMediaDevice()
51 whenever(icon).thenReturn(deviceIcon) in wiredMediaDevice()
61 whenever(name).thenReturn(deviceName) in bluetoothMediaDevice()
62 whenever(address).thenReturn(deviceAddress) in bluetoothMediaDevice()
66 whenever(profileId).thenReturn(BluetoothProfile.LE_AUDIO) in bluetoothMediaDevice()
67 whenever(isEnabled(bluetoothDevice)).thenReturn(true) in bluetoothMediaDevice()
[all …]
/frameworks/base/services/tests/PackageManagerServiceTests/unit/src/com/android/server/pm/test/verify/domain/
DDomainVerificationSettingsMutationTest.kt36 import com.android.server.testutils.whenever in <lambda>()
64 whenever( in <lambda>()
70 whenever( in <lambda>()
76 whenever( in <lambda>()
82 whenever( in <lambda>()
90 whenever(isCallerVerifier(anyInt())) { true } in <lambda>()
91 whenever(sendBroadcastForPackages(any())) in <lambda>()
98 mockThrowOnUnmocked { whenever(linkedApps) { ArraySet<String>() } }, in <lambda>()
100 whenever(isChangeEnabledInternalNoLogging(anyLong(), any())) { true } in <lambda>()
192 whenever(packageName) { TEST_PKG } in <lambda>()
[all …]
DDomainVerificationUserSelectionOverrideTest.kt36 import com.android.server.testutils.whenever
70 whenever(enforcePermission(anyString(), anyInt(), anyInt(), anyString())) in makeService()
71 whenever(checkPermission(anyString(), anyInt(), anyInt())) { in makeService()
75 whenever(linkedApps) { ArraySet<String>() } in <lambda>()
77 whenever(isChangeEnabledInternalNoLogging(anyLong(), any())) { true } in <lambda>()
80 whenever(filterAppAccess(anyString(), anyInt(), anyInt())) { false } in <lambda>()
81 whenever(doesUserExist(0)) { true } in <lambda>()
82 whenever(doesUserExist(1)) { true } in <lambda>()
83 whenever(scheduleWriteSettings()) in <lambda>()
86 whenever(callingUid) { Process.ROOT_UID } in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/
DPulsingGestureListenerTest.kt50 import org.mockito.Mockito.`when` as whenever
103 whenever(dockManager.isDocked).thenReturn(false) in setUp()
104 whenever(screenOffAnimationController.allowWakeUpIfDozing()).thenReturn(true) in setUp()
109 whenever(statusBarStateController.isDozing).thenReturn(true) in testGestureDetector_singleTapEnabled()
112 whenever(ambientDisplayConfiguration.tapGestureEnabled(anyInt())).thenReturn(true) in testGestureDetector_singleTapEnabled()
114 whenever(falsingManager.isProximityNear).thenReturn(false) in testGestureDetector_singleTapEnabled()
117 whenever(falsingManager.isFalseTap(anyInt())).thenReturn(false) in testGestureDetector_singleTapEnabled()
129 whenever(statusBarStateController.isDozing).thenReturn(true) in testGestureDetector_doubleTapEnabled()
132 whenever(ambientDisplayConfiguration.doubleTapGestureEnabled(anyInt())).thenReturn(true) in testGestureDetector_doubleTapEnabled()
134 whenever(falsingManager.isProximityNear).thenReturn(false) in testGestureDetector_doubleTapEnabled()
[all …]
DNotificationShadeWindowViewControllerTest.kt102 import org.mockito.Mockito.`when` as whenever
174 whenever(view.bottom).thenReturn(VIEW_BOTTOM) in setUp()
175 whenever(view.findViewById<ViewGroup>(R.id.keyguard_bouncer_container)) in setUp()
177 whenever(keyguardBouncerComponentFactory.create(any(ViewGroup::class.java))) in setUp()
179 whenever(keyguardBouncerComponent.securityContainerController) in setUp()
181 whenever(keyguardTransitionInteractor.transition(Edge.create(LOCKSCREEN, DREAMING))) in setUp()
261 whenever(phoneStatusBarViewController.sendTouchToView(ev)).thenReturn(true) in handleDispatchTouchEvent_downTouchBelowView_sendsTouchToSb()
279 whenever(phoneStatusBarViewController.sendTouchToView(nextEvent)).thenReturn(true) in handleDispatchTouchEvent_downTouchBelowViewThenAnotherTouch_sendsTouchToSb()
291 whenever(statusBarWindowStateController.windowIsShowing()).thenReturn(true) in handleDispatchTouchEvent_downAndPanelCollapsedAndInSbBoundAndSbWindowShow_sendsTouchToSb()
292 whenever(panelExpansionInteractor.isFullyCollapsed).thenReturn(true) in handleDispatchTouchEvent_downAndPanelCollapsedAndInSbBoundAndSbWindowShow_sendsTouchToSb()
[all …]
DShadeHeaderControllerTest.kt87 import org.mockito.Mockito.`when` as whenever in <lambda>()
143 whenever<Clock>(view.requireViewById(R.id.clock)).thenReturn(clock) in <lambda>()
144 whenever(clock.context).thenReturn(mockedContext) in <lambda>()
146 whenever<TextView>(view.requireViewById(R.id.date)).thenReturn(date) in <lambda>()
147 whenever(date.context).thenReturn(mockedContext) in <lambda>()
149 whenever<ShadeCarrierGroup>(view.requireViewById(R.id.carrier_group)) in <lambda>()
152 whenever<BatteryMeterView>(view.requireViewById(R.id.batteryRemainingIcon)) in <lambda>()
155 whenever<StatusIconContainer>(view.requireViewById(R.id.statusIcons)) in <lambda>()
157 whenever<View>(view.requireViewById(R.id.hover_system_icons_container)) in <lambda>()
161 whenever(view.context).thenReturn(viewContext) in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/
DMobileConnectionsRepositoryTest.kt77 import com.android.systemui.util.mockito.whenever in <lambda>()
152 whenever(telephonyManager.simOperatorName).thenReturn("") in <lambda>()
155 whenever(telephonyManager.createForSubscriptionId(anyInt())).thenAnswer { invocation -> in <lambda>()
157 whenever(it.subscriptionId).thenReturn(invocation.getArgument(0)) in <lambda>()
161 whenever(logBufferFactory.getOrCreate(anyString(), anyInt())).thenAnswer { _ -> in <lambda>()
165 whenever(wifiPickerTrackerFactory.create(any(), capture(wifiPickerTrackerCallback), any())) in <lambda>()
169 whenever(subscriptionManager.getActiveSubscriptionInfo(anyInt())).thenAnswer { invocation -> in <lambda>()
276 whenever(subscriptionManager.completeActiveSubscriptionInfoList) in <lambda>()
289 whenever(subscriptionManager.completeActiveSubscriptionInfoList) in <lambda>()
294 whenever(subscriptionManager.completeActiveSubscriptionInfoList) in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DOperatorNameViewControllerTest.kt38 import com.android.systemui.util.mockito.whenever
101 whenever(telephonyManager.isDataCapable).thenReturn(true) in updateFromSubInfo_showsCarrieName()
105 whenever(it.subscriptionId).thenReturn(1) in updateFromSubInfo_showsCarrieName()
106 whenever(it.carrierName).thenReturn("test_carrier") in updateFromSubInfo_showsCarrieName()
108 whenever(keyguardUpdateMonitor.getSubscriptionInfoForSubId(any())) in updateFromSubInfo_showsCarrieName()
110 whenever(keyguardUpdateMonitor.getSimState(any())) in updateFromSubInfo_showsCarrieName()
112 whenever(keyguardUpdateMonitor.getServiceState(any())) in updateFromSubInfo_showsCarrieName()
126 whenever(telephonyManager.isDataCapable).thenReturn(false) in notDataCapable_doesNotShowOperatorName()
130 whenever(it.subscriptionId).thenReturn(1) in notDataCapable_doesNotShowOperatorName()
131 whenever(it.carrierName).thenReturn("test_carrier") in notDataCapable_doesNotShowOperatorName()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/
DNotificationConversationTemplateViewWrapperTest.kt38 import org.mockito.Mockito.`when` as whenever
97 whenever(drawable).thenReturn(mockDrawableImageMessage) in fakeConversationLayout()
101 whenever(childCount).thenReturn(1) in fakeConversationLayout()
102 whenever(getChildAt(any())).thenReturn(mockMessagingImageMessage) in fakeConversationLayout()
107 whenever(drawable).thenReturn(mockDrawableGroupMessage) in fakeConversationLayout()
111 whenever(childCount).thenReturn(1) in fakeConversationLayout()
112 whenever(getChildAt(any())).thenReturn(mockMessagingImageMessageForGroup) in fakeConversationLayout()
116 whenever(messageContainer).thenReturn(mockMessageContainer) in fakeConversationLayout()
120 whenever(messagingGroups).thenReturn(ArrayList<MessagingGroup>(listOf(mockGroup))) in fakeConversationLayout()
121 whenever(imageMessageContainer).thenReturn(mockImageMessageContainer) in fakeConversationLayout()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/bluetooth/
DBluetoothRepositoryImplTest.kt24 import com.android.systemui.util.mockito.whenever in <lambda>()
52 whenever(localBluetoothManager.bluetoothAdapter).thenReturn(bluetoothAdapter) in <lambda>()
64 whenever(bluetoothAdapter.connectionState).thenReturn(BluetoothProfile.STATE_CONNECTING) in <lambda>()
74 whenever(bluetoothAdapter.connectionState).thenReturn(BluetoothProfile.STATE_CONNECTING) in <lambda>()
89 whenever(bluetoothAdapter.connectionState).thenReturn(BluetoothProfile.STATE_CONNECTING) in <lambda>()
92 whenever(it.maxConnectionState).thenReturn(BluetoothProfile.STATE_DISCONNECTED) in <lambda>()
96 whenever(it.maxConnectionState).thenReturn(BluetoothProfile.STATE_DISCONNECTED) in <lambda>()
106 whenever(bluetoothAdapter.connectionState).thenReturn(BluetoothProfile.STATE_DISCONNECTED) in <lambda>()
109 whenever(it.maxConnectionState).thenReturn(BluetoothProfile.STATE_CONNECTING) in <lambda>()
119 whenever(bluetoothAdapter.connectionState).thenReturn(BluetoothProfile.STATE_DISCONNECTED) in <lambda>()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DDeletePackageHelperTest.kt30 import com.android.server.testutils.whenever
60 whenever(mUserManagerInternal.getUserIds()).thenReturn(intArrayOf(0, 1)) in setup()
61 whenever(mUserManagerInternal.getUserTypesForStatsd(any())).thenReturn(intArrayOf(1, 1)) in setup()
81 whenever(PackageManagerServiceUtils.isUpdatedSystemApp(ps)).thenReturn(true) in deleteSystemPackageFailsIfNotAdminAndNotProfile()
82 whenever(mUserManagerInternal.getUserInfo(1)).thenReturn(UserInfo(1, "test", 0)) in deleteSystemPackageFailsIfNotAdminAndNotProfile()
83 whenever(mUserManagerInternal.getProfileParentId(1)).thenReturn(1) in deleteSystemPackageFailsIfNotAdminAndNotProfile()
97 whenever(PackageManagerServiceUtils.isUpdatedSystemApp(ps)).thenReturn(true) in deleteSystemPackageFailsIfProfileOfNonAdmin()
98 whenever(mUserManagerInternal.getUserInfo(userId)).thenReturn( in deleteSystemPackageFailsIfProfileOfNonAdmin()
100 whenever(mUserManagerInternal.getProfileParentId(userId)).thenReturn(parentId) in deleteSystemPackageFailsIfProfileOfNonAdmin()
101 whenever(mUserManagerInternal.getUserInfo(parentId)).thenReturn( in deleteSystemPackageFailsIfProfileOfNonAdmin()
[all …]
DMockSystem.kt82 import com.android.server.testutils.whenever in <lambda>()
160 whenever(mocks.settings.insertPackageSettingLPw(
164 mPendingPackageAdds.firstOrNull { it.first == name } ?: return@whenever null in <lambda>()
169 whenever(mocks.settings.addPackageLPw(nullable(), nullable(), nullable(), nullable(),
173 ?: return@whenever null in <lambda>()
178 whenever(mocks.settings.packagesLocked).thenReturn(mSettingsMap)
179 whenever(mocks.settings.getPackageLPr(anyString())) { mSettingsMap[getArgument<Any>(0)] } in <lambda>()
180 whenever(mocks.settings.readLPw(any(), nullable())) { in <lambda>()
211 whenever(snapshot()) { appsFilterSnapshot } in <lambda>()
278 whenever(mocks.injector.context).thenReturn(mocks.context) in stageNominalSystemState()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/
DMediaViewControllerTest.kt70 import org.mockito.Mockito.`when` as whenever in <lambda>()
283 whenever(mockViewState.copy()).thenReturn(mockCopiedState) in <lambda>()
284 whenever(mockCopiedState.widgetStates) in <lambda>()
291 whenever(mockCopiedState.measureHeight).thenReturn(200) in <lambda>()
293 whenever(detailWidgetState.y).thenReturn(90F) in <lambda>()
294 whenever(detailWidgetState.height).thenReturn(10) in <lambda>()
295 whenever(detailWidgetState.alpha).thenReturn(1F) in <lambda>()
297 whenever(controlWidgetState.y).thenReturn(150F) in <lambda>()
298 whenever(controlWidgetState.height).thenReturn(20) in <lambda>()
299 whenever(controlWidgetState.alpha).thenReturn(1F) in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/quickaffordance/
DHomeControlsKeyguardQuickAffordanceConfigTest.kt39 import org.mockito.Mockito.`when` as whenever
54 whenever(component.canShowWhileLockedSetting).thenReturn(MutableStateFlow(true)) in setUp()
65 whenever(component.canShowWhileLockedSetting).thenReturn(MutableStateFlow(false)) in <lambda>()
66 whenever(component.isEnabled()).thenReturn(true) in <lambda>()
67 whenever(component.getTileImageId()).thenReturn(R.drawable.controls_icon) in <lambda>()
68 whenever(component.getTileTitleId()).thenReturn(R.string.quick_controls_title) in <lambda>()
70 whenever(component.getControlsController()).thenReturn(Optional.of(controlsController)) in <lambda>()
71 whenever(component.getControlsListingController()).thenReturn(Optional.empty()) in <lambda>()
72 whenever(component.getVisibility()).thenReturn(ControlsComponent.Visibility.AVAILABLE) in <lambda>()
73 whenever(controlsController.getFavorites()).thenReturn(listOf(mock())) in <lambda>()
[all …]
/frameworks/base/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/
DBasePermissionPolicyTest.kt46 import com.android.server.testutils.whenever in <lambda>()
169 whenever(this.appId).thenReturn(appId) in <lambda>()
170 whenever(this.packageName).thenReturn(packageName) in <lambda>()
171 whenever(androidPackage).thenReturn(null) in <lambda>()
172 whenever(this.isSystem).thenReturn(isSystem) in <lambda>()
185 whenever(this.appId).thenReturn(appId) in <lambda>()
186 whenever(this.androidPackage).thenReturn(androidPackage) in <lambda>()
188 whenever(this.packageName).thenReturn(packageName) in <lambda>()
189 whenever(this.isSystem).thenReturn(isSystem) in <lambda>()
190 whenever(this.isPrivileged).thenReturn(isPrivileged) in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/volume/
DMediaControllerKosmos.kt30 import com.android.systemui.util.mockito.whenever
48 whenever(loadLabel(any())).thenReturn("local_media_controller_label") in <lambda>()
50 whenever(packageManager.getApplicationInfo(eq(LOCAL_PACKAGE), any<Int>())) in <lambda>()
55 whenever(packageName).thenReturn(LOCAL_PACKAGE) in <lambda>()
56 whenever(playbackInfo).thenReturn(localPlaybackInfo) in <lambda>()
57 whenever(playbackState).thenReturn(localPlaybackStateBuilder.build()) in <lambda>()
58 whenever(sessionToken).thenReturn(localSessionToken) in <lambda>()
78 whenever(loadLabel(any())).thenReturn("remote_media_controller_label") in <lambda>()
80 whenever(packageManager.getApplicationInfo(eq(REMOTE_PACKAGE), any<Int>())) in <lambda>()
85 whenever(packageName).thenReturn(REMOTE_PACKAGE) in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/lifecycle/
DRepeatWhenAttachedTest.kt48 import org.mockito.Mockito.`when` as whenever
72 whenever(view.viewTreeObserver).thenReturn(viewTreeObserver) in setUp()
73 whenever(view.windowVisibility).thenReturn(View.GONE) in setUp()
74 whenever(view.hasWindowFocus()).thenReturn(false) in setUp()
76 whenever(view.addOnAttachStateChangeListener(any())).then { in setUp()
79 whenever(view.removeOnAttachStateChangeListener(any())).then { in setUp()
110 whenever(view.isAttachedToWindow).thenReturn(false) in repeatWhenAttached_viewStartsDetached_runsBlockWhenAttached()
114 whenever(view.isAttachedToWindow).thenReturn(true) in repeatWhenAttached_viewStartsDetached_runsBlockWhenAttached()
125 whenever(view.isAttachedToWindow).thenReturn(true) in repeatWhenAttached_viewAlreadyAttached_immediatelyRunsBlock()
137 whenever(view.isAttachedToWindow).thenReturn(true) in repeatWhenAttached_startsVisibleWithoutFocus_STARTED()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/
DKeyguardKeyEventInteractorTest.kt36 import com.android.systemui.util.mockito.whenever
74 whenever(mediaSessionLegacyHelperWrapper.getHelper(any())) in setup()
92 whenever(statusBarStateController.isDozing).thenReturn(true) in dispatchKeyEvent_volumeKey_dozing_handlesEvents()
113 whenever(statusBarStateController.isDozing).thenReturn(false) in dispatchKeyEvent_volumeKey_notDozing_doesNotHandleEvents()
135 whenever(statusBarStateController.state).thenReturn(StatusBarState.SHADE_LOCKED) in dispatchKeyEvent_menuActionUp_awakeShadeLocked_collapsesShade()
136 whenever(statusBarKeyguardViewManager.shouldDismissOnMenuPressed()).thenReturn(true) in dispatchKeyEvent_menuActionUp_awakeShadeLocked_collapsesShade()
144 whenever(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD) in dispatchKeyEvent_menuActionUp_asleepKeyguard_neverCollapsesShade()
145 whenever(statusBarKeyguardViewManager.shouldDismissOnMenuPressed()).thenReturn(true) in dispatchKeyEvent_menuActionUp_asleepKeyguard_neverCollapsesShade()
153 whenever(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD) in dispatchKeyEvent_spaceActionUp_awakeKeyguard_collapsesShade()
161 whenever(statusBarStateController.state).thenReturn(StatusBarState.SHADE_LOCKED) in dispatchKeyEvent_spaceActionUp_shadeLocked_collapsesShade()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/
DMediaSessionBasedFilterTest.kt43 import org.mockito.Mockito.`when` as whenever
103 whenever(mediaSessionManager.getActiveSessions(any())).thenReturn(emptyList()) in setUp()
115 whenever(controller1.getSessionToken()).thenReturn(token1) in setUp()
116 whenever(controller2.getSessionToken()).thenReturn(token2) in setUp()
117 whenever(controller3.getSessionToken()).thenReturn(token3) in setUp()
118 whenever(controller4.getSessionToken()).thenReturn(token4) in setUp()
120 whenever(controller1.getPackageName()).thenReturn(PACKAGE) in setUp()
121 whenever(controller2.getPackageName()).thenReturn(PACKAGE) in setUp()
122 whenever(controller3.getPackageName()).thenReturn(PACKAGE) in setUp()
123 whenever(controller4.getPackageName()).thenReturn(PACKAGE) in setUp()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/flags/
DFeatureFlagsClassicDebugTest.kt50 import org.mockito.Mockito.`when` as whenever
98 whenever(flagManager.nameToSettingsKey(any())).thenAnswer { "key-${it.arguments[0]}" } in setup()
103 whenever(flagManager.readFlagValue<Boolean>(eq("3"), any())).thenReturn(true) in readBooleanFlag()
104 whenever(flagManager.readFlagValue<Boolean>(eq("4"), any())).thenReturn(false) in readBooleanFlag()
149 whenever(flagManager.readFlagValue<Boolean>(eq(teamfoodableFlagA.name), any())) in teamFoodFlag_Overridden()
151 whenever(flagManager.readFlagValue<Boolean>(eq(releasedFlagB.name), any())) in teamFoodFlag_Overridden()
163 whenever(resources.getBoolean(1001)).thenReturn(false) in readResourceBooleanFlag()
164 whenever(resources.getBoolean(1002)).thenReturn(true) in readResourceBooleanFlag()
165 whenever(resources.getBoolean(1003)).thenReturn(false) in readResourceBooleanFlag()
166 whenever(resources.getBoolean(1004)).thenAnswer { throw NameNotFoundException() } in readResourceBooleanFlag()
[all …]

12345678910>>...23