Home
last modified time | relevance | path

Searched refs:invocation (Results 1 – 25 of 365) sorted by relevance

12345678910>>...15

/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/concurrency/
DMockExecutorHandler.kt27 import org.mockito.invocation.InvocationOnMock in <lambda>()
42 doAnswer { invocation: InvocationOnMock -> in <lambda>() method
43 executor.execute(invocation.getArgument(0)) in <lambda>()
49 doAnswer { invocation: InvocationOnMock -> in <lambda>() method
50 val runnable = invocation.getArgument<Runnable>(0) in <lambda>()
51 val uptimeMillis = invocation.getArgument<Long>(1) in <lambda>()
69 doAnswer { invocation: InvocationOnMock -> in <lambda>() method
70 val runnable = invocation.getArgument<Runnable>(0) in <lambda>()
71 val delayInMillis = invocation.getArgument<Long>(1) in <lambda>()
89 doAnswer { invocation: InvocationOnMock -> in <lambda>() method
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/
DUiccCarrierPrivilegeRulesTest.java43 import org.mockito.invocation.InvocationOnMock;
77 public Void answer(InvocationOnMock invocation) throws Throwable { in testHelper()
78 Message message = (Message) invocation.getArguments()[2]; in testHelper()
88 public Void answer(InvocationOnMock invocation) throws Throwable { in testHelper()
89 Message message = (Message) invocation.getArguments()[8]; in testHelper()
101 public Void answer(InvocationOnMock invocation) throws Throwable { in testHelper()
102 Message message = (Message) invocation.getArguments()[2]; in testHelper()
311 public Void answer(InvocationOnMock invocation) throws Throwable { in testAID_OnlyARAM()
312 String aid = (String) invocation.getArguments()[0]; in testAID_OnlyARAM()
313 Message message = (Message) invocation.getArguments()[2]; in testAID_OnlyARAM()
[all …]
DIccFileHandlerTest.java102 invocation -> { in loadEFLinearFixed_WithNullPath()
103 Message response = invocation.getArgument(9); in loadEFLinearFixed_WithNullPath()
121 invocation -> { in loadEFLinearFixed()
122 Message response = invocation.getArgument(9); in loadEFLinearFixed()
140 invocation -> { in loadEFImgLinearFixed()
141 Message response = invocation.getArgument(9); in loadEFImgLinearFixed()
159 invocation -> { in getEFLinearRecordSize_WithNullPath()
160 Message response = invocation.getArgument(9); in getEFLinearRecordSize_WithNullPath()
178 invocation -> { in getEFLinearRecordSize()
179 Message response = invocation.getArgument(9); in getEFLinearRecordSize()
[all …]
DIccPhoneBookInterfaceManagerTest.java42 import org.mockito.invocation.InvocationOnMock;
83 public Void answer(InvocationOnMock invocation) throws Throwable { in setUp()
84 Message response = (Message) invocation.getArguments()[2]; in setUp()
92 doAnswer(invocation -> { in setUp()
93 Message response = (Message) invocation.getArguments()[0]; in setUp()
128 public Void answer(InvocationOnMock invocation) throws Throwable { in testAdnEFLoadWithFailure()
129 Message response = (Message) invocation.getArguments()[2]; in testAdnEFLoadWithFailure()
151 doAnswer(invocation -> { in testAdnEFLoadByPbCacheWithFailure()
152 Message response = (Message) invocation.getArguments()[0]; in testAdnEFLoadByPbCacheWithFailure()
171 public Void answer(InvocationOnMock invocation) throws Throwable { in testUpdateAdnRecord()
[all …]
DSIMRecordsTest.java180 invocation -> { in setUpSetForbiddenPlmnsTests()
181 Message response = invocation.getArgument(1); in setUpSetForbiddenPlmnsTests()
189 invocation -> { in setUpSetForbiddenPlmnsTests()
190 Message response = invocation.getArgument(2); in setUpSetForbiddenPlmnsTests()
202 invocation -> { in testGetForbiddenPlmns()
203 Message response = invocation.getArgument(1); in testGetForbiddenPlmns()
225 invocation -> { in testGetForbiddenPlmnsException()
226 Message response = invocation.getArgument(1); in testGetForbiddenPlmnsException()
249 invocation -> { in testGetForbiddenPlmnsNull()
250 Message response = invocation.getArgument(1); in testGetForbiddenPlmnsNull()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/
DMockMagnificationConnection.java76 doAnswer((invocation) -> { in MockMagnificationConnection() argument
77 mIMagnificationCallback = invocation.getArgument(0); in MockMagnificationConnection()
82 doAnswer((invocation) -> { in MockMagnificationConnection() argument
83 mDeathRecipient = invocation.getArgument(0); in MockMagnificationConnection()
96 doAnswer((invocation) -> { in stubEnableWindowMagnification() argument
97 final int displayId = invocation.getArgument(0); in stubEnableWindowMagnification()
102 final float scale = invocation.getArgument(1); in stubEnableWindowMagnification()
104 computeMirrorWindowFrame(invocation.getArgument(2), invocation.getArgument(3)); in stubEnableWindowMagnification()
105 setAnimationCallback(invocation.getArgument(6)); in stubEnableWindowMagnification()
117 doAnswer((invocation) -> { in stubDisableWindowMagnification() argument
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/
DPhonePipKeepClearAlgorithmTest.java113 doAnswer(invocation -> { in adjust_withCollidingRestrictedKeepClearArea_moveBounds()
114 Rect arg0 = invocation.getArgument(0); in adjust_withCollidingRestrictedKeepClearArea_moveBounds()
131 doAnswer(invocation -> { in adjust_withNonCollidingRestrictedKeepClearArea_boundsUnchanged()
132 Rect arg0 = invocation.getArgument(0); in adjust_withNonCollidingRestrictedKeepClearArea_boundsUnchanged()
150 doAnswer(invocation -> { in adjust_withCollidingRestrictedKeepClearArea_whileStashed_boundsUnchanged()
151 Rect arg0 = invocation.getArgument(0); in adjust_withCollidingRestrictedKeepClearArea_whileStashed_boundsUnchanged()
169 doAnswer(invocation -> { in adjust_withNonCollidingRestrictedKeepClearArea_whileStashed_boundsUnchanged()
170 Rect arg0 = invocation.getArgument(0); in adjust_withNonCollidingRestrictedKeepClearArea_whileStashed_boundsUnchanged()
188 doAnswer(invocation -> { in adjust_aboveDisplayBounds_onLeftEdge_appliesBottomLeftGravity()
189 Rect arg0 = invocation.getArgument(0); in adjust_aboveDisplayBounds_onLeftEdge_appliesBottomLeftGravity()
[all …]
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DCpuPowerCalculatorTest.java135 doAnswer(invocation -> { in testTimerBasedModel()
136 final KernelCpuUidTimeReader.Callback<Long> callback = invocation.getArgument(0); in testTimerBasedModel()
147 doAnswer(invocation -> { in testTimerBasedModel()
148 final KernelCpuUidTimeReader.Callback<long[]> callback = invocation.getArgument(1); in testTimerBasedModel()
156 doAnswer(invocation -> { in testTimerBasedModel()
157 final KernelCpuUidTimeReader.Callback<Long> callback = invocation.getArgument(0); in testTimerBasedModel()
164 doAnswer(invocation -> { in testTimerBasedModel()
165 final KernelCpuUidTimeReader.Callback<long[]> callback = invocation.getArgument(1); in testTimerBasedModel()
172 doAnswer(invocation -> { in testTimerBasedModel()
173 final KernelCpuUidTimeReader.Callback<long[]> callback = invocation.getArgument(1); in testTimerBasedModel()
[all …]
DBatteryStatsCpuTimesTest.java289 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked()
291 invocation.getArgument(1); in testReadKernelUidCpuTimesLocked()
324 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked()
326 invocation.getArgument(1); in testReadKernelUidCpuTimesLocked()
364 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked_isolatedUid()
366 invocation.getArgument(1); in testReadKernelUidCpuTimesLocked_isolatedUid()
399 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked_isolatedUid()
401 invocation.getArgument(1); in testReadKernelUidCpuTimesLocked_isolatedUid()
453 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked_invalidUid()
455 invocation.getArgument(1); in testReadKernelUidCpuTimesLocked_invalidUid()
[all …]
DSystemServicePowerCalculatorTest.java193 doAnswer(invocation -> { in prepareBatteryStats()
194 final KernelCpuUidTimeReader.Callback<Long> callback = invocation.getArgument(0); in prepareBatteryStats()
206 doAnswer(invocation -> { in prepareBatteryStats()
207 final KernelCpuUidTimeReader.Callback<long[]> callback = invocation.getArgument(1); in prepareBatteryStats()
215 doAnswer(invocation -> { in prepareBatteryStats()
216 final KernelCpuUidTimeReader.Callback<Long> callback = invocation.getArgument(0); in prepareBatteryStats()
224 doAnswer(invocation -> { in prepareBatteryStats()
225 final KernelCpuUidTimeReader.Callback<long[]> callback = invocation.getArgument(1); in prepareBatteryStats()
235 doAnswer(invocation -> { in prepareBatteryStats()
236 final KernelCpuUidTimeReader.Callback<long[]> callback = invocation.getArgument(1); in prepareBatteryStats()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/
DLastCallVerifier.java21 import org.mockito.invocation.Invocation;
22 import org.mockito.invocation.MatchableInvocation;
44 final Invocation invocation = invocations.get(i); in verify() local
45 if (target.hasSameMethod(invocation)) { in verify()
46 if (target.matches(invocation)) { in verify()
49 throw new LastCallMismatch(target.getInvocation(), invocation, invocations); in verify() local
/frameworks/base/services/tests/servicestests/src/com/android/server/health/
DHealthServiceWrapperTest.java40 import org.mockito.invocation.InvocationOnMock;
116 (invocation) -> {
117 sendAidlRegCallback(invocation, mMockedAidlHal);
118 sendAidlRegCallback(invocation, mMockedAidlHal);
119 sendAidlRegCallback(invocation, mMockedAidlHal2);
132 (invocation) -> {
135 sendNotification(invocation, true);
136 sendNotification(invocation, true);
137 sendNotification(invocation, false);
166 private static void sendNotification(InvocationOnMock invocation, boolean preexisting)
[all …]
/frameworks/base/tools/protologtool/tests/com/android/protolog/tool/
DSourceTransformerTest.kt157 ).thenAnswer { invocation -> in <lambda>() method
158 val visitor = invocation.arguments[1] as ProtoLogCallVisitor in <lambda>()
163 invocation.arguments[0] as CompilationUnit in <lambda>()
194 ).thenAnswer { invocation -> in <lambda>() method
195 val visitor = invocation.arguments[1] as ProtoLogCallVisitor in <lambda>()
205 invocation.arguments[0] as CompilationUnit in <lambda>()
236 ).thenAnswer { invocation -> in <lambda>() method
237 val visitor = invocation.arguments[1] as ProtoLogCallVisitor in <lambda>()
243 invocation.arguments[0] as CompilationUnit in <lambda>()
274 ).thenAnswer { invocation -> in <lambda>() method
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DMagnificationProcessorTest.java176 doAnswer((invocation) -> { in getMagnificationRegion_fullscreenModeNotRegistered_shouldRegisterThenUnregister() argument
177 ((Region) invocation.getArguments()[1]).set(region); in getMagnificationRegion_fullscreenModeNotRegistered_shouldRegisterThenUnregister()
194 doAnswer((invocation) -> { in getCurrentMagnificationRegion_windowModeActivated_returnRegion() argument
195 ((Region) invocation.getArguments()[1]).set(region); in getCurrentMagnificationRegion_windowModeActivated_returnRegion()
210 doAnswer((invocation) -> { in getCurrentMagnificationRegion_fullscreenModeActivated_returnRegion() argument
211 ((Region) invocation.getArguments()[1]).set(region); in getCurrentMagnificationRegion_fullscreenModeActivated_returnRegion()
514 doAnswer(invocation -> mScale).when(mScreenMagnificationController).getScale( in stubMethods()
516 doAnswer(invocation -> mCenterX).when(mScreenMagnificationController).getCenterX( in stubMethods()
518 doAnswer(invocation -> mCenterY).when(mScreenMagnificationController).getCenterY( in stubMethods()
520 doAnswer(invocation -> mIsRegistered).when(mScreenMagnificationController).isRegistered( in stubMethods()
[all …]
/frameworks/libs/modules-utils/javatests/com/android/modules/utils/testing/
DTestableDeviceConfigAndOtherStaticMocksTest.java111 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
115 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
119 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
123 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
149 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
153 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
157 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
161 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
DMultipleStaticMocksTest.java102 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
106 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
110 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
114 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
140 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
144 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
148 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
152 ExtendedMockito.doAnswer(invocation -> { in setUpMockBehaviors()
/frameworks/libs/modules-utils/java/com/android/modules/utils/testing/
DTestableDeviceConfig.java201 invocation -> { in getProperties()
202 String key = invocation.getArgument(0); in getProperties()
203 boolean defaultValue = invocation.getArgument(1); in getProperties()
213 invocation -> { in getProperties()
214 String key = invocation.getArgument(0); in getProperties()
215 float defaultValue = invocation.getArgument(1); in getProperties()
229 invocation -> { in getProperties()
230 String key = invocation.getArgument(0); in getProperties()
231 int defaultValue = invocation.getArgument(1); in getProperties()
245 invocation -> { in getProperties()
[all …]
/frameworks/base/tests/utils/testutils/java/android/app/test/
DMockAnswerUtil.java19 import org.mockito.invocation.InvocationOnMock;
38 public final Object answer(InvocationOnMock invocation) throws Throwable { in answer() argument
39 Method method = invocation.getMethod(); in answer()
47 Object[] args = invocation.getArguments(); in answer()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/
DMockUserSwitcherControllerWrapper.kt49 whenever(controller.addUserSwitchCallback(any())).then { invocation -> in <lambda>() method
50 callbacks.add(invocation.arguments.first() as UserSwitchCallback) in <lambda>()
53 whenever(controller.removeUserSwitchCallback(any())).then { invocation -> in <lambda>() method
54 callbacks.remove(invocation.arguments.first() as UserSwitchCallback) in <lambda>()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
DUsimDataDownloadHandlerTest.java115 invocation -> { in sendEnvelopeForException()
116 Message response = invocation.getArgument(1); in sendEnvelopeForException()
148 invocation -> { in sendEnvelopeDataDownloadSuccess()
149 Message response = invocation.getArgument(1); in sendEnvelopeDataDownloadSuccess()
181 invocation -> { in sendEnvelopeDataDownloadFailed()
182 Message response = invocation.getArgument(1); in sendEnvelopeDataDownloadFailed()
215 invocation -> { in sendEnvelopeForSw1_62()
216 Message response = invocation.getArgument(1); in sendEnvelopeForSw1_62()
246 invocation -> { in smsCompleteForException()
247 Message response = invocation.getArgument(3); in smsCompleteForException()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DRebootEscrowManagerTests.java479 .thenAnswer(invocation -> invocation.getArgument(0)); in armServiceServerBased_Success()
593 when(mRebootEscrow.retrieveKey()).thenAnswer(invocation -> keyByteCaptor.getValue()); in loadRebootEscrowDataIfAvailable_Success()
618 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_noDataPrimaryUser_Failure()
676 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_noDataSecondaryUser_Success()
699 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_noDataSecondaryUser_Success()
732 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_noDataWorkProfile_Success()
755 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_noDataWorkProfile_Success()
785 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_ServerBased_Success()
805 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_ServerBased_Success()
829 .thenAnswer(invocation -> invocation.getArgument(0)); in loadRebootEscrowDataIfAvailable_ServerBasedRemoteException_Failure()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/satellite/
DSatelliteDialogUtilsTest.kt75 .thenAnswer { invocation -> in <lambda>() method
76 val receiver = invocation in <lambda>()
103 .thenAnswer { invocation -> in <lambda>() method
104 val receiver = invocation in <lambda>()
144 .thenAnswer { invocation -> in <lambda>() method
145 val receiver = invocation in <lambda>()
/frameworks/base/services/tests/servicestests/src/com/android/server/net/watchlist/
DWatchlistLoggingHandlerTests.java46 import org.mockito.invocation.InvocationOnMock;
104 doAnswer((InvocationOnMock invocation) -> { in setUp() argument
112 doAnswer((InvocationOnMock invocation) -> { in setUp() argument
126 doAnswer((InvocationOnMock invocation) -> { in setUp() argument
127 int uid = (int) invocation.getArguments()[0]; in setUp()
146 doAnswer((InvocationOnMock invocation) -> { in setUp() argument
147 String pkg = (String) invocation.getArguments()[0]; in setUp()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DExponentialBackoffTest.java61 doAnswer(invocation -> mHandler.postDelayed((Runnable) invocation.getArguments()[0], in setUp()
62 (long) invocation.getArguments()[1]) in setUp()
64 doAnswer(invocation -> { in setUp()
65 mHandler.removeCallbacks((Runnable) invocation.getArguments()[0]); in setUp()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceManagerTest.java133 doAnswer((invocation) -> mHearingAidProfile). in setUp()
135 doAnswer((invocation) -> mCsipSetCoordinatorProfile) in setUp()
166 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_sameHiSyncId_validSubDevice()
167 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_sameHiSyncId_validSubDevice()
179 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_differentHiSyncId_validSubDevice()
180 doAnswer((invocation) -> HISYNCID2).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_differentHiSyncId_validSubDevice()
192 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_sameHiSyncId_validCachedDevices_mainDevicesAdded_subDevicesNotAdded()
193 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_sameHiSyncId_validCachedDevices_mainDevicesAdded_subDevicesNotAdded()
207 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_differentHiSyncId_validCachedDevices_bothAdded()
208 doAnswer((invocation) -> HISYNCID2).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_differentHiSyncId_validCachedDevices_bothAdded()
[all …]

12345678910>>...15