Home
last modified time | relevance | path

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

12345

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/
DUiccCarrierPrivilegeRulesTest.java39 import org.mockito.invocation.InvocationOnMock;
106 public Void answer(InvocationOnMock invocation) throws Throwable { in testHelper()
107 Message message = (Message) invocation.getArguments()[2]; in testHelper()
117 public Void answer(InvocationOnMock invocation) throws Throwable { in testHelper()
118 Message message = (Message) invocation.getArguments()[7]; in testHelper()
130 public Void answer(InvocationOnMock invocation) throws Throwable { in testHelper()
131 Message message = (Message) invocation.getArguments()[1]; in testHelper()
314 public Void answer(InvocationOnMock invocation) throws Throwable { in testAID_OnlyARAM()
315 String aid = (String) invocation.getArguments()[0]; in testAID_OnlyARAM()
316 Message message = (Message) invocation.getArguments()[2]; in testAID_OnlyARAM()
[all …]
DIccPhoneBookInterfaceManagerTest.java34 import org.mockito.invocation.InvocationOnMock;
76 public Void answer(InvocationOnMock invocation) throws Throwable { in setUp()
77 Message response = (Message) invocation.getArguments()[2]; in setUp()
104 public Void answer(InvocationOnMock invocation) throws Throwable { in testAdnEFLoadWithFailure()
105 Message response = (Message) invocation.getArguments()[2]; in testAdnEFLoadWithFailure()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/testables/
DTestableDeviceConfig.java166 invocation -> {
167 String key = invocation.getArgument(0);
168 boolean defaultValue = invocation.getArgument(1);
177 invocation -> {
178 String key = invocation.getArgument(0);
179 float defaultValue = invocation.getArgument(1);
192 invocation -> {
193 String key = invocation.getArgument(0);
194 int defaultValue = invocation.getArgument(1);
207 invocation -> {
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DMockKeyStore.java12 import org.mockito.invocation.InvocationOnMock;
43 public Boolean answer(InvocationOnMock invocation) throws Throwable { in createMock()
44 Object[] args = invocation.getArguments(); in createMock()
54 public Boolean answer(InvocationOnMock invocation) throws Throwable { in createMock()
55 Object[] args = invocation.getArguments(); in createMock()
64 public Boolean answer(InvocationOnMock invocation) throws Throwable { in createMock()
65 Object[] args = invocation.getArguments(); in createMock()
73 public Boolean answer(InvocationOnMock invocation) throws Throwable { in createMock()
74 Object[] args = invocation.getArguments(); in createMock()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DBatteryServiceTest.java33 import org.mockito.invocation.InvocationOnMock;
77 doAnswer((invocation) -> {
80 sendNotification(invocation, true);
81 sendNotification(invocation, true);
82 sendNotification(invocation, false);
110 private static void sendNotification(InvocationOnMock invocation, boolean preexisting)
112 ((IServiceNotification)invocation.getArguments()[2]).onRegistration(
114 (String)invocation.getArguments()[1],
/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/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsCpuTimesTest.java260 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked()
262 (KernelCpuUidUserSysTimeReader.Callback<long[]>) invocation.getArguments()[0]; in testReadKernelUidCpuTimesLocked()
295 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked()
297 (KernelCpuUidUserSysTimeReader.Callback<long[]>) invocation.getArguments()[0]; in testReadKernelUidCpuTimesLocked()
335 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked_isolatedUid()
337 (KernelCpuUidUserSysTimeReader.Callback<long[]>) invocation.getArguments()[0]; in testReadKernelUidCpuTimesLocked_isolatedUid()
371 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked_isolatedUid()
373 (KernelCpuUidUserSysTimeReader.Callback<long[]>) invocation.getArguments()[0]; in testReadKernelUidCpuTimesLocked_isolatedUid()
425 doAnswer(invocation -> { in testReadKernelUidCpuTimesLocked_invalidUid()
427 (KernelCpuUidUserSysTimeReader.Callback<long[]>) invocation.getArguments()[0]; in testReadKernelUidCpuTimesLocked_invalidUid()
[all …]
/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.java57 doAnswer(invocation -> mHandler.postDelayed((Runnable) invocation.getArguments()[0], in setUp()
58 (long) invocation.getArguments()[1]) in setUp()
60 doAnswer(invocation -> { in setUp()
61 mHandler.removeCallbacks((Runnable) invocation.getArguments()[0]); in setUp()
DPhoneSwitcherTest.java1008 doAnswer(invocation -> { in initializeCommandInterfacesMock()
1009 Handler handler = (Handler) invocation.getArguments()[0]; in initializeCommandInterfacesMock()
1010 int message = (int) invocation.getArguments()[1]; in initializeCommandInterfacesMock()
1011 Object obj = invocation.getArguments()[2]; in initializeCommandInterfacesMock()
1017 doAnswer(invocation -> { in initializeCommandInterfacesMock()
1018 mDataAllowed[0] = (boolean) invocation.getArguments()[0]; in initializeCommandInterfacesMock()
1023 doAnswer(invocation -> { in initializeCommandInterfacesMock()
1024 mDataAllowed[1] = (boolean) invocation.getArguments()[0]; in initializeCommandInterfacesMock()
1035 doAnswer(invocation -> { in initializeTelRegistryMock()
1037 (IOnSubscriptionsChangedListener) invocation.getArguments()[1]; in initializeTelRegistryMock()
[all …]
DContextFixture.java81 import org.mockito.invocation.InvocationOnMock;
584 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable { in ContextFixture()
586 (Intent) invocation.getArguments()[0], in ContextFixture()
587 (Integer) invocation.getArguments()[1]); in ContextFixture()
593 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable { in ContextFixture()
595 (Intent) invocation.getArguments()[0], in ContextFixture()
596 (Integer) invocation.getArguments()[1]); in ContextFixture()
607 invocation -> mSystemFeatures.contains((String) invocation.getArgument(0))) in ContextFixture()
637 public String answer(InvocationOnMock invocation) { in putResource()
638 Object[] args = invocation.getArguments(); in putResource()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/
DTelephonyNetworkFactoryTest.java118 doAnswer(invocation -> { in setUp()
119 mNetworkRequestList.add((NetworkRequest) invocation.getArguments()[0]); in setUp()
123 doAnswer(invocation -> { in setUp()
124 mNetworkRequestList.remove((NetworkRequest) invocation.getArguments()[0]); in setUp()
128 doAnswer(invocation -> { in setUp()
130 (Messenger) invocation.getArguments()[0], in setUp()
131 (String) invocation.getArguments()[1]); in setUp()
135 doAnswer(invocation -> { in setUp()
137 (Messenger) invocation.getArguments()[0]); in setUp()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/euicc/
DEuiccControllerTest.java74 import org.mockito.invocation.InvocationOnMock;
1103 public Void answer(InvocationOnMock invocation) throws Exception { in callGetEid()
1104 EuiccConnector.GetEidCommandCallback cb = invocation in callGetEid()
1121 public Void answer(InvocationOnMock invocation) throws Exception { in callGetOtaStatus()
1122 GetOtaStatusCommandCallback cb = invocation.getArgument(1 /* resultCallback */); in callGetOtaStatus()
1138 public Void answer(InvocationOnMock invocation) throws Exception { in callStartOtaUpdatingIfNecessary()
1139 OtaStatusChangedCallback cb = invocation.getArgument(1 /* resultCallback */); in callStartOtaUpdatingIfNecessary()
1156 public Void answer(InvocationOnMock invocation) throws Exception { in callGetEuiccInfo()
1157 EuiccConnector.GetEuiccInfoCommandCallback cb = invocation in callGetEuiccInfo()
1174 public Void answer(InvocationOnMock invocation) throws Exception { in prepareGetDownloadableSubscriptionMetadataCall()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DBaseLockSettingsServiceTests.java52 import org.mockito.invocation.InvocationOnMock;
164 public Boolean answer(InvocationOnMock invocation) throws Throwable { in setUp()
165 Object[] args = invocation.getArguments(); in setUp()
203 public Void answer(InvocationOnMock invocation) throws Throwable { in setUpStorageManagerMock()
204 Object[] args = invocation.getArguments(); in setUpStorageManagerMock()
216 public Void answer(InvocationOnMock invocation) throws Throwable { in setUpStorageManagerMock()
217 Object[] args = invocation.getArguments(); in setUpStorageManagerMock()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DFakeContextBuilder.java107 (Answer<ResolveInfo>) invocation -> { in build()
108 final String action = ((Intent) invocation.getArgument(0)).getAction(); in build()
115 (Answer<CharSequence>) invocation -> { in build()
116 ApplicationInfo applicationInfo = invocation.getArgument(0); in build()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/euicc/apdu/
DLogicalChannelMocker.java33 import org.mockito.invocation.InvocationOnMock;
51 doAnswer((Answer<Void>) invocation -> { in mockOpenLogicalChannelResponse()
71 public Object answer(InvocationOnMock invocation) throws Throwable { in mockSendToLogicalChannel()
97 doAnswer((Answer<Void>) invocation -> { in mockCloseLogicalChannel()
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDpmTestBase.java246 invocation -> invocation.getArguments()[1] in mockSystemPropertiesToReturnDefault()
251 invocation -> invocation.getArguments()[1] in mockSystemPropertiesToReturnDefault()
256 invocation -> invocation.getArguments()[1] in mockSystemPropertiesToReturnDefault()
DDevicePolicyManagerServiceMigrationTest.java109 doAnswer(invocation -> { in testMigration()
110 Integer userId = (Integer) invocation.getArguments()[0]; in testMigration()
111 Bundle bundle = (Bundle) invocation.getArguments()[1]; in testMigration()
222 doAnswer(invocation -> { in testMigration2_profileOwnerOnUser0()
223 Integer userId = (Integer) invocation.getArguments()[0]; in testMigration2_profileOwnerOnUser0()
224 Bundle bundle = (Bundle) invocation.getArguments()[1]; in testMigration2_profileOwnerOnUser0()
DMockSystemServices.java214 invocation -> { in addUser()
215 final int userId1 = (int) invocation.getArguments()[0]; in addUser()
220 invocation -> { in addUser()
221 final int userId1 = (int) invocation.getArguments()[0]; in addUser()
227 invocation -> { in addUser()
228 final int userId12 = (int) invocation.getArguments()[0]; in addUser()
233 invocation -> { in addUser()
234 final int userId13 = (int) invocation.getArguments()[0]; in addUser()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/imsphone/
DImsPhoneCallTrackerTest.java83 import org.mockito.invocation.InvocationOnMock;
132 public Void answer(InvocationOnMock invocation) throws Throwable { in imsCallMocking()
143 public Void answer(InvocationOnMock invocation) throws Throwable { in imsCallMocking()
145 int reasonCode = (int) invocation.getArguments()[0]; in imsCallMocking()
156 public Void answer(InvocationOnMock invocation) throws Throwable { in imsCallMocking()
158 int reasonCode = (int) invocation.getArguments()[0]; in imsCallMocking()
168 public Void answer(InvocationOnMock invocation) throws Throwable { in imsCallMocking()
195 doAnswer(invocation -> { in setUp()
196 mMmTelListener = (MmTelFeature.Listener) invocation.getArguments()[0]; in setUp()
203 public ImsCall answer(InvocationOnMock invocation) throws Throwable { in setUp()
[all …]
/frameworks/opt/car/setupwizard/library/main/tests/robotests/src/com/android/car/setupwizardlib/shadows/
DShadowCar.java28 import org.mockito.invocation.InvocationOnMock;
56 public Void answer(InvocationOnMock invocation) { in createCar()
64 public Void answer(InvocationOnMock invocation) { in createCar()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/tuner/
DTunablePaddingTest.java55 doAnswer(invocation -> { in setup()
56 tracker.getLeakInfo(invocation.getArguments()[0]).addAllocation(new Throwable()); in setup()
59 doAnswer(invocation -> { in setup()
60 tracker.getLeakInfo(invocation.getArguments()[0]).clearAllocations(); in setup()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceManagerTest.java111 doAnswer((invocation) -> mHearingAidProfile). in setUp()
142 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_sameHiSyncId_validSubDevice()
143 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_sameHiSyncId_validSubDevice()
155 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_differentHiSyncId_validSubDevice()
156 doAnswer((invocation) -> HISYNCID2).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_differentHiSyncId_validSubDevice()
168 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_sameHiSyncId_validCachedDevices_mainDevicesAdded_subDevicesNotAdded()
169 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_sameHiSyncId_validCachedDevices_mainDevicesAdded_subDevicesNotAdded()
183 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in addDevice_differentHiSyncId_validCachedDevices_bothAdded()
184 doAnswer((invocation) -> HISYNCID2).when(mHearingAidProfile).getHiSyncId(mDevice2); in addDevice_differentHiSyncId_validCachedDevices_bothAdded()
198 doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1); in findDevice_sameHiSyncId_foundBothDevice()
[all …]
/frameworks/base/services/tests/servicestests/utils/com/android/server/testutils/
DTestUtils.java59 return Mockito.mock(c, (Answer) invocation -> { in strictMock()
60 throw new AssertionError("Unexpected invocation: " + invocation); in strictMock()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DHotspotControllerImplTest.java43 import org.mockito.invocation.InvocationOnMock;
69 doAnswer((InvocationOnMock invocation) -> { in setUp() argument
70 ((WifiManager.SoftApCallback) invocation.getArgument(0)).onNumClientsChanged(1); in setUp()

12345