/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | KernelCpuUidUserSysTimeReaderTest.java | 63 private VerifiableCallback mCallback; field in KernelCpuUidUserSysTimeReaderTest 89 mCallback = new VerifiableCallback(); in setUp() 109 mReader.readDelta(false, mCallback); in testThrottler() 110 assertEquals(6, mCallback.mData.size()); in testThrottler() 114 mCallback.clear(); in testThrottler() 115 mReader.readDelta(false, mCallback); in testThrottler() 116 assertEquals(0, mCallback.mData.size()); in testThrottler() 122 mCallback.clear(); in testThrottler() 123 mReader.readDelta(false, mCallback); in testThrottler() 124 assertEquals(6, mCallback.mData.size()); in testThrottler() [all …]
|
D | KernelCpuUidActiveTimeReaderTest.java | 66 private VerifiableCallback mCallback; field in KernelCpuUidActiveTimeReaderTest 94 mCallback = new VerifiableCallback(); in setUp() 107 mReader.readDelta(mCallback); in testReadDelta() 109 mCallback.verify(mUids[i], getActiveTime(times[i])); in testReadDelta() 111 mCallback.verifyNoMoreInteractions(); in testReadDelta() 114 mCallback.clear(); in testReadDelta() 117 mReader.readDelta(mCallback); in testReadDelta() 119 mCallback.verify(mUids[i], getActiveTime(newTimes1[i]) - getActiveTime(times[i])); in testReadDelta() 121 mCallback.verifyNoMoreInteractions(); in testReadDelta() 124 mCallback.clear(); in testReadDelta() [all …]
|
D | KernelCpuUidClusterTimeReaderTest.java | 67 private VerifiableCallback mCallback; field in KernelCpuUidClusterTimeReaderTest 97 mCallback = new VerifiableCallback(); in setUp() 110 mReader.readDelta(mCallback); in testReadDelta() 112 mCallback.verify(mUids[i], clusterTime(times1[i])); in testReadDelta() 114 mCallback.verifyNoMoreInteractions(); in testReadDelta() 117 mCallback.clear(); in testReadDelta() 120 mReader.readDelta(mCallback); in testReadDelta() 122 mCallback.verify(mUids[i], subtract(clusterTime(times2[i]), clusterTime(times1[i]))); in testReadDelta() 124 mCallback.verifyNoMoreInteractions(); in testReadDelta() 127 mCallback.clear(); in testReadDelta() [all …]
|
D | KernelCpuUidFreqTimeReaderTest.java | 70 private VerifiableCallback mCallback; field in KernelCpuUidFreqTimeReaderTest 99 mCallback = new VerifiableCallback(); in setUp() 114 mReader.readDelta(mCallback); in testReadDelta() 116 mCallback.verify(mUids[i], times[i]); in testReadDelta() 118 mCallback.verifyNoMoreInteractions(); in testReadDelta() 124 mCallback.clear(); in testReadDelta() 127 mReader.readDelta(mCallback); in testReadDelta() 129 mCallback.verify(mUids[i], subtract(newTimes1[i], times[i])); in testReadDelta() 131 mCallback.verifyNoMoreInteractions(); in testReadDelta() 134 mCallback.clear(); in testReadDelta() [all …]
|
/frameworks/base/telephony/java/android/telephony/data/ |
D | DataServiceCallback.java | 72 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/ |
D | UceStatsWriterTest.java | 52 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/domain/resume/ |
D | ResumeMediaBrowser.java | 52 @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/ |
D | GroupHelperTest.java | 94 private @Mock GroupHelper.Callback mCallback; field in GroupHelperTest 116 mCallback); in setUp() 248 verifyZeroInteractions(mCallback); in testNoGroup_postingUnderLimit() 261 verifyZeroInteractions(mCallback); in testNoGroup_multiPackage() 273 verifyZeroInteractions(mCallback); in testNoGroup_multiUser() 285 verifyZeroInteractions(mCallback); in testNoGroup_someAreGrouped() 296 verify(mCallback, times(1)).addAutoGroupSummary( in testAddSummary_alwaysAutogroup() 298 verify(mCallback, times(AUTOGROUP_AT_COUNT)).addAutoGroup(anyString(), anyBoolean()); in testAddSummary_alwaysAutogroup() 299 verify(mCallback, never()).removeAutoGroup(anyString()); in testAddSummary_alwaysAutogroup() 300 verify(mCallback, never()).removeAutoGroupSummary(anyInt(), anyString()); in testAddSummary_alwaysAutogroup() [all …]
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/ |
D | TaskStackListenerImplTest.java | 58 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/ |
D | SysUiStateTest.java | 47 private SysUiState.SysUiStateCallback mCallback; field in SysUiStateTest 55 mCallback = mock(SysUiState.SysUiStateCallback.class); in setup() 56 mFlagsContainer.addCallback(mCallback); in setup() 63 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addSingle_setFlag() 71 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addMultiple_setFlag() 72 verify(mCallback, times(1)) in addMultiple_setFlag() 83 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addMultipleRemoveOne_setFlag() 84 verify(mCallback, times(1)) in addMultipleRemoveOne_setFlag() 86 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_2); in addMultipleRemoveOne_setFlag() 94 verify(mCallback, times(1)).onSystemUiStateChanged(expected); in addMultiple_setFlags() [all …]
|
/frameworks/base/services/core/java/com/android/server/inputmethod/ |
D | IInputMethodManagerImpl.java | 208 private final Callback mCallback; field in IInputMethodManagerImpl 211 mCallback = callback; in IInputMethodManagerImpl() 221 mCallback.addClient(client, inputmethod, untrustedDisplayId); in addClient() 226 return mCallback.getCurrentInputMethodInfoAsUser(userId); in getCurrentInputMethodInfoAsUser() 233 return mCallback.getInputMethodList(userId, directBootAwareness); in getInputMethodList() 239 return mCallback.getEnabledInputMethodList(userId); in getEnabledInputMethodList() 246 return mCallback.getInputMethodListLegacy(userId, directBootAwareness); in getInputMethodListLegacy() 252 return mCallback.getEnabledInputMethodListLegacy(userId); in getEnabledInputMethodListLegacy() 258 return mCallback.getEnabledInputMethodSubtypeList(imiId, allowsImplicitlyEnabledSubtypes, in getEnabledInputMethodSubtypeList() 264 return mCallback.getLastInputMethodSubtype(userId); in getLastInputMethodSubtype() [all …]
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | ObservableServiceConnectionTest.java | 96 private ObservableServiceConnection.Callback<Foo> mCallback; field in ObservableServiceConnectionTest 119 mConnection.addCallback(mCallback); in testConnect() 120 mConnection.addCallback(mCallback); in testConnect() 126 verify(mCallback, never()).onConnected(any(), any()); in testConnect() 127 verify(mCallback, never()).onDisconnected(any(), anyInt()); in testConnect() 133 verify(mCallback, times(1)).onConnected(mConnection, mResult); in testConnect() 138 mConnection.addCallback(mCallback); in testDisconnectBeforeBind() 143 verify(mCallback, never()).onDisconnected(eq(mConnection), anyInt()); in testDisconnectBeforeBind() 148 mConnection.addCallback(mCallback); in testDisconnect() 154 verify(mCallback, never()).onDisconnected(eq(mConnection), anyInt()); in testDisconnect() [all …]
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/ |
D | DreamOverlayStatusBarItemsProviderTest.java | 43 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/base/core/java/com/android/internal/widget/ |
D | ChildHelper.java | 42 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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/emergency/ |
D | RadioOnStateListenerTest.java | 59 @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/tests/UsbTests/src/com/android/server/usb/ |
D | UsbServiceTest.java | 64 private IUsbOperationInternal mCallback; field in UsbServiceTest 85 eq(mCallback), any())).thenReturn(true); in setUp() 93 TEST_TRANSACTION_ID, mCallback, uid)); in assertToggleUsbSuccessfully() 96 enable, TEST_TRANSACTION_ID, mCallback, null); in assertToggleUsbSuccessfully() 97 verifyZeroInteractions(mCallback); in assertToggleUsbSuccessfully() 100 clearInvocations(mCallback); in assertToggleUsbSuccessfully() 105 TEST_TRANSACTION_ID, mCallback, uid)); in assertToggleUsbFailed() 108 verify(mCallback).onOperationComplete(USB_OPERATION_ERROR_INTERNAL); in assertToggleUsbFailed() 111 clearInvocations(mCallback); in assertToggleUsbFailed() 159 mCallback, TEST_SECOND_CALLER_ID); in enableUsbWhileDockedWhenThereAreOtherStakers_failsToEnable() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | ScrollCaptureConnectionTest.java | 67 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/ |
D | RemoteCredentialService.java | 73 @Nullable private ProviderCallbacks mCallback; field in RemoteCredentialService 104 mCallback = callback; in setCallback() 125 if (mCallback != null) { in binderDied() 127 mCallback.onProviderServiceDied(this); in binderDied() 150 if (mCallback == null) { in onBeginGetCredential() 189 if (mCallback != null) { in onBeginGetCredential() 190 mCallback.onProviderCancellable(cancellation); in onBeginGetCredential() 213 if (mCallback == null) { in onBeginCreateCredential() 252 if (mCallback != null) { in onBeginCreateCredential() 253 mCallback.onProviderCancellable(cancellation); in onBeginCreateCredential() [all …]
|
/frameworks/base/core/java/android/hardware/radio/ |
D | TunerCallbackAdapter.java | 37 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/packages/SystemUI/tests/src/com/android/systemui/util/condition/ |
D | ConditionalCoreStartableTest.java | 54 private final Callback mCallback; field in ConditionalCoreStartableTest.FakeConditionalCoreStartable 59 mCallback = callback; in FakeConditionalCoreStartable() 64 mCallback = callback; in FakeConditionalCoreStartable() 69 mCallback.onStart(); in onStart() 74 mCallback.bootCompleted(); in bootCompleted() 88 FakeConditionalCoreStartable.Callback mCallback; field in ConditionalCoreStartableTest 108 mCallback); in testOnStartCallback() 121 verify(mCallback, never()).onStart(); in testOnStartCallback() 125 verify(mCallback).onStart(); in testOnStartCallback() 133 mCallback); in testOnStartCallbackWithNoConditions() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/app/ |
D | WindowDecorActionBarTest.java | 34 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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/data/ |
D | CellularNetworkValidatorTest.java | 71 CellularNetworkValidator.ValidationCallback mCallback; field in CellularNetworkValidatorTest 76 mCallback = mock(CellularNetworkValidator.ValidationCallback.class); in setUp() 117 mValidatorUT.validate(subId, timeout, true, mCallback); in testValidateSuccess() 130 mValidatorUT.validate(subId, timeout, true, mCallback); in testValidateTimeout() 144 mValidatorUT.validate(subId, timeout, true, mCallback); in testValidateFailure() 155 mValidatorUT.validate(subId, timeout, true, mCallback); in testNetworkAvailableNotValidated() 183 mValidatorUT.validate(subId, timeout, true, mCallback); in testSkipRecentlyValidatedNetwork() 206 mValidatorUT.validate(subId, timeout, true, mCallback); in testDoNotSkipIfValidationFailed() 232 mValidatorUT.validate(subId, timeout, true, mCallback); in testDoNotSkipIfCacheExpires() 256 mValidatorUT.validate(1, timeout, true, mCallback); in testNetworkCachingOfMultipleSub() [all …]
|
/frameworks/base/core/java/android/credentials/ |
D | CredentialManager.java | 641 PrepareGetCredentialResponse, GetCredentialException> mCallback; field in CredentialManager.PrepareGetCredentialTransport 649 mCallback = callback; in PrepareGetCredentialTransport() 657 mExecutor.execute(() -> mCallback.onResult( in onResponse() 669 () -> mCallback.onError(new GetCredentialException(errorType, message))); in onError() 680 mCallback = null; field in CredentialManager.GetCredentialTransportPendingUseCase 686 if (mCallback == null) { in setCallback() 687 mCallback = callback; in setCallback() 695 if (mCallback != null) { in onPendingIntent() 696 mCallback.onPendingIntent(pendingIntent); in onPendingIntent() 704 if (mCallback != null) { in onResponse() [all …]
|
/frameworks/base/core/java/android/service/voice/ |
D | SoftwareHotwordDetector.java | 57 private final HotwordDetector.Callback mCallback; field in SoftwareHotwordDetector 72 mCallback = callback; in SoftwareHotwordDetector() 81 new InitializationStateListener(mExecutor, mCallback), in initialize() 87 mCallback.onFailure(new HotwordDetectionServiceFailure( in onDetectorRemoteException() 103 new BinderCallback(mExecutor, mCallback)); in startRecognition() 159 private final HotwordDetector.Callback mCallback; field in SoftwareHotwordDetector.BinderCallback 163 this.mCallback = callback; in BinderCallback() 174 mCallback.onDetected(new AlwaysOnHotwordDetector.EventPayload.Builder() in onDetected() 190 mCallback.onFailure(hotwordDetectionServiceFailure); in onHotwordDetectionServiceFailure() 192 mCallback.onUnknownFailure("Error data is null"); in onHotwordDetectionServiceFailure() [all …]
|
/frameworks/base/telephony/java/android/telephony/ims/ |
D | ImsVideoCallProvider.java | 54 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 …]
|