/cts/tests/tests/view/src/android/view/cts/ |
D | ViewTreeObserverTest.java | 91 final ViewTreeObserver.OnGlobalFocusChangeListener listener = in testAddOnGlobalFocusChangeListener() local 93 mViewTreeObserver.addOnGlobalFocusChangeListener(listener); in testAddOnGlobalFocusChangeListener() 97 verify(listener, within(TIMEOUT_MS)).onGlobalFocusChanged(view1, view2); in testAddOnGlobalFocusChangeListener() 104 final ViewTreeObserver.OnGlobalLayoutListener listener = in testAddOnGlobalLayoutListener() local 106 mViewTreeObserver.addOnGlobalLayoutListener(listener); in testAddOnGlobalLayoutListener() 108 verify(listener, times(1)).onGlobalLayout(); in testAddOnGlobalLayoutListener() 115 final ViewTreeObserver.OnPreDrawListener listener = in testAddOnPreDrawListener() local 117 mViewTreeObserver.addOnPreDrawListener(listener); in testAddOnPreDrawListener() 119 verify(listener, times(1)).onPreDraw(); in testAddOnPreDrawListener() 126 final ViewTreeObserver.OnDrawListener listener = in testAddOnDrawListener() local [all …]
|
D | OrientationListenerTest.java | 53 MockOrientationListener listener = new MockOrientationListener(mContext); in testRegisterationOfOrientationListener() local 54 listener.disable(); in testRegisterationOfOrientationListener() 55 listener.enable(); in testRegisterationOfOrientationListener() 71 MockOrientationListener listener = new MockOrientationListener(mContext); in testOnSensorChanged() local 88 MockOrientationListener listener = new MockOrientationListener(mContext); in testOnOrientationChanged() local 89 listener.enable(); in testOnOrientationChanged()
|
D | OrientationEventListenerTest.java | 55 MyOrientationEventListener listener = new MyOrientationEventListener(mContext); in testEnableAndDisable() local 56 listener.enable(); in testEnableAndDisable() 57 listener.disable(); in testEnableAndDisable() 66 MyOrientationEventListener listener = new MyOrientationEventListener(mContext); in testCanDetectOrientation() local 67 assertEquals(hasSensor, listener.canDetectOrientation()); in testCanDetectOrientation()
|
D | ViewStubTest.java | 94 final ViewStub.OnInflateListener listener = mock(ViewStub.OnInflateListener.class); in testSetVisibility() local 95 viewStub1.setOnInflateListener(listener); in testSetVisibility() 96 verifyZeroInteractions(listener); in testSetVisibility() 103 verifyZeroInteractions(listener); in testSetVisibility() 111 verify(listener, times(1)).onInflate(eq(viewStub1), inflatedViewCaptor.capture()); in testSetVisibility() 160 final ViewStub.OnInflateListener listener = mock(ViewStub.OnInflateListener.class); in testSetOnInflateListener() local 162 viewStub.setOnInflateListener(listener); in testSetOnInflateListener() 163 verifyZeroInteractions(listener); in testSetOnInflateListener() 165 verify(listener, times(1)).onInflate(viewStub, inflated); in testSetOnInflateListener() 197 final ViewStub.OnInflateListener listener = mock(ViewStub.OnInflateListener.class); in testInflate() local [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | RadioGroupTest.java | 86 MockOnHierarchyChangeListener listener = new MockOnHierarchyChangeListener(); in testSetOnHierarchyChangeListener() local 87 mRadioGroup.setOnHierarchyChangeListener(listener); in testSetOnHierarchyChangeListener() 90 listener.reset(); in testSetOnHierarchyChangeListener() 92 assertSame(mRadioGroup, listener.getOnChildViewRemovedParentParam()); in testSetOnHierarchyChangeListener() 93 assertSame(button3, listener.getOnChildViewRemovedChildParam()); in testSetOnHierarchyChangeListener() 95 listener.reset(); in testSetOnHierarchyChangeListener() 97 assertSame(mRadioGroup, listener.getOnChildViewAddedParentParam()); in testSetOnHierarchyChangeListener() 98 assertSame(button3, listener.getOnChildViewAddedChildParam()); in testSetOnHierarchyChangeListener() 128 MockOnCheckedChangeListener listener = new MockOnCheckedChangeListener(); in testInternalCheckedStateTracker() local 129 mRadioGroup.setOnCheckedChangeListener(listener); in testInternalCheckedStateTracker() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | MediaSessionManager_MediaSession2Test.java | 222 TokensChangedListener listener = new TokensChangedListener(); in testAddOnSessionTokensChangedListener() local 223 mManager.addOnSessionTokensChangedListener(sHandlerExecutor, listener); in testAddOnSessionTokensChangedListener() 225 listener.reset(); in testAddOnSessionTokensChangedListener() 230 assertTrue(listener.await()); in testAddOnSessionTokensChangedListener() 231 assertTrue(listener.findToken(session1.getToken())); in testAddOnSessionTokensChangedListener() 233 listener.reset(); in testAddOnSessionTokensChangedListener() 235 assertTrue(listener.await()); in testAddOnSessionTokensChangedListener() 236 assertFalse(listener.findToken(session1.getToken())); in testAddOnSessionTokensChangedListener() 238 listener.reset(); in testAddOnSessionTokensChangedListener() 243 assertTrue(listener.await()); in testAddOnSessionTokensChangedListener() [all …]
|
D | MediaSessionManagerTest.java | 76 MediaSessionManager.OnActiveSessionsChangedListener listener in testAddOnActiveSessionsListener() local 84 mSessionManager.addOnActiveSessionsChangedListener(listener, null); in testAddOnActiveSessionsListener() 123 VolumeKeyLongPressListener listener = new VolumeKeyLongPressListener(3, handler); in testSetOnVolumeKeyLongPressListener() local 124 mSessionManager.setOnVolumeKeyLongPressListener(listener, handler); in testSetOnVolumeKeyLongPressListener() 126 assertTrue(listener.mCountDownLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in testSetOnVolumeKeyLongPressListener() 127 assertEquals(listener.mKeyEvents.size(), 3); in testSetOnVolumeKeyLongPressListener() 128 assertKeyEventEquals(listener.mKeyEvents.get(0), in testSetOnVolumeKeyLongPressListener() 130 assertKeyEventEquals(listener.mKeyEvents.get(1), in testSetOnVolumeKeyLongPressListener() 132 assertKeyEventEquals(listener.mKeyEvents.get(2), in testSetOnVolumeKeyLongPressListener() 136 listener = new VolumeKeyLongPressListener(1, handler); in testSetOnVolumeKeyLongPressListener() [all …]
|
D | RoutingTest.java | 246 AudioTrackRoutingListener listener = new AudioTrackRoutingListener(); in test_audioTrack_RoutingListener() local 252 (AudioRouting.OnRoutingChangedListener) listener, null); in test_audioTrack_RoutingListener() 254 audioTrack.addOnRoutingChangedListener(listener, null); in test_audioTrack_RoutingListener() 264 (AudioRouting.OnRoutingChangedListener) listener); in test_audioTrack_RoutingListener() 271 (AudioTrack.OnRoutingChangedListener) listener); in test_audioTrack_RoutingListener() 278 (AudioRouting.OnRoutingChangedListener) listener, new Handler()); in test_audioTrack_RoutingListener() 280 (AudioRouting.OnRoutingChangedListener) listener); in test_audioTrack_RoutingListener() 283 (AudioTrack.OnRoutingChangedListener) listener, new Handler()); in test_audioTrack_RoutingListener() 285 (AudioTrack.OnRoutingChangedListener) listener); in test_audioTrack_RoutingListener() 340 AudioRecordRoutingListener listener = new AudioRecordRoutingListener(); in test_audioRecord_RoutingListener() local [all …]
|
/cts/tests/tests/mediastress/src/android/mediastress/cts/ |
D | SurfaceTextureGLSurfaceView.java | 32 public SurfaceTextureGLSurfaceView(Context context, OnSurfaceChangedListener listener) { in SurfaceTextureGLSurfaceView() argument 33 this(context, null, listener); in SurfaceTextureGLSurfaceView() 37 OnSurfaceChangedListener listener) { in SurfaceTextureGLSurfaceView() argument 39 mListener = listener; in SurfaceTextureGLSurfaceView() 40 init(listener); in SurfaceTextureGLSurfaceView() 43 private void init(OnSurfaceChangedListener listener) { in init() argument 45 mRenderer = new SurfaceTextureRenderer(listener); in init()
|
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/ |
D | TestSensorOperation.java | 78 void execute(TestSensorManager sensorManager, TestSensorEventListener listener) in execute() argument 129 TestSensorEventListener listener = new TestSensorEventListener(mEnvironment, mHandler); in execute() local 135 mExecutor.execute(mSensorManager, listener); in execute() 144 mExecutor.execute(mSensorManager, listener); in execute() 150 List<TestSensorEvent> collectedEvents = listener.getCollectedEvents(); in execute() 155 trySaveCollectedEvents(parent, listener); in execute() 204 private void trySaveCollectedEvents(ISensorTestNode parent, TestSensorEventListener listener) { in trySaveCollectedEvents() argument 221 listener.logCollectedEventsToFile(sanitizedFileName, mDeviceWakeUpTimeMs, in trySaveCollectedEvents() 239 public void execute(TestSensorManager sensorManager, TestSensorEventListener listener) in createOperation() 242 CountDownLatch latch = sensorManager.registerListener(listener, eventCount); in createOperation() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/p2p/testcase/ |
D | GoTestCase.java | 46 ActionListenerTest listener = new ActionListenerTest(); in executeTest() local 52 listener); in executeTest() 53 if (!listener.check(ActionListenerTest.SUCCESS, TIMEOUT)) { in executeTest() 62 listener); in executeTest() 63 if (!listener.check(ActionListenerTest.SUCCESS, TIMEOUT)) { in executeTest() 72 listener); in executeTest() 73 if (!listener.check(ActionListenerTest.SUCCESS, TIMEOUT)) { in executeTest() 81 mP2pMgr.createGroup(mChannel, listener); in executeTest() 82 if (!listener.check(ActionListenerTest.SUCCESS, TIMEOUT)) { in executeTest()
|
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/ |
D | CameraSessionUtils.java | 172 public static CameraCaptureSession configureAndVerifySession(SessionListener listener, in configureAndVerifySession() argument 177 checkNotNull(listener); in configureAndVerifySession() 183 CameraCaptureSession session = listener.getConfiguredSession(device, outputs, handler); in configureAndVerifySession() 184 if (Mockito.mockingDetails(listener).isMock()) { in configureAndVerifySession() 185 verify(listener, never()).onConfigureFailed(any(CameraCaptureSession.class)); in configureAndVerifySession() 186 verify(listener, never()).onClosed(eq(session)); in configureAndVerifySession() 187 verify(listener, atLeastOnce()).onConfigured(eq(session)); in configureAndVerifySession() 212 public static Pair<TotalCaptureResult, Long> captureAndVerifyResult(CaptureCallback listener, in captureAndVerifyResult() argument 215 checkNotNull(listener); in captureAndVerifyResult() 220 Pair<TotalCaptureResult, Long> result = listener.getCapturedResult(session, request, in captureAndVerifyResult() [all …]
|
D | Camera2Focuser.java | 94 AutoFocusListener listener, CameraCharacteristics staticInfo, Handler handler) in Camera2Focuser() argument 102 if (listener == null) { in Camera2Focuser() 118 mAutoFocusListener = listener; in Camera2Focuser() 218 CaptureCallback listener = createCaptureListener(); in cancelAutoFocus() local 219 mSession.setRepeatingRequest(mRepeatingBuilder.build(), listener, mHandler); in cancelAutoFocus() local 220 mSession.capture(requestBuilder.build(), listener, mHandler); in cancelAutoFocus() local 255 CaptureCallback listener = createCaptureListener(); in startAutoFocusLocked() local 256 mSession.setRepeatingRequest(mRepeatingBuilder.build(), listener, mHandler); in startAutoFocusLocked() local 257 mSession.capture(requestBuilder.build(), listener, mHandler); in startAutoFocusLocked() local 279 CaptureCallback listener = createCaptureListener(); in startAutoFocusFullActiveLocked() local [all …]
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
D | CtsMouseUtil.java | 107 public static void verifyEnterMove(View.OnHoverListener listener, View view, int moveCount) { in verifyEnterMove() argument 108 final InOrder inOrder = inOrder(listener); in verifyEnterMove() 109 verifyEnterMoveInternal(listener, view, moveCount, inOrder); in verifyEnterMove() 114 View.OnHoverListener listener, View view, int moveCount) { in verifyEnterMoveExit() argument 115 final InOrder inOrder = inOrder(listener); in verifyEnterMoveExit() 116 verifyEnterMoveInternal(listener, view, moveCount, inOrder); in verifyEnterMoveExit() 117 inOrder.verify(listener, times(1)).onHover(eq(view), in verifyEnterMoveExit() 123 View.OnHoverListener listener, View view, int moveCount, InOrder inOrder) { in verifyEnterMoveInternal() argument 124 inOrder.verify(listener, times(1)).onHover(eq(view), in verifyEnterMoveInternal() 126 inOrder.verify(listener, times(moveCount)).onHover(eq(view), in verifyEnterMoveInternal()
|
/cts/tests/accessibility/src/android/view/accessibility/cts/ |
D | AccessibilityManagerTest.java | 72 AccessibilityStateChangeListener listener = (state) -> { in testAddAndRemoveAccessibilityStateChangeListener() local 75 assertTrue(mAccessibilityManager.addAccessibilityStateChangeListener(listener)); in testAddAndRemoveAccessibilityStateChangeListener() 76 assertTrue(mAccessibilityManager.removeAccessibilityStateChangeListener(listener)); in testAddAndRemoveAccessibilityStateChangeListener() 77 assertFalse(mAccessibilityManager.removeAccessibilityStateChangeListener(listener)); in testAddAndRemoveAccessibilityStateChangeListener() 81 TouchExplorationStateChangeListener listener = (boolean enabled) -> { in testAddAndRemoveTouchExplorationStateChangeListener() local 84 assertTrue(mAccessibilityManager.addTouchExplorationStateChangeListener(listener)); in testAddAndRemoveTouchExplorationStateChangeListener() 85 assertTrue(mAccessibilityManager.removeTouchExplorationStateChangeListener(listener)); in testAddAndRemoveTouchExplorationStateChangeListener() 86 assertFalse(mAccessibilityManager.removeTouchExplorationStateChangeListener(listener)); in testAddAndRemoveTouchExplorationStateChangeListener() 243 TouchExplorationStateChangeListener listener = (boolean b) -> { in testTouchExplorationListenerNoHandler() local 249 mAccessibilityManager.addTouchExplorationStateChangeListener(listener); in testTouchExplorationListenerNoHandler() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
D | WavAnalyzer.java | 12 private final Listener listener; field in WavAnalyzer 25 public WavAnalyzer(byte[] byteData, int sampleRate, Listener listener) { in WavAnalyzer() argument 26 this.listener = listener; in WavAnalyzer() 45 listener.sendMessage("Calculating... Please wait...\n"); in doWork() 49 listener.sendMessage("WARNING: May have missed the prefix." in doWork() 66 listener.sendMessage("WARNING: Data is clipped." in isClipped() 87 listener.sendMessage("WARNING: Inconsistent result across trials." in isConsistent() 101 listener.sendMessage( in responsePassesHifiTest() 108 listener.sendMessage("WARNING: Signal is too weak or background noise is too strong." in responsePassesHifiTest() 120 listener.sendMessage( in responsePassesHifiTest() [all …]
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ClipboardManagerListenerActivity.java | 38 public synchronized void addPrimaryClipChangedListener(OnPrimaryClipChangedListener listener) { in addPrimaryClipChangedListener() argument 39 mClipboardManager.addPrimaryClipChangedListener(listener); in addPrimaryClipChangedListener() 42 … public synchronized void removePrimaryClipChangedListener(OnPrimaryClipChangedListener listener) { in removePrimaryClipChangedListener() argument 43 mClipboardManager.removePrimaryClipChangedListener(listener); in removePrimaryClipChangedListener()
|
/cts/tests/tests/animation/src/android/animation/cts/ |
D | AnimatorTest.java | 154 MyListener listener = new MyListener(); in testSetListener() local 155 assertFalse(listener.mStart); in testSetListener() 156 assertFalse(listener.mEnd); in testSetListener() 157 assertEquals(listener.mRepeat, 0); in testSetListener() 158 mAnimator.addListener(listener); in testSetListener() 163 assertTrue(listener.mStart); in testSetListener() 164 assertFalse(listener.mEnd); in testSetListener() 165 assertTrue(listener.mRepeat >= 0); in testSetListener() 169 assertTrue(listener.mCancel); in testSetListener() 173 assertTrue(listener.mEnd); in testSetListener() [all …]
|
/cts/tests/tests/location/src/android/location/cts/ |
D | LocationManagerTest.java | 384 final MockLocationListener listener = new MockLocationListener(); in doLocationUpdatesWithLocationListener() local 390 mManager.requestLocationUpdates(providerName, 0, 0, listener); in doLocationUpdatesWithLocationListener() 391 listener.setLocationRequested(); in doLocationUpdatesWithLocationListener() 397 assertTrue(listener.hasCalledLocationRequested(TEST_TIME_OUT)); in doLocationUpdatesWithLocationListener() 399 assertTrue(listener.hasCalledOnLocationChanged(TEST_TIME_OUT)); in doLocationUpdatesWithLocationListener() 400 Location location = listener.getLocation(); in doLocationUpdatesWithLocationListener() 407 listener.reset(); in doLocationUpdatesWithLocationListener() 408 assertFalse(listener.hasCalledOnLocationChanged(0)); in doLocationUpdatesWithLocationListener() 409 mManager.removeUpdates(listener); in doLocationUpdatesWithLocationListener() 411 assertFalse(listener.hasCalledOnLocationChanged(TEST_TIME_OUT)); in doLocationUpdatesWithLocationListener() [all …]
|
/cts/tests/camera/src/android/hardware/camera2/cts/ |
D | CaptureRequestTest.java | 241 SimpleCaptureCallback listener = new SimpleCaptureCallback(); in testBlackLevelLock() local 253 startPreview(requestBuilder, previewSz, listener); in testBlackLevelLock() 254 waitForSettingsApplied(listener, NUM_FRAMES_WAITED_FOR_UNKNOWN_LATENCY); in testBlackLevelLock() 256 verifyBlackLevelLockResults(listener, NUM_FRAMES_VERIFIED, /*maxLockOffCnt*/0); in testBlackLevelLock() 260 listener = new SimpleCaptureCallback(); in testBlackLevelLock() 261 startPreview(requestBuilder, previewSz, listener); in testBlackLevelLock() 262 waitForSettingsApplied(listener, NUM_FRAMES_WAITED_FOR_UNKNOWN_LATENCY); in testBlackLevelLock() 264 verifyBlackLevelLockResults(listener, NUM_FRAMES_VERIFIED, /*maxLockOffCnt*/1); in testBlackLevelLock() 330 SimpleCaptureCallback listener = new SimpleCaptureCallback(); in testLensShadingMap() local 346 listener = new SimpleCaptureCallback(); in testLensShadingMap() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/helpers/ |
D | TestSensorManager.java | 72 public void registerListener(TestSensorEventListener listener) { in registerListener() argument 78 mTestSensorEventListener = listener; in registerListener() 99 TestSensorEventListener listener, in registerListener() argument 107 CountDownLatch latch = listener.getLatchForSensorEvents(eventCount); in registerListener() 108 mTestSensorEventListener = listener; in registerListener() 139 TestSensorEventListener listener, in registerListener() argument 141 return registerListener(listener, eventCount, true); in registerListener()
|
/cts/tests/core/runner/src/com/android/cts/core/runner/support/ |
D | SingleTestNgTestExecutor.java | 53 SingleTestNGTestRunListener listener = new SingleTestNGTestRunListener(); in execute() local 59 TestNG testng = createTestNG(klass.getName(), methodName, listener); in execute() 62 if (listener.getNumTestStarted() <= 0) { in execute() 69 return new Result(testng.hasFailure(), listener.getFailures()); in execute() 73 SingleTestNGTestRunListener listener) { in createTestNG() argument 81 testng.addListener(listener); in createTestNG()
|
/cts/tests/tests/car/src/android/car/cts/ |
D | CarAppFocusManagerTest.java | 79 FocusChangedListerner listener = new FocusChangedListerner(); in testRegisterUnregister() local 81 mManager.addFocusListener(listener, 1); in testRegisterUnregister() 83 mManager.removeFocusListener(listener); in testRegisterUnregister() 231 FocusChangedListerner listener = new FocusChangedListerner(); in testFilter() local 234 mManager.addFocusListener(listener, CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION); in testFilter() 235 mManager.addFocusListener(listener, CarAppFocusManager.APP_FOCUS_TYPE_VOICE_COMMAND); in testFilter() 243 assertTrue(listener.waitForFocusChangedAndAssert(DEFAULT_WAIT_TIMEOUT_MS, in testFilter() 248 listener.reset(); in testFilter() 255 assertTrue(listener.waitForFocusChangedAndAssert(DEFAULT_WAIT_TIMEOUT_MS, in testFilter() 260 listener.reset(); in testFilter() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | AlertWindowsAppOpsTests.java | 86 final AppOpsManager.OnOpActiveChangedListener listener = mock( in testSystemAlertWindowAppOpsInitiallyAllowed() local 93 appOpsManager.startWatchingActive(new int[] {OP_SYSTEM_ALERT_WINDOW}, listener); in testSystemAlertWindowAppOpsInitiallyAllowed() 104 verify(listener, timeout(APP_OP_CHANGE_TIMEOUT_MILLIS) in testSystemAlertWindowAppOpsInitiallyAllowed() 114 reset(listener); in testSystemAlertWindowAppOpsInitiallyAllowed() 121 verify(listener, timeout(APP_OP_CHANGE_TIMEOUT_MILLIS) in testSystemAlertWindowAppOpsInitiallyAllowed() 130 reset(listener); in testSystemAlertWindowAppOpsInitiallyAllowed() 133 appOpsManager.stopWatchingActive(listener); in testSystemAlertWindowAppOpsInitiallyAllowed() 140 verify(listener, timeout(APP_OP_CHANGE_TIMEOUT_MILLIS).times(0)) in testSystemAlertWindowAppOpsInitiallyAllowed()
|
/cts/tests/tests/voiceinteraction/service/src/android/voiceinteraction/service/ |
D | MainRecognitionService.java | 36 protected void onStartListening(Intent recognizerIntent, Callback listener) { in onStartListening() argument 41 protected void onCancel(Callback listener) { in onCancel() argument 46 protected void onStopListening(Callback listener) { in onStopListening() argument
|