Home
last modified time | relevance | path

Searched refs:observer2 (Results 1 – 4 of 4) sorted by relevance

/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/power/stats/
H A DBatteryStatsTimeBaseTest.java86 BatteryStatsImpl.TimeBaseObs observer2 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning() local
91 tb.add(observer2); in testRunning()
94 Assert.assertTrue(tb.hasObserver(observer2)); in testRunning()
100 Assert.assertTrue(tb.hasObserver(observer2)); in testRunning()
125 Mockito.verify(observer2).onTimeStarted(14000, 100, 1000); in testRunning()
126 Mockito.verify(observer2, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning()
127 Mockito.verifyNoMoreInteractions(observer2); in testRunning()
130 Mockito.reset(observer2); in testRunning()
157 Mockito.verify(observer2).onTimeStopped(14002, 252, 1002); in testRunning()
158 Mockito.verify(observer2, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/am/
H A DUidObserverControllerTest.java160 final IUidObserver observer2 = mock(IUidObserver.Stub.class); in testDispatchUidsChanged() local
161 registerObserver(observer2, in testDispatchUidsChanged()
170 verify(observer2).onUidStateChanged(TEST_UID1, PROCESS_STATE_TOP, in testDispatchUidsChanged()
172 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged()
180 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged()
188 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged()
196 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged()
203 verify(observer2).onUidStateChanged(TEST_UID1, PROCESS_STATE_TOP, in testDispatchUidsChanged()
206 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged()
208 unregisterObserver(observer2); in testDispatchUidsChanged()
[all …]
/aosp14/frameworks/base/tests/PackageWatchdog/src/com/android/server/
H A DPackageWatchdogTest.java218 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testRegistration_multiObservers() local
252 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testUnregistration_multiObservers() local
256 watchdog.unregisterHealthObserver(observer2); in testUnregistration_multiObservers()
264 assertThat(observer2.mHealthCheckFailedPackages).isEmpty(); in testUnregistration_multiObservers()
286 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testExpiration_multiObservers() local
334 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testPersistence() local
344 watchdog2.registerHealthObserver(observer2); in testPersistence()
570 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2, in testPackageFailureNotifyOneSameImpact() local
584 assertThat(observer2.mMitigatedPackages).isEmpty(); in testPackageFailureNotifyOneSameImpact()
596 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2, in testExplicitHealthChecks() local
[all …]
/aosp14/frameworks/base/libs/hwui/tests/unit/
H A DFrameMetricsReporterTests.cpp198 auto observer2 = sp<TestFrameMetricsObserver>::make(hasPresentTime /*waitForPresentTime*/); in TEST() local
200 observer2->reportMetricsFrom(frameNumber + 10, surfaceControlId + 1); in TEST()
202 reporter->addObserver(observer2.get()); in TEST()
205 EXPECT_CALL(*observer2, notify).Times(0); in TEST()
209 EXPECT_CALL(*observer2, notify).Times(1); in TEST()