Home
last modified time | relevance | path

Searched refs:listener (Results 1 – 25 of 69) sorted by relevance

123

/cts/tests/tests/view/src/android/view/cts/
DViewTreeObserverTest.java76 final MockOnGlobalFocusChangeListener listener = new MockOnGlobalFocusChangeListener(); in testAddOnGlobalFocusChangeListener() local
77 mViewTreeObserver.addOnGlobalFocusChangeListener(listener); in testAddOnGlobalFocusChangeListener()
78 assertFalse(listener.hasCalledOnGlobalFocusChanged()); in testAddOnGlobalFocusChangeListener()
90 return listener.hasCalledOnGlobalFocusChanged(); in testAddOnGlobalFocusChangeListener()
100 MockOnGlobalLayoutListener listener = new MockOnGlobalLayoutListener(); in testAddOnGlobalLayoutListener() local
101 assertFalse(listener.hasCalledOnGlobalLayout()); in testAddOnGlobalLayoutListener()
102 mViewTreeObserver.addOnGlobalLayoutListener(listener); in testAddOnGlobalLayoutListener()
104 assertTrue(listener.hasCalledOnGlobalLayout()); in testAddOnGlobalLayoutListener()
111 MockOnPreDrawListener listener = new MockOnPreDrawListener(); in testAddOnPreDrawListener() local
112 assertFalse(listener.hasCalledOnPreDraw()); in testAddOnPreDrawListener()
[all …]
DOrientationListenerTest.java45 MockOrientationListener listener = new MockOrientationListener(mContext); in testRegisterationOfOrientationListener() local
46 listener.disable(); in testRegisterationOfOrientationListener()
47 listener.enable(); in testRegisterationOfOrientationListener()
61 MockOrientationListener listener = new MockOrientationListener(mContext); in testOnSensorChanged() local
72 listener.reset(); in testOnSensorChanged()
78 MockOrientationListener listener = new MockOrientationListener(mContext); in testOnOrientationChanged() local
79 listener.enable(); in testOnOrientationChanged()
DViewStubTest.java79 MockOnInflateListener listener = new MockOnInflateListener(); in testSetVisibility() local
80 viewStub1.setOnInflateListener(listener); in testSetVisibility()
81 assertFalse(listener.hasCalledOnInflate()); in testSetVisibility()
88 assertFalse(listener.hasCalledOnInflate()); in testSetVisibility()
95 assertTrue(listener.hasCalledOnInflate()); in testSetVisibility()
138 final MockOnInflateListener listener = new MockOnInflateListener(); in testSetOnInflateListener() local
140 viewStub.setOnInflateListener(listener); in testSetOnInflateListener()
141 assertFalse(listener.hasCalledOnInflate()); in testSetOnInflateListener()
143 assertTrue(listener.hasCalledOnInflate()); in testSetOnInflateListener()
173 final MockOnInflateListener listener = new MockOnInflateListener(); in testInflate() local
[all …]
DOrientationEventListenerTest.java37 MockOrientationEventListener listener = new MockOrientationEventListener(mContext); in testEnableAndDisable() local
38 listener.enable(); in testEnableAndDisable()
39 listener.disable(); in testEnableAndDisable()
47 MockOrientationEventListener listener = new MockOrientationEventListener(mContext); in testCanDetectOrientation() local
48 assertEquals(hasSensor, listener.canDetectOrientation()); in testCanDetectOrientation()
/cts/tests/tests/widget/src/android/widget/cts/
DRadioGroupTest.java77 MockOnHierarchyChangeListener listener = new MockOnHierarchyChangeListener(); in testSetOnHierarchyChangeListener() local
78 mDefaultRadioGroup.setOnHierarchyChangeListener(listener); in testSetOnHierarchyChangeListener()
81 listener.reset(); in testSetOnHierarchyChangeListener()
83 assertSame(mDefaultRadioGroup, listener.getOnChildViewRemovedParentParam()); in testSetOnHierarchyChangeListener()
84 assertSame(button3, listener.getOnChildViewRemovedChildParam()); in testSetOnHierarchyChangeListener()
86 listener.reset(); in testSetOnHierarchyChangeListener()
88 assertSame(mDefaultRadioGroup, listener.getOnChildViewAddedParentParam()); in testSetOnHierarchyChangeListener()
89 assertSame(button3, listener.getOnChildViewAddedChildParam()); in testSetOnHierarchyChangeListener()
117 MockOnCheckedChangeListener listener = new MockOnCheckedChangeListener(); in testInternalCheckedStateTracker() local
118 mDefaultRadioGroup.setOnCheckedChangeListener(listener); in testInternalCheckedStateTracker()
[all …]
DTimePickerTest.java103 MockOnTimeChangeListener listener = new MockOnTimeChangeListener(); in testSetOnTimeChangedListener() local
104 mTimePicker.setOnTimeChangedListener(listener); in testSetOnTimeChangedListener()
107 assertEquals(initialHour, listener.getNotifiedHourOfDay()); in testSetOnTimeChangedListener()
108 assertEquals(initialMinute, listener.getNotifiedMinute()); in testSetOnTimeChangedListener()
111 listener.reset(); in testSetOnTimeChangedListener()
113 assertFalse(listener.hasCalledOnTimeChanged()); in testSetOnTimeChangedListener()
116 assertTrue(listener.hasCalledOnTimeChanged()); in testSetOnTimeChangedListener()
117 assertEquals(initialHour + 1, listener.getNotifiedHourOfDay()); in testSetOnTimeChangedListener()
118 assertEquals(initialMinute, listener.getNotifiedMinute()); in testSetOnTimeChangedListener()
119 assertSame(mTimePicker, listener.getNotifiedView()); in testSetOnTimeChangedListener()
[all …]
DSeekBarTest.java61 MockOnSeekBarListener listener = new MockOnSeekBarListener(); in testSetOnSeekBarChangeListener() local
63 mSeekBar.setOnSeekBarChangeListener(listener); in testSetOnSeekBarChangeListener()
64 listener.reset(); in testSetOnSeekBarChangeListener()
73 assertTrue(listener.hasCalledOnStartTrackingTouch()); in testSetOnSeekBarChangeListener()
75 assertTrue(listener.hasCalledOnProgressChanged()); in testSetOnSeekBarChangeListener()
77 listener.reset(); in testSetOnSeekBarChangeListener()
84 assertTrue(listener.hasCalledOnProgressChanged()); in testSetOnSeekBarChangeListener()
86 listener.reset(); in testSetOnSeekBarChangeListener()
93 assertTrue(listener.hasCalledOnStopTrackingTouch()); in testSetOnSeekBarChangeListener()
DSlidingDrawerTest.java256 MockOnDrawerOpenListener listener = new MockOnDrawerOpenListener(); in testSetOnDrawerOpenListener() local
257 drawer.setOnDrawerOpenListener(listener); in testSetOnDrawerOpenListener()
259 assertFalse(listener.hadOpenedDrawer()); in testSetOnDrawerOpenListener()
262 assertTrue(listener.hadOpenedDrawer()); in testSetOnDrawerOpenListener()
268 MockOnDrawerCloseListener listener = new MockOnDrawerCloseListener(); in testSetOnDrawerCloseListener() local
269 drawer.setOnDrawerCloseListener(listener); in testSetOnDrawerCloseListener()
271 assertFalse(listener.hadClosedDrawer()); in testSetOnDrawerCloseListener()
274 assertFalse(listener.hadClosedDrawer()); in testSetOnDrawerCloseListener()
277 assertTrue(listener.hadClosedDrawer()); in testSetOnDrawerCloseListener()
282 MockOnDrawerScrollListener listener = new MockOnDrawerScrollListener(); in testSetOnDrawerScrollListener() local
[all …]
DCompoundButtonTest.java84 MockOnCheckedChangeListener listener = new MockOnCheckedChangeListener(); in testAccessChecked() local
85 compoundButton.setOnCheckedChangeListener(listener); in testAccessChecked()
87 assertFalse(listener.hasCalledCheckedChange()); in testAccessChecked()
91 assertTrue(listener.hasCalledCheckedChange()); in testAccessChecked()
92 assertSame(compoundButton, listener.getInputCompoundButton()); in testAccessChecked()
93 assertTrue(listener.getInputChecked()); in testAccessChecked()
95 listener.reset(); in testAccessChecked()
98 assertFalse(listener.hasCalledCheckedChange()); in testAccessChecked()
102 assertTrue(listener.hasCalledCheckedChange()); in testAccessChecked()
103 assertSame(compoundButton, listener.getInputCompoundButton()); in testAccessChecked()
[all …]
DChronometerTest.java135 final MockOnChronometerTickListener listener = new MockOnChronometerTickListener(); in testAccessOnChronometerTickListener() local
139 chronometer.setOnChronometerTickListener(listener); in testAccessOnChronometerTickListener()
144 assertEquals(listener, chronometer.getOnChronometerTickListener()); in testAccessOnChronometerTickListener()
145 assertTrue(listener.hasCalledOnChronometerTick()); in testAccessOnChronometerTickListener()
146 listener.reset(); in testAccessOnChronometerTickListener()
148 assertTrue(listener.hasCalledOnChronometerTick()); in testAccessOnChronometerTickListener()
DRatingBarTest.java66 MockOnRatingBarChangeListener listener = new MockOnRatingBarChangeListener(); in testAccessOnRatingBarChangeListener() local
70 ratingBar.setOnRatingBarChangeListener(listener); in testAccessOnRatingBarChangeListener()
71 assertSame(listener, ratingBar.getOnRatingBarChangeListener()); in testAccessOnRatingBarChangeListener()
73 assertTrue(listener.hasCalledOnRatingChanged()); in testAccessOnRatingBarChangeListener()
76 listener.reset(); in testAccessOnRatingBarChangeListener()
80 assertFalse(listener.hasCalledOnRatingChanged()); in testAccessOnRatingBarChangeListener()
DZoomButtonTest.java108 final MockOnClickListener listener = new MockOnClickListener(); in testOnLongClick() local
109 mZoomButton.setOnClickListener(listener); in testOnLongClick()
114 assertFalse(listener.hasOnClickCalled()); in testOnLongClick()
119 return listener.hasOnClickCalled(); in testOnLongClick()
DExpandableListViewTest.java121 MockOnItemClickListener listener = new MockOnItemClickListener(); in testSetOnItemClickListener() local
124 expandableListView.setOnItemClickListener(listener); in testSetOnItemClickListener()
125 assertSame(listener, expandableListView.getOnItemClickListener()); in testSetOnItemClickListener()
191 MockOnGroupClickListener listener = new MockOnGroupClickListener(); in testSetOnGroupClickListener() local
193 expandableListView.setOnGroupClickListener(listener); in testSetOnGroupClickListener()
194 assertFalse(listener.hasCalledOnGroupClick()); in testSetOnGroupClickListener()
196 assertTrue(listener.hasCalledOnGroupClick()); in testSetOnGroupClickListener()
202 MockOnChildClickListener listener = new MockOnChildClickListener(); in testSetOnChildClickListener() local
204 expandableListView.setOnChildClickListener(listener); in testSetOnChildClickListener()
205 assertFalse(listener.hasCalledOnChildClick()); in testSetOnChildClickListener()
[all …]
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DSurfaceTextureGLSurfaceView.java32 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/apps/CtsVerifier/src/com/android/cts/verifier/p2p/testcase/
DGoTestCase.java46 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/tools/tradefed-host/tests/src/com/android/cts/tradefed/testtype/
DJarHostTestTest.java76 ITestInvocationListener listener = EasyMock.createMock(ITestInvocationListener.class); in testRun() local
81 listener.testRunStarted(RUN_NAME, 1); in testRun()
82 listener.testStarted(expectedTest); in testRun()
83 listener.testEnded(expectedTest, Collections.EMPTY_MAP); in testRun()
84 listener.testRunEnded(EasyMock.anyLong(), EasyMock.eq(Collections.EMPTY_MAP)); in testRun()
90 EasyMock.replay(listener); in testRun()
91 mJarTest.run(listener); in testRun()
92 EasyMock.verify(listener); in testRun()
/cts/tests/tests/animation/src/android/animation/cts/
DAnimatorTest.java125 MyListener listener = new MyListener(); in testSetListener() local
126 assertFalse(listener.mStart); in testSetListener()
127 assertFalse(listener.mEnd); in testSetListener()
128 assertEquals(listener.mRepeat, 0); in testSetListener()
129 mAnimator.addListener(listener); in testSetListener()
134 assertTrue(listener.mStart); in testSetListener()
135 assertFalse(listener.mEnd); in testSetListener()
136 assertTrue(listener.mRepeat >= 0); in testSetListener()
139 assertTrue(listener.mCancel); in testSetListener()
142 assertTrue(listener.mEnd); in testSetListener()
[all …]
DLayoutAnimationTest.java58 MyTransitionListener listener = new MyTransitionListener(); in testAddTransitionListener() local
60 mLayoutTransition.addTransitionListener(listener); in testAddTransitionListener()
65 assertEquals(listener, actualListener); in testAddTransitionListener()
124 MyTransitionListener listener = new MyTransitionListener(); in testAnimationWithAnimator() local
125 mLayoutTransition.addTransitionListener(listener); in testAnimationWithAnimator()
142 while(listener.mTransition) { in testAnimationWithAnimator()
241 public void removeTransitionListener(TransitionListener listener) { in removeTransitionListener() argument
242 super.removeTransitionListener(listener); in removeTransitionListener()
/cts/tools/tradefed-host/src/com/android/cts/tradefed/testtype/
DGeeTestResultParser.java219 public GeeTestResultParser(String testRunName, ITestRunListener listener) { in GeeTestResultParser() argument
222 mTestListeners.add(listener); in GeeTestResultParser()
357 for (ITestRunListener listener : mTestListeners) { in reportTestRunStarted()
358 listener.testRunStarted(mTestRunName, mNumTestsExpected); in reportTestRunStarted()
368 for (ITestRunListener listener : mTestListeners) { in reportTestRunEnded()
369 listener.testRunEnded(mTotalRunTime, getRunMetrics()); in reportTestRunEnded()
490 for (ITestRunListener listener : mTestListeners) { in processTestStartedTag()
491 listener.testStarted(testId); in processTestStartedTag()
550 for (ITestRunListener listener : mTestListeners) { in doTestEnded()
551 listener.testFailed(ITestRunListener.TestFailure.ERROR, testId, in doTestEnded()
[all …]
DCtsTest.java194 public FailedTestBugreportGenerator(ITestInvocationListener listener, ITestDevice device) { in FailedTestBugreportGenerator() argument
195 super(listener); in FailedTestBugreportGenerator()
326 public void run(ITestInvocationListener listener) throws DeviceNotAvailableException { in run() argument
336 FailedTestBugreportGenerator bugListener = new FailedTestBugreportGenerator(listener, in run()
338 listener = bugListener; in run()
345 ResultFilter filter = new ResultFilter(listener, mRemainingTestPkgs); in run()
352 collectDeviceInfo(getDevice(), mCtsBuild, listener); in run() local
370 forwardPackageDetails(knownTests.getPackageDef(), listener); in run() local
384 listener.testLog("screenshot", LogDataType.PNG, screenshotSource); in run()
673 ITestInvocationListener listener) throws DeviceNotAvailableException { in collectDeviceInfo() argument
[all …]
DGeeTest.java58 public void run(ITestInvocationListener listener) throws DeviceNotAvailableException { in run() argument
60 runTest(listener); in run()
101 void runTest(ITestRunListener listener) throws DeviceNotAvailableException { in runTest() argument
102 GeeTestResultParser resultParser = new GeeTestResultParser(mPackageName, listener); in runTest()
/cts/tests/tests/location/src/android/location/cts/
DLocationManagerTest.java305 final MockLocationListener listener = new MockLocationListener(); in doLocationUpdatesWithLocationListener() local
311 mManager.requestLocationUpdates(providerName, 0, 0, listener); in doLocationUpdatesWithLocationListener()
312 listener.setLocationRequested(); in doLocationUpdatesWithLocationListener()
318 assertTrue(listener.hasCalledLocationRequested(TEST_TIME_OUT)); in doLocationUpdatesWithLocationListener()
320 assertTrue(listener.hasCalledOnLocationChanged(TEST_TIME_OUT)); in doLocationUpdatesWithLocationListener()
321 Location location = listener.getLocation(); in doLocationUpdatesWithLocationListener()
327 listener.reset(); in doLocationUpdatesWithLocationListener()
328 assertFalse(listener.hasCalledOnLocationChanged(0)); in doLocationUpdatesWithLocationListener()
329 mManager.removeUpdates(listener); in doLocationUpdatesWithLocationListener()
331 assertFalse(listener.hasCalledOnLocationChanged(TEST_TIME_OUT)); in doLocationUpdatesWithLocationListener()
[all …]
/cts/tests/src/android/content/cts/
DClipboardManagerListenerActivity.java38 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/view/src/android/view/animation/cts/
DAnimationTest.java553 MockAnimationListener listener = new MockAnimationListener();
554 anim.setAnimationListener(listener);
555 assertFalse(listener.hasAnimationStarted());
556 assertFalse(listener.hasAnimationEnded());
557 assertFalse(listener.hasAnimationRepeated());
560 assertTrue(listener.hasAnimationStarted());
561 assertTrue(listener.hasAnimationEnded());
562 assertFalse(listener.hasAnimationRepeated());
564 listener.reset();
569 assertTrue(listener.hasAnimationStarted());
[all …]
/cts/tests/tests/openglperf/src/android/openglperf/cts/
DPlanetsSurfaceView.java27 RenderCompletionListener listener) { in PlanetsSurfaceView() argument
31 setRenderer(new PlanetsRenderer(context, param, listener, mWatchDog)); in PlanetsSurfaceView()

123