Home
last modified time | relevance | path

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

123

/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DSystemStateHelperTest.java54 import org.mockito.invocation.InvocationOnMock;
162 doAnswer(invocation -> { in testDeviceOnEarCorrectlyDetected()
163 SensorEventListener listener = invocation.getArgument(0); in testDeviceOnEarCorrectlyDetected()
164 Sensor sensor = invocation.getArgument(1); in testDeviceOnEarCorrectlyDetected()
183 doAnswer(invocation -> { in testDeviceIsNotOnEarWithProxNotSensed()
184 SensorEventListener listener = invocation.getArgument(0); in testDeviceIsNotOnEarWithProxNotSensed()
185 Sensor sensor = invocation.getArgument(1); in testDeviceIsNotOnEarWithProxNotSensed()
203 doAnswer(invocation -> { in testDeviceIsNotOnEarWithWrongOrientation()
204 SensorEventListener listener = invocation.getArgument(0); in testDeviceIsNotOnEarWithWrongOrientation()
205 Sensor sensor = invocation.getArgument(1); in testDeviceIsNotOnEarWithWrongOrientation()
[all …]
DComponentContextFixture.java26 import org.mockito.invocation.InvocationOnMock;
476 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable {
478 (Intent) invocation.getArguments()[0],
479 (Integer) invocation.getArguments()[1]);
485 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable {
487 (Intent) invocation.getArguments()[0],
488 (Integer) invocation.getArguments()[1]);
509 public Void answer(InvocationOnMock invocation) throws Throwable {
561 public String answer(InvocationOnMock invocation) {
562 Object[] args = invocation.getArguments();
DAsyncBlockCheckFilterTest.java97 doAnswer(invocation -> { in testBlockNumber()
116 doAnswer(invocation -> { in testBlockNumber_enhancedBlockingEnabled()
136 doAnswer(invocation -> { in testDontBlockNumber()
155 doAnswer(invocation -> { in testDontBlockNumber_enhancedBlockingEnabled()
/packages/apps/TV/tests/unit/src/com/android/tv/util/
DTvInputManagerHelperTest.java33 import org.mockito.invocation.InvocationOnMock;
216 public Boolean answer(InvocationOnMock invocation) throws Throwable { in createMockTvInputManager()
217 TvInputInfo info = (TvInputInfo) invocation.getArguments()[0]; in createMockTvInputManager()
226 public String answer(InvocationOnMock invocation) throws Throwable { in createMockTvInputManager()
227 TvInputInfo info = (TvInputInfo) invocation.getArguments()[0]; in createMockTvInputManager()
236 public String answer(InvocationOnMock invocation) throws Throwable { in createMockTvInputManager()
237 TvInputInfo info = (TvInputInfo) invocation.getArguments()[0]; in createMockTvInputManager()
246 public TvInputInfo answer(InvocationOnMock invocation) in createMockTvInputManager()
248 String inputId = (String) invocation.getArguments()[0]; in createMockTvInputManager()
/packages/modules/NetworkStack/tests/unit/src/com/android/server/connectivity/
DNetworkMonitorTest.java248 doAnswer(invocation -> { in startMocking()
249 return getAllByName(invocation.getMock(), invocation.getArgument(0)); in startMocking()
253 doAnswer(invocation -> { in startMocking()
254 String hostname = (String) invocation.getArgument(1); in startMocking()
255 Executor executor = (Executor) invocation.getArgument(3); in startMocking()
256 DnsResolver.Callback<List<InetAddress>> callback = invocation.getArgument(5); in startMocking()
258 List<InetAddress> answer = getAnswer(invocation.getMock(), hostname); in startMocking()
269 doAnswer(invocation -> { in startMocking()
270 String hostname = (String) invocation.getArgument(1); in startMocking()
271 Executor executor = (Executor) invocation.getArgument(4); in startMocking()
[all …]
/packages/apps/Messaging/tests/src/com/android/messaging/ui/mediapicker/
DMockCameraFactory.java24 import org.mockito.invocation.InvocationOnMock;
53 public Camera answer(InvocationOnMock invocation) { in createCameraWrapper()
54 return cameras[(Integer) invocation.getArguments()[0]]; in createCameraWrapper()
59 public Void answer(InvocationOnMock invocation) throws Throwable { in createCameraWrapper()
61 cameras[(Integer) invocation.getArguments()[0]], in createCameraWrapper()
62 (CameraInfo) invocation.getArguments()[1] in createCameraWrapper()
/packages/apps/ThemePicker/robolectric_tests/src/com/android/customization/testutils/
DOverlayManagerMocks.java110 (Answer<Boolean>) invocation -> in setUpMock()
111 setEnabled(invocation.getArgument(0), in setUpMock()
113 invocation.getArgument(1))); in setUpMock()
116 (Answer<Boolean>) invocation -> in setUpMock()
118 invocation.getArgument(0), in setUpMock()
120 invocation.getArgument(1))); in setUpMock()
/packages/apps/Messaging/tests/src/com/android/messaging/
DFakeFactory.java46 import org.mockito.invocation.InvocationOnMock;
91 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext()
92 final Object[] args = invocation.getArguments(); in registerWithFakeContext()
100 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext()
101 final Object[] args = invocation.getArguments(); in registerWithFakeContext()
109 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext()
110 return (String) invocation.getArguments()[0]; in registerWithFakeContext()
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/
DRecommendationUtils.java31 import org.mockito.invocation.InvocationOnMock;
44 public Integer answer(InvocationOnMock invocation) throws Throwable { in createMockRecommendationDataManager()
53 public Collection<ChannelRecord> answer(InvocationOnMock invocation) in createMockRecommendationDataManager()
63 public ChannelRecord answer(InvocationOnMock invocation) in createMockRecommendationDataManager()
65 long channelId = (long) invocation.getArguments()[0]; in createMockRecommendationDataManager()
/packages/apps/TV/tests/unit/src/com/android/tv/data/
DChannelImplTest.java39 import org.mockito.invocation.InvocationOnMock;
100 public ActivityInfo answer(InvocationOnMock invocation) { in setUp()
110 invocation in setUp()
260 public Boolean answer(InvocationOnMock invocation) throws Throwable { in testComparator()
261 String inputId = (String) invocation.getArguments()[0]; in testComparator()
313 public Boolean answer(InvocationOnMock invocation) throws Throwable { in testComparatorLabel()
314 String inputId = (String) invocation.getArguments()[0]; in testComparatorLabel()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DNotificationAssistantPickerTest.java43 import org.mockito.invocation.InvocationOnMock;
134 (InvocationOnMock invocation) -> { in noDialogOnNoAssistantSelected()
135 return invocation.getArgument(1); in noDialogOnNoAssistantSelected()
145 (InvocationOnMock invocation) -> { in dialogTextHasAssistantName()
146 return invocation.getArgument(1); in dialogTextHasAssistantName()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/services/
DTestNotificationManager.java29 import org.mockito.invocation.InvocationOnMock;
54 private Void invoke(InvocationOnMock invocation) { in invoke() argument
55 Object[] args = invocation.getArguments(); in invoke()
56 switch (invocation.getMethod().getName()) { in invoke()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DAppStorageSettingsTest.java66 .thenAnswer(invocation -> { in setUp()
67 final Object[] args = invocation.getArguments(); in setUp()
72 .thenAnswer(invocation -> { in setUp()
73 final Object[] args = invocation.getArguments(); in setUp()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/provisioning/
DProvisioningManagerTest.java53 import org.mockito.invocation.InvocationOnMock;
89 (InvocationOnMock invocation) -> { in setUp()
90 Message msg = (Message) invocation.getArguments()[0]; in setUp()
175 doAnswer((InvocationOnMock invocation) -> { in testListener_preFinalizationCompleted() argument
/packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/
DPreferenceListTest.java63 doAnswer(invocation -> { in setUp()
64 final String key = ((VpnProfile)(invocation.getArguments()[0])).key; in setUp()
71 doAnswer(invocation -> { in setUp()
72 final AppVpnInfo key = (AppVpnInfo)(invocation.getArguments()[0]); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DPowerUsageSummaryTest.java70 import org.mockito.invocation.InvocationOnMock;
255 public Object answer(InvocationOnMock invocation) { in showBothEstimates_summariesAreBothModified()
257 R.string.power_usage_old_debug, invocation.getArguments()[0]); in showBothEstimates_summariesAreBothModified()
262 public Object answer(InvocationOnMock invocation) { in showBothEstimates_summariesAreBothModified()
264 R.string.power_usage_enhanced_debug, invocation.getArguments()[0]); in showBothEstimates_summariesAreBothModified()
311 doAnswer(invocation -> { in optionsMenu_clickAdvancedPage_fireIntent()
DBatteryInfoTest.java53 import org.mockito.invocation.InvocationOnMock;
252 doAnswer(invocation -> { in mockBatteryStatsHistory()
259 public Object answer(InvocationOnMock invocation) throws Throwable { in mockBatteryStatsHistory()
263 BatteryStats.HistoryItem record = invocation.getArgument(0); in mockBatteryStatsHistory()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothDetailsButtonsControllerTest.java66 .thenAnswer(invocation -> { in setUp()
67 final Object[] args = invocation.getArguments(); in setUp()
72 .thenAnswer(invocation -> { in setUp()
73 final Object[] args = invocation.getArguments(); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
DEnterpriseInstalledPackagesPreferenceControllerTest.java40 import org.mockito.invocation.InvocationOnMock;
66 public Object answer(InvocationOnMock invocation) { in setNumberOfEnterpriseInstalledPackages()
68 invocation.getArguments()[1]).onNumberOfAppsResult(number); in setNumberOfEnterpriseInstalledPackages()
DAdminGrantedPermissionsPreferenceControllerTestBase.java39 import org.mockito.invocation.InvocationOnMock;
70 public Object answer(InvocationOnMock invocation) { in setNumberOfPackagesWithAdminGrantedPermissions()
72 invocation.getArguments()[2]).onNumberOfAppsResult(number); in setNumberOfPackagesWithAdminGrantedPermissions()
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
DJobPreconditionsTest.java36 import org.mockito.invocation.InvocationOnMock;
116 public NetworkInfo answer(InvocationOnMock invocation) { in hookUpMocks()
117 Network network = (Network) invocation.getArguments()[0]; in hookUpMocks()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarBluetoothServiceTest.java40 import org.mockito.invocation.InvocationOnMock;
96 public Void answer(InvocationOnMock invocation) throws Throwable { in setUp()
97 Object[] arguments = invocation.getArguments(); in setUp()
DBluetoothDeviceConnectionPolicyTest.java43 import org.mockito.invocation.InvocationOnMock;
92 public Void answer(InvocationOnMock invocation) throws Throwable { in setUp()
93 Object[] arguments = invocation.getArguments(); in setUp()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DFakeSystemFacade.java21 import org.mockito.invocation.InvocationOnMock;
84 public URLConnection answer(InvocationOnMock invocation) throws Throwable { in getNetwork()
85 final URL url = (URL) invocation.getArguments()[0]; in getNetwork()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DInstallPackageTaskTest.java100 (Answer<Integer>) invocation -> sSessionId++); in setUp()
105 (Answer<Intent>) invocation -> (Intent) getContext().registerReceiver( in setUp()
106 invocation.getArgument(0), invocation.getArgument(1))); in setUp()

123