Home
last modified time | relevance | path

Searched refs:mCallback (Results 1 – 25 of 636) sorted by relevance

12345678910>>...26

/frameworks/libs/net/common/tests/unit/src/com/android/testutils/
DTestableNetworkCallbackTest.kt60 private lateinit var mCallback: TestableNetworkCallback in <lambda>() variable in com.android.testutils.TestableNetworkCallbackTest
68 mCallback = TestableNetworkCallback() in <lambda>()
76 assertNull(mCallback.lastAvailableNetwork) in <lambda>()
77 mCallback.onAvailable(net2097) in <lambda>()
78 assertEquals(mCallback.lastAvailableNetwork, net2097) in <lambda>()
82 mCallback.onCapabilitiesChanged(net2097, NetworkCapabilities()) in <lambda>()
83 mCallback.onLinkPropertiesChanged(net2097, LinkProperties()) in <lambda>()
84 assertEquals(mCallback.lastAvailableNetwork, net2097) in <lambda>()
87 mCallback.onLost(net2097) in <lambda>()
88 assertNull(mCallback.lastAvailableNetwork) in <lambda>()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuUidUserSysTimeReaderTest.java56 private VerifiableCallback mCallback; field in KernelCpuUidUserSysTimeReaderTest
82 mCallback = new VerifiableCallback(); in setUp()
102 mReader.readDelta(false, mCallback); in testThrottler()
103 assertEquals(6, mCallback.mData.size()); in testThrottler()
107 mCallback.clear(); in testThrottler()
108 mReader.readDelta(false, mCallback); in testThrottler()
109 assertEquals(0, mCallback.mData.size()); in testThrottler()
115 mCallback.clear(); in testThrottler()
116 mReader.readDelta(false, mCallback); in testThrottler()
117 assertEquals(6, mCallback.mData.size()); in testThrottler()
[all …]
DKernelCpuUidActiveTimeReaderTest.java59 private VerifiableCallback mCallback; field in KernelCpuUidActiveTimeReaderTest
87 mCallback = new VerifiableCallback(); in setUp()
100 mReader.readDelta(mCallback); in testReadDelta()
102 mCallback.verify(mUids[i], getActiveTime(times[i])); in testReadDelta()
104 mCallback.verifyNoMoreInteractions(); in testReadDelta()
107 mCallback.clear(); in testReadDelta()
110 mReader.readDelta(mCallback); in testReadDelta()
112 mCallback.verify(mUids[i], getActiveTime(newTimes1[i]) - getActiveTime(times[i])); in testReadDelta()
114 mCallback.verifyNoMoreInteractions(); in testReadDelta()
117 mCallback.clear(); in testReadDelta()
[all …]
DKernelCpuUidClusterTimeReaderTest.java60 private VerifiableCallback mCallback; field in KernelCpuUidClusterTimeReaderTest
90 mCallback = new VerifiableCallback(); in setUp()
103 mReader.readDelta(mCallback); in testReadDelta()
105 mCallback.verify(mUids[i], clusterTime(times1[i])); in testReadDelta()
107 mCallback.verifyNoMoreInteractions(); in testReadDelta()
110 mCallback.clear(); in testReadDelta()
113 mReader.readDelta(mCallback); in testReadDelta()
115 mCallback.verify(mUids[i], subtract(clusterTime(times2[i]), clusterTime(times1[i]))); in testReadDelta()
117 mCallback.verifyNoMoreInteractions(); in testReadDelta()
120 mCallback.clear(); in testReadDelta()
[all …]
DKernelCpuUidFreqTimeReaderTest.java64 private VerifiableCallback mCallback; field in KernelCpuUidFreqTimeReaderTest
93 mCallback = new VerifiableCallback(); in setUp()
165 mReader.readDelta(mCallback); in testReadDelta()
167 mCallback.verify(mUids[i], times[i]); in testReadDelta()
169 mCallback.verifyNoMoreInteractions(); in testReadDelta()
177 mCallback.clear(); in testReadDelta()
180 mReader.readDelta(mCallback); in testReadDelta()
182 mCallback.verify(mUids[i], subtract(newTimes1[i], times[i])); in testReadDelta()
184 mCallback.verifyNoMoreInteractions(); in testReadDelta()
187 mCallback.clear(); in testReadDelta()
[all …]
DStoragedUidIoStatsReaderTest.java58 private StoragedUidIoStatsReader.Callback mCallback; field in StoragedUidIoStatsReaderTest
85 mStoragedUidIoStatsReader.readAbsolute(mCallback); in testReadNonexistentFile()
86 verifyZeroInteractions(mCallback); in testReadNonexistentFile()
117 mStoragedUidIoStatsReader.readAbsolute(mCallback); in testReadExpected()
119 verify(mCallback).onUidStorageStats(uids[i], fg_chars_read[i], fg_chars_write[i], in testReadExpected()
123 verifyNoMoreInteractions(mCallback); in testReadExpected()
144 mStoragedUidIoStatsReader.readAbsolute(mCallback); in testLineDoesNotElevenEntries()
145 verify(mCallback).onUidStorageStats(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); in testLineDoesNotElevenEntries()
146 verifyNoMoreInteractions(mCallback); in testLineDoesNotElevenEntries()
168 mStoragedUidIoStatsReader.readAbsolute(mCallback); in testLineIsMalformed()
[all …]
/frameworks/base/telephony/java/android/telephony/data/
DDataServiceCallback.java72 private final IDataServiceCallback mCallback; field in DataServiceCallback
76 mCallback = callback; in DataServiceCallback()
88 if (mCallback != null) { in onSetupDataCallComplete()
91 mCallback.onSetupDataCallComplete(result, response); in onSetupDataCallComplete()
107 if (mCallback != null) { in onDeactivateDataCallComplete()
110 mCallback.onDeactivateDataCallComplete(result); in onDeactivateDataCallComplete()
126 if (mCallback != null) { in onSetInitialAttachApnComplete()
128 mCallback.onSetInitialAttachApnComplete(result); in onSetInitialAttachApnComplete()
144 if (mCallback != null) { in onSetDataProfileComplete()
146 mCallback.onSetDataProfileComplete(result); in onSetDataProfileComplete()
[all …]
/frameworks/opt/net/ims/tests/src/com/android/ims/rcs/uce/
DUceStatsWriterTest.java52 private Callback mCallback; field in UceStatsWriterTest
133 mCallback = new Callback(); in setUp()
134 mWrite = new TestableUceStatsWriter(mCallback); in setUp()
149 assertEquals(mSubId, mCallback.subId); in setImsRegistrationFeatureTagStats()
151 assertEquals(featureTags.get(index), mCallback.featureTagList.get(index)); in setImsRegistrationFeatureTagStats()
153 assertEquals(mRegistrationTech, mCallback.registrationTech); in setImsRegistrationFeatureTagStats()
165 assertEquals(mSubId, mCallback.subId); in setImsRegistrationServiceDescStats()
167 assertEquals(tupleList.get(index).getServiceId(), mCallback.serviceIdList.get(index)); in setImsRegistrationServiceDescStats()
168 assertEquals(tupleList.get(index).getServiceVersion(), mCallback.versions.get(index)); in setImsRegistrationServiceDescStats()
170 assertEquals(mRegistrationTech, mCallback.registrationTech); in setImsRegistrationServiceDescStats()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/resume/
DResumeMediaBrowser.java52 @Nullable private final Callback mCallback; field in ResumeMediaBrowser
77 mCallback = callback; in ResumeMediaBrowser()
109 if (mCallback != null) {
110 mCallback.onError();
118 if (mCallback != null) {
119 mCallback.addTrack(desc, mMediaBrowser.getServiceComponent(),
124 if (mCallback != null) {
125 mCallback.onError();
135 if (mCallback != null) {
136 mCallback.onError();
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DGroupHelperTest.java62 private @Mock GroupHelper.Callback mCallback; field in GroupHelperTest
71 mGroupHelper = new GroupHelper(AUTOGROUP_AT_COUNT, mCallback); in setUp()
185 verifyZeroInteractions(mCallback); in testNoGroup_postingUnderLimit()
198 verifyZeroInteractions(mCallback); in testNoGroup_multiPackage()
210 verifyZeroInteractions(mCallback); in testNoGroup_multiUser()
222 verifyZeroInteractions(mCallback); in testNoGroup_someAreGrouped()
232 verify(mCallback, times(1)).addAutoGroupSummary( in testAddSummary()
234 verify(mCallback, times(AUTOGROUP_AT_COUNT)).addAutoGroup(anyString()); in testAddSummary()
235 verify(mCallback, never()).removeAutoGroup(anyString()); in testAddSummary()
236 verify(mCallback, never()).removeAutoGroupSummary(anyInt(), anyString()); in testAddSummary()
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/
DTaskStackListenerImplTest.java58 private TaskStackListenerCallback mCallback; field in TaskStackListenerImplTest
70 mImpl.addListener(mCallback); in setUp()
80 impl.addListener(mCallback); in testAddRemoveMultipleListeners_ExpectRegisterUnregisterOnce()
85 impl.removeListener(mCallback); in testAddRemoveMultipleListeners_ExpectRegisterUnregisterOnce()
92 verify(mCallback).onRecentTaskListUpdated(); in testOnRecentTaskListUpdated()
99 verify(mCallback).onRecentTaskListFrozenChanged(eq(true)); in testOnRecentTaskListFrozenChanged()
106 verify(mCallback).onTaskStackChangedBackground(); in testOnTaskStackChanged()
107 verify(mCallback).onTaskStackChanged(); in testOnTaskStackChanged()
116 verify(mCallback).onTaskProfileLocked(eq(info), eq(0)); in testOnTaskProfileLocked()
123 verify(mCallback).onTaskDisplayChanged(eq(1), eq(2)); in testOnTaskDisplayChanged()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/model/
DSysUiStateTest.java45 private SysUiState.SysUiStateCallback mCallback; field in SysUiStateTest
52 mCallback = mock(SysUiState.SysUiStateCallback.class); in setup()
53 mFlagsContainer.addCallback(mCallback); in setup()
60 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addSingle_setFlag()
68 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addMultiple_setFlag()
69 verify(mCallback, times(1)) in addMultiple_setFlag()
80 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addMultipleRemoveOne_setFlag()
81 verify(mCallback, times(1)) in addMultipleRemoveOne_setFlag()
83 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_2); in addMultipleRemoveOne_setFlag()
91 verify(mCallback, times(1)).onSystemUiStateChanged(expected); in addMultiple_setFlags()
[all …]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DObservableServiceConnectionTest.java86 private ObservableServiceConnection.Callback<Foo> mCallback; field in ObservableServiceConnectionTest
109 mConnection.addCallback(mCallback); in testConnect()
110 mConnection.addCallback(mCallback); in testConnect()
116 verify(mCallback, never()).onConnected(any(), any()); in testConnect()
117 verify(mCallback, never()).onDisconnected(any(), anyInt()); in testConnect()
123 verify(mCallback, times(1)).onConnected(mConnection, mResult); in testConnect()
128 mConnection.addCallback(mCallback); in testDisconnectBeforeBind()
133 verify(mCallback, never()).onDisconnected(eq(mConnection), anyInt()); in testDisconnectBeforeBind()
138 mConnection.addCallback(mCallback); in testDisconnect()
144 verify(mCallback, never()).onDisconnected(eq(mConnection), anyInt()); in testDisconnect()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/dreams/
DDreamOverlayStatusBarItemsProviderTest.java43 DreamOverlayStatusBarItemsProvider.Callback mCallback; field in DreamOverlayStatusBarItemsProviderTest
60 mProvider.addCallback(mCallback); in addingCallbackCallsOnStatusBarItemsChanged()
61 verify(mCallback).onStatusBarItemsChanged(List.of(mStatusBarItem)); in addingCallbackCallsOnStatusBarItemsChanged()
66 mProvider.addCallback(mCallback); in addingStatusBarItemCallsOnStatusBarItemsChanged()
68 verify(mCallback).onStatusBarItemsChanged(List.of(mStatusBarItem)); in addingStatusBarItemCallsOnStatusBarItemsChanged()
73 mProvider.addCallback(mCallback); in addingDuplicateStatusBarItemDoesNotCallOnStatusBarItemsChanged()
77 verify(mCallback, times(1)) in addingDuplicateStatusBarItemDoesNotCallOnStatusBarItemsChanged()
83 mProvider.addCallback(mCallback); in removingStatusBarItemCallsOnStatusBarItemsChanged()
87 verify(mCallback, times(2)).onStatusBarItemsChanged(any()); in removingStatusBarItemCallsOnStatusBarItemsChanged()
92 mProvider.addCallback(mCallback); in removingNonexistentStatusBarItemDoesNotCallOnStatusBarItemsChanged()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/emergency/
DRadioOnStateListenerTest.java59 @Mock RadioOnStateListener.Callback mCallback; field in RadioOnStateListenerTest
88 mListener.waitForRadioOn(mMockPhone, mCallback, false, false, 0); in testRegisterForCallback()
109 mListener.waitForRadioOn(mMockPhone, mCallback, false, false, 0); in testRegisterForSatelliteCallback()
129 when(mCallback.isOkToCall(eq(mMockPhone), anyInt(), anyBoolean())).thenReturn(true); in testPhoneChangeState_OkToCallTrue()
130 mListener.waitForRadioOn(mMockPhone, mCallback, false, false, 0); in testPhoneChangeState_OkToCallTrue()
137 verify(mCallback).onComplete(eq(mListener), eq(true)); in testPhoneChangeState_OkToCallTrue()
152 when(mCallback.isOkToCall(eq(mMockPhone), anyInt(), anyBoolean())).thenReturn(true); in testSatelliteChangeState_OkToCallTrue()
153 mListener.waitForRadioOn(mMockPhone, mCallback, false, false, 0); in testSatelliteChangeState_OkToCallTrue()
160 verify(mCallback).onComplete(eq(mListener), eq(true)); in testSatelliteChangeState_OkToCallTrue()
173 when(mCallback.isOkToCall(eq(mMockPhone), anyInt(), anyBoolean())).thenReturn(false); in testPhoneChangeState_NoOkToCall_Timeout()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DChildHelper.java42 final Callback mCallback; field in ChildHelper
49 mCallback = callback; in ChildHelper()
61 mCallback.onEnteredHiddenState(child); in hideViewInternal()
71 mCallback.onLeftHiddenState(child); in unhideViewInternal()
99 offset = mCallback.getChildCount(); in addView()
107 mCallback.addView(child, offset); in addView()
117 final int limit = mCallback.getChildCount(); in getOffset()
140 int index = mCallback.indexOfChild(view); in removeView()
147 mCallback.removeViewAt(index); in removeView()
161 final View view = mCallback.getChildAt(offset); in removeViewAt()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/condition/
DConditionalCoreStartableTest.java55 private final Callback mCallback; field in ConditionalCoreStartableTest.FakeConditionalCoreStartable
60 mCallback = callback; in FakeConditionalCoreStartable()
65 mCallback = callback; in FakeConditionalCoreStartable()
70 mCallback.onStart(); in onStart()
75 mCallback.bootCompleted(); in bootCompleted()
89 FakeConditionalCoreStartable.Callback mCallback; field in ConditionalCoreStartableTest
109 mCallback); in testOnStartCallback()
122 verify(mCallback, never()).onStart(); in testOnStartCallback()
126 verify(mCallback).onStart(); in testOnStartCallback()
134 mCallback); in testOnStartCallbackWithNoConditions()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DScrollCaptureConnectionTest.java67 private final TestScrollCaptureCallback mCallback = new TestScrollCaptureCallback(); field in ScrollCaptureConnectionTest
93 mTarget = new ScrollCaptureTarget(mView, mLocalVisibleRect, mPositionInWindow, mCallback); in setUp()
104 mView, mLocalVisibleRect, mPositionInWindow, mCallback); in testConstruction()
128 mCallback.completeStartRequest(); in testStartCapture()
139 mCallback.completeStartRequest(); in testStartCapture_cancellation()
149 mCallback.completeStartRequest(); in testRequestImage()
152 mCallback.completeImageRequest(new Rect(1, 2, 3, 4)); in testRequestImage()
163 mCallback.completeStartRequest(); in testRequestImage_afterClose()
176 mCallback.completeStartRequest(); in testRequestImage_cancellation()
180 mCallback.completeImageRequest(new Rect(1, 2, 3, 4)); in testRequestImage_cancellation()
[all …]
/frameworks/base/services/credentials/java/com/android/server/credentials/
DRemoteCredentialService.java72 @Nullable private ProviderCallbacks mCallback; field in RemoteCredentialService
103 mCallback = callback; in setCallback()
124 if (mCallback != null) { in binderDied()
126 mCallback.onProviderServiceDied(this); in binderDied()
149 if (mCallback == null) { in onBeginGetCredential()
188 if (mCallback != null) { in onBeginGetCredential()
189 mCallback.onProviderCancellable(cancellation); in onBeginGetCredential()
212 if (mCallback == null) { in onBeginCreateCredential()
251 if (mCallback != null) { in onBeginCreateCredential()
252 mCallback.onProviderCancellable(cancellation); in onBeginCreateCredential()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/app/
DWindowDecorActionBarTest.java34 private MockActionModeCallback mCallback; field in WindowDecorActionBarTest
44 mCallback = new MockActionModeCallback(); in setUp()
49 ActionMode mode = mWindowDecorActionBar.startActionMode(mCallback); in testStartActionMode()
52 assertTrue(mCallback.mIsCreateActionModeCalled); in testStartActionMode()
57 mCallback.mShouldCreateActionMode = false; in testStartActionModeWhenCreateReturnsFalse()
59 ActionMode mode = mWindowDecorActionBar.startActionMode(mCallback); in testStartActionModeWhenCreateReturnsFalse()
62 assertTrue(mCallback.mIsCreateActionModeCalled); in testStartActionModeWhenCreateReturnsFalse()
67 ActionMode mode1 = mWindowDecorActionBar.startActionMode(mCallback); in testStartActionModeFinishesPreviousMode()
72 assertTrue(mCallback.mIsDestroyActionModeCalled); in testStartActionModeFinishesPreviousMode()
/frameworks/base/core/java/android/hardware/radio/
DTunerCallbackAdapter.java37 private final RadioTuner.Callback mCallback; field in TunerCallbackAdapter
57 mCallback = Objects.requireNonNull(callback, "Callback cannot be null"); in TunerCallbackAdapter()
138 mHandler.post(() -> mCallback.onError(status)); in onError()
143 mHandler.post(() -> mCallback.onTuneFailed(status, selector)); in onTuneFailed()
171 mHandler.post(() -> mCallback.onError(errorCode)); in onTuneFailed()
176 mHandler.post(() -> mCallback.onConfigurationChanged(config)); in onConfigurationChanged()
191 mCallback.onProgramInfoChanged(info); in onCurrentProgramInfoChanged()
194 if (metadata != null) mCallback.onMetadataChanged(metadata); in onCurrentProgramInfoChanged()
200 mHandler.post(() -> mCallback.onTrafficAnnouncement(active)); in onTrafficAnnouncement()
205 mHandler.post(() -> mCallback.onEmergencyAnnouncement(active)); in onEmergencyAnnouncement()
[all …]
/frameworks/base/core/java/android/service/voice/
DSoftwareHotwordDetector.java57 private final HotwordDetector.Callback mCallback; field in SoftwareHotwordDetector
70 mCallback = callback; in SoftwareHotwordDetector()
78 new InitializationStateListener(mExecutor, mCallback), in initialize()
84 mCallback.onFailure(new HotwordDetectionServiceFailure( in onDetectorRemoteException()
100 new BinderCallback(mExecutor, mCallback)); in startRecognition()
156 private final HotwordDetector.Callback mCallback; field in SoftwareHotwordDetector.BinderCallback
160 this.mCallback = callback; in BinderCallback()
171 mCallback.onDetected(new AlwaysOnHotwordDetector.EventPayload.Builder() in onDetected()
187 mCallback.onFailure(hotwordDetectionServiceFailure); in onHotwordDetectionServiceFailure()
189 mCallback.onUnknownFailure("Error data is null"); in onHotwordDetectionServiceFailure()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/data/
DCellularNetworkValidatorTest.java70 CellularNetworkValidator.ValidationCallback mCallback; field in CellularNetworkValidatorTest
75 mCallback = mock(CellularNetworkValidator.ValidationCallback.class); in setUp()
116 mValidatorUT.validate(subId, timeout, true, mCallback); in testValidateSuccess()
129 mValidatorUT.validate(subId, timeout, true, mCallback); in testValidateTimeout()
143 mValidatorUT.validate(subId, timeout, true, mCallback); in testValidateFailure()
154 mValidatorUT.validate(subId, timeout, true, mCallback); in testNetworkAvailableNotValidated()
182 mValidatorUT.validate(subId, timeout, true, mCallback); in testSkipRecentlyValidatedNetwork()
205 mValidatorUT.validate(subId, timeout, true, mCallback); in testDoNotSkipIfValidationFailed()
231 mValidatorUT.validate(subId, timeout, true, mCallback); in testDoNotSkipIfCacheExpires()
255 mValidatorUT.validate(1, timeout, true, mCallback); in testNetworkCachingOfMultipleSub()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/verify/domain/
DDomainVerificationEnforcer.java36 private Callback mCallback; field in DomainVerificationEnforcer
43 mCallback = callback; in setCallback()
144 if (!mCallback.doesUserExist(callingUserId)) { in assertApprovedUserStateQuerent()
146 } else if (!mCallback.doesUserExist(targetUserId)) { in assertApprovedUserStateQuerent()
150 return !mCallback.filterAppAccess(packageName, callingUid, targetUserId); in assertApprovedUserStateQuerent()
170 if (!mCallback.doesUserExist(callingUserId)) { in assertApprovedUserSelector()
172 } else if (!mCallback.doesUserExist(targetUserId)) { in assertApprovedUserSelector()
180 return !mCallback.filterAppAccess(packageName, callingUid, targetUserId); in assertApprovedUserSelector()
199 if (!mCallback.doesUserExist(callingUserId)) { in callerIsLegacyUserSelector()
201 } else if (!mCallback.doesUserExist(targetUserId)) { in callerIsLegacyUserSelector()
[all …]
/frameworks/base/telephony/java/android/telephony/ims/
DImsVideoCallProvider.java54 private IImsVideoCallCallback mCallback; field in ImsVideoCallProvider
64 mCallback = (IImsVideoCallCallback) msg.obj;
233 if (mCallback != null) { in receiveSessionModifyRequest()
235 mCallback.receiveSessionModifyRequest(VideoProfile); in receiveSessionModifyRequest()
244 if (mCallback != null) { in receiveSessionModifyResponse()
246 mCallback.receiveSessionModifyResponse(status, requestedProfile, responseProfile); in receiveSessionModifyResponse()
254 if (mCallback != null) { in handleCallSessionEvent()
256 mCallback.handleCallSessionEvent(event); in handleCallSessionEvent()
264 if (mCallback != null) { in changePeerDimensions()
266 mCallback.changePeerDimensions(width, height); in changePeerDimensions()
[all …]

12345678910>>...26