/frameworks/base/core/tests/coretests/src/android/os/ |
D | IdleHandlerTest.java | 28 Handler mHandler; field in IdleHandlerTest.BaseTestHandler 34 mHandler = new Handler() { in go() 65 mHandler.sendMessageDelayed(mHandler.obtainMessage(0), 100); in testOneShotFirst() 71 mHandler.sendMessageDelayed(mHandler.obtainMessage(1), 100); in testOneShotFirst() 99 mHandler.sendMessage(mHandler.obtainMessage(0)); in testOneShotLater() 105 mHandler.sendMessageDelayed(mHandler.obtainMessage(1), 100); in testOneShotLater() 107 mHandler.sendMessageDelayed(mHandler.obtainMessage(2), 100); in testOneShotLater() 136 mHandler.sendMessageDelayed(mHandler.obtainMessage(0), 100); in testRepeatedFirst() 142 mHandler.sendMessageDelayed(mHandler.obtainMessage(1), 100); in testRepeatedFirst() 170 mHandler.sendMessage(mHandler.obtainMessage(0)); in testRepeatedLater() [all …]
|
D | MessageQueueTest.java | 28 Handler mHandler; field in MessageQueueTest.BaseTestHandler 36 mHandler = new Handler() { in go() 72 mHandler.sendMessageAtTime(mHandler.obtainMessage(2), now + 1); in testMessageOrder() 73 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now + 2); in testMessageOrder() 74 mHandler.sendMessageAtTime(mHandler.obtainMessage(4), now + 2); in testMessageOrder() 75 mHandler.sendMessageAtTime(mHandler.obtainMessage(0), now + 0); in testMessageOrder() 76 mHandler.sendMessageAtTime(mHandler.obtainMessage(1), now + 0); in testMessageOrder() 91 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now); in testAtFrontOfQueue() 92 mHandler.sendMessageAtFrontOfQueue(mHandler.obtainMessage(2)); in testAtFrontOfQueue() 93 mHandler.sendMessageAtFrontOfQueue(mHandler.obtainMessage(0)); in testAtFrontOfQueue() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/ |
D | HandlerExecutor.java | 24 private final Handler mHandler; field in HandlerExecutor 27 mHandler = handler; in HandlerExecutor() 32 if (mHandler.getLooper().isCurrentThread()) { in execute() 36 if (!mHandler.post(command)) { in execute() 37 throw new RuntimeException(mHandler + " is probably exiting"); in execute() 43 if (!mHandler.postDelayed(r, delayMillis)) { in executeDelayed() 44 throw new RuntimeException(mHandler + " is probably exiting"); in executeDelayed() 50 mHandler.removeCallbacks(r); in removeCallbacks() 55 return mHandler.hasCallbacks(r); in hasCallback()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | CommandQueue.java | 162 private Handler mHandler = new H(Looper.getMainLooper()); field in CommandQueue 412 context.getSystemService(DisplayManager.class).registerDisplayListener(this, mHandler); in CommandQueue() 464 mHandler.obtainMessage(MSG_ICON, OP_SET_ICON, 0, in setIcon() 472 mHandler.obtainMessage(MSG_ICON, OP_REMOVE_ICON, 0, slot).sendToTarget(); in removeIcon() 484 mHandler.removeMessages(MSG_DISABLE); in disable() 490 Message msg = mHandler.obtainMessage(MSG_DISABLE, args); in disable() 491 if (Looper.myLooper() == mHandler.getLooper()) { in disable() 493 mHandler.handleMessage(msg); in disable() 541 mHandler.removeMessages(MSG_EXPAND_NOTIFICATIONS); in animateExpandNotificationsPanel() 542 mHandler.sendEmptyMessage(MSG_EXPAND_NOTIFICATIONS); in animateExpandNotificationsPanel() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | AsyncService.java | 50 Handler mHandler; field in AsyncService 54 public Handler mHandler; field in AsyncService.AsyncServiceInfo 76 return mHandler; in getHandler() 86 mHandler = mAsyncServiceInfo.mHandler; in onCreate() 87 mMessenger = new Messenger(mHandler); in onCreate() 97 Message msg = mHandler.obtainMessage(); in onStartCommand() 102 mHandler.sendMessage(msg); in onStartCommand() 116 Message msg = mHandler.obtainMessage(); in onDestroy() 118 mHandler.sendMessage(msg); in onDestroy()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | TaskChangeNotificationController.java | 70 private final Handler mHandler; field in TaskChangeNotificationController 290 mHandler = new MainHandler(handler.getLooper()); in TaskChangeNotificationController() 347 mHandler.sendEmptyMessage(LOG_TASK_STATE_MSG); in notifyTaskStackChanged() 348 mHandler.removeMessages(NOTIFY_TASK_STACK_CHANGE_LISTENERS_MSG); in notifyTaskStackChanged() 349 final Message msg = mHandler.obtainMessage(NOTIFY_TASK_STACK_CHANGE_LISTENERS_MSG); in notifyTaskStackChanged() 352 mHandler.sendMessageDelayed(msg, NOTIFY_TASK_STACK_CHANGE_LISTENERS_DELAY); in notifyTaskStackChanged() 357 mHandler.removeMessages(NOTIFY_ACTIVITY_PINNED_LISTENERS_MSG); in notifyActivityPinned() 358 final Message msg = mHandler.obtainMessage(NOTIFY_ACTIVITY_PINNED_LISTENERS_MSG, in notifyActivityPinned() 367 mHandler.removeMessages(NOTIFY_ACTIVITY_UNPINNED_LISTENERS_MSG); in notifyActivityUnpinned() 368 final Message msg = mHandler.obtainMessage(NOTIFY_ACTIVITY_UNPINNED_LISTENERS_MSG); in notifyActivityUnpinned() [all …]
|
D | LaunchObserverRegistryImpl.java | 54 private final Handler mHandler; field in LaunchObserverRegistryImpl 57 mHandler = new Handler(looper); in LaunchObserverRegistryImpl() 62 mHandler.sendMessage(PooledLambda.obtainMessage( in registerLaunchObserver() 68 mHandler.sendMessage(PooledLambda.obtainMessage( in unregisterLaunchObserver() 74 mHandler.sendMessage(PooledLambda.obtainMessage( in onIntentStarted() 83 mHandler.sendMessage(PooledLambda.obtainMessage( in onIntentFailed() 91 mHandler.sendMessage(PooledLambda.obtainMessage( in onActivityLaunched() 99 mHandler.sendMessage(PooledLambda.obtainMessage( in onActivityLaunchCancelled() 107 mHandler.sendMessage(PooledLambda.obtainMessage( in onActivityLaunchFinished() 116 mHandler.sendMessage(PooledLambda.obtainMessage( in onReportFullyDrawn()
|
/frameworks/base/core/java/android/hardware/radio/ |
D | TunerCallbackAdapter.java | 37 @NonNull private final Handler mHandler; field in TunerCallbackAdapter 50 mHandler = new Handler(Looper.getMainLooper()); in TunerCallbackAdapter() 52 mHandler = handler; in TunerCallbackAdapter() 117 mHandler.post(() -> mCallback.onError(status)); in onError() 122 mHandler.post(() -> mCallback.onTuneFailed(status, selector)); in onTuneFailed() 141 mHandler.post(() -> mCallback.onError(errorCode)); in onTuneFailed() 146 mHandler.post(() -> mCallback.onConfigurationChanged(config)); in onConfigurationChanged() 160 mHandler.post(() -> { in onCurrentProgramInfoChanged() 170 mHandler.post(() -> mCallback.onTrafficAnnouncement(active)); in onTrafficAnnouncement() 175 mHandler.post(() -> mCallback.onEmergencyAnnouncement(active)); in onEmergencyAnnouncement() [all …]
|
/frameworks/base/tests/utils/testutils/java/android/os/test/ |
D | TestLooperTest.java | 52 private Handler mHandler; field in TestLooperTest 64 mHandler = new Handler(mTestLooper.getLooper()); in setUp() 65 mHandlerSpy = spy(mHandler); in setUp() 82 mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA)); in testNoTimeMovement() 83 mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA)); in testNoTimeMovement() 84 mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB)); in testNoTimeMovement() 85 mHandlerSpy.sendMessage(mHandler.obtainMessage(messageC)); in testNoTimeMovement() 140 mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA)); in testDelayedDispatchNoTimeMove() 141 mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB)); in testDelayedDispatchNoTimeMove() 142 mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageC), 5000); in testDelayedDispatchNoTimeMove() [all …]
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | SingleKeyGestureDetector.java | 59 private final Handler mHandler; field in SingleKeyGestureDetector 158 mHandler = new KeyHandler(); in SingleKeyGestureDetector() 187 mHandler.removeMessages(MSG_KEY_LONG_PRESS); in interceptKeyDown() 188 mHandler.removeMessages(MSG_KEY_VERY_LONG_PRESS); in interceptKeyDown() 225 final Message msg = mHandler.obtainMessage(MSG_KEY_LONG_PRESS, keyCode, 0, in interceptKeyDown() 228 mHandler.sendMessageDelayed(msg, mLongPressTimeout); in interceptKeyDown() 232 final Message msg = mHandler.obtainMessage(MSG_KEY_VERY_LONG_PRESS, keyCode, 0, in interceptKeyDown() 235 mHandler.sendMessageDelayed(msg, mVeryLongPressTimeout); in interceptKeyDown() 238 mHandler.removeMessages(MSG_KEY_LONG_PRESS); in interceptKeyDown() 239 mHandler.removeMessages(MSG_KEY_VERY_LONG_PRESS); in interceptKeyDown() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/concurrency/ |
D | ExecutorImpl.java | 30 private final Handler mHandler; field in ExecutorImpl 33 mHandler = new Handler(looper, this::onHandleMessage); in ExecutorImpl() 38 if (!mHandler.post(command)) { in execute() 39 throw new RejectedExecutionException(mHandler + " is shutting down"); in execute() 46 Message m = mHandler.obtainMessage(MSG_EXECUTE_RUNNABLE, token); in executeDelayed() 47 mHandler.sendMessageDelayed(m, unit.toMillis(delay)); in executeDelayed() 55 Message m = mHandler.obtainMessage(MSG_EXECUTE_RUNNABLE, token); in executeAtTime() 56 mHandler.sendMessageAtTime(m, unit.toMillis(uptimeMillis)); in executeAtTime() 80 mHandler.removeCallbacksAndMessages(this); in run()
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/ |
D | TaskStackChangeListeners.java | 104 private final Handler mHandler; field in TaskStackChangeListeners.Impl 108 mHandler = new Handler(looper, this); in Impl() 157 mHandler.removeMessages(ON_TASK_STACK_CHANGED); in onTaskStackChanged() 158 mHandler.sendEmptyMessage(ON_TASK_STACK_CHANGED); in onTaskStackChanged() 163 mHandler.removeMessages(ON_ACTIVITY_PINNED); in onActivityPinned() 164 mHandler.obtainMessage(ON_ACTIVITY_PINNED, in onActivityPinned() 170 mHandler.removeMessages(ON_ACTIVITY_UNPINNED); in onActivityUnpinned() 171 mHandler.sendEmptyMessage(ON_ACTIVITY_UNPINNED); in onActivityUnpinned() 182 mHandler.removeMessages(ON_ACTIVITY_RESTART_ATTEMPT); in onActivityRestartAttempt() 183 mHandler.obtainMessage(ON_ACTIVITY_RESTART_ATTEMPT, args).sendToTarget(); in onActivityRestartAttempt() [all …]
|
/frameworks/base/core/java/android/inputmethodservice/ |
D | MultiClientInputMethodClientCallbackAdaptor.java | 79 Handler mHandler; field in MultiClientInputMethodClientCallbackAdaptor 89 mSessionLock, mCallbackImpl, mHandler, mCancellationGroup); in createIInputMethodSession() 96 mSessionLock, mCallbackImpl, mHandler, mCancellationGroup); in createIMultiClientInputMethodSession() 106 mHandler = new Handler(looper, null, true); in MultiClientInputMethodClientCallbackAdaptor() 108 mInputEventReceiver = new ImeInputEventReceiver(mReadChannel, mHandler.getLooper(), in MultiClientInputMethodClientCallbackAdaptor() 191 private Handler mHandler; field in MultiClientInputMethodClientCallbackAdaptor.InputMethodSessionImpl 198 mHandler = handler; in InputMethodSessionImpl() 212 if (mCallbackImpl == null || mHandler == null) { in updateSelection() 222 mHandler.sendMessage(PooledLambda.obtainMessage( in updateSelection() 240 if (mCallbackImpl == null || mHandler == null) { in displayCompletions() [all …]
|
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/ |
D | RemoteInlineSuggestionUi.java | 63 private final Handler mHandler; field in RemoteInlineSuggestionUi 93 mHandler = handler; in RemoteInlineSuggestionUi() 106 mHandler.post(() -> { in setInlineContentCallback() 116 mHandler.post(this::handleRequestSurfacePackage); in requestSurfacePackage() 124 mHandler.post(() -> handleUpdateRefCount(-1)); in surfacePackageReleased() 157 mHandler.post(() -> { in handleRequestSurfacePackage() 191 mHandler.postDelayed(mDelayedReleaseViewRunnable, RELEASE_REMOTE_VIEW_HOST_DELAY_MS); in handleUpdateRefCount() 197 mHandler.removeCallbacks(mDelayedReleaseViewRunnable); in cancelPendingReleaseViewRequest() 271 mHandler.post(RemoteInlineSuggestionUi.this::handleOnClick); in onClick() 276 mHandler.post(RemoteInlineSuggestionUi.this::handleOnLongClick); in onLongClick() [all …]
|
/frameworks/base/telecomm/java/android/telecom/ |
D | VideoCallImpl.java | 72 if (mHandler == null) { in receiveSessionModifyRequest() 75 mHandler.obtainMessage(MessageHandler.MSG_RECEIVE_SESSION_MODIFY_REQUEST, in receiveSessionModifyRequest() 83 if (mHandler == null) { in receiveSessionModifyResponse() 90 mHandler.obtainMessage(MessageHandler.MSG_RECEIVE_SESSION_MODIFY_RESPONSE, args) in receiveSessionModifyResponse() 96 if (mHandler == null) { in handleCallSessionEvent() 99 mHandler.obtainMessage(MessageHandler.MSG_HANDLE_CALL_SESSION_EVENT, event) in handleCallSessionEvent() 105 if (mHandler == null) { in changePeerDimensions() 111 mHandler.obtainMessage(MessageHandler.MSG_CHANGE_PEER_DIMENSIONS, args).sendToTarget(); in changePeerDimensions() 116 if (mHandler == null) { in changeVideoQuality() 119 mHandler.obtainMessage(MessageHandler.MSG_CHANGE_VIDEO_QUALITY, videoQuality, 0) in changeVideoQuality() [all …]
|
D | ConnectionServiceAdapterServant.java | 83 private final Handler mHandler = new Handler() { field in ConnectionServiceAdapterServant 391 mHandler.obtainMessage(MSG_HANDLE_CREATE_CONNECTION_COMPLETE, args).sendToTarget(); 404 mHandler.obtainMessage(MSG_HANDLE_CREATE_CONFERENCE_COMPLETE, args).sendToTarget(); 410 mHandler.obtainMessage(MSG_SET_ACTIVE, connectionId).sendToTarget(); 415 mHandler.obtainMessage(MSG_SET_RINGING, connectionId).sendToTarget(); 420 mHandler.obtainMessage(MSG_SET_DIALING, connectionId).sendToTarget(); 425 mHandler.obtainMessage(MSG_SET_PULLING, connectionId).sendToTarget(); 434 mHandler.obtainMessage(MSG_SET_DISCONNECTED, args).sendToTarget(); 439 mHandler.obtainMessage(MSG_SET_ON_HOLD, connectionId).sendToTarget(); 445 mHandler.obtainMessage(MSG_SET_RINGBACK_REQUESTED, ringback ? 1 : 0, 0, connectionId) [all …]
|
/frameworks/base/core/java/android/view/ |
D | GestureDetector.java | 255 private final Handler mHandler; field in GestureDetector 417 mHandler = new GestureHandler(handler); in GestureDetector() 419 mHandler = new GestureHandler(); in GestureDetector() 604 boolean hadTapMessage = mHandler.hasMessages(TAP); in onTouchEvent() 605 if (hadTapMessage) mHandler.removeMessages(TAP); in onTouchEvent() 619 mHandler.sendEmptyMessageDelayed(TAP, DOUBLE_TAP_TIMEOUT); in onTouchEvent() 637 mHandler.removeMessages(LONG_PRESS); in onTouchEvent() 638 mHandler.sendMessageAtTime( in onTouchEvent() 639 mHandler.obtainMessage( in onTouchEvent() 646 mHandler.sendEmptyMessageAtTime(SHOW_PRESS, in onTouchEvent() [all …]
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | WakeupMessageTest.java | 54 @Spy MessageCapturingHandler mHandler = new MessageCapturingHandler(); field in WakeupMessageTest 95 mMessage = new WakeupMessage(mContext, mHandler, TEST_CMD_NAME, TEST_CMD, TEST_ARG1, in setUp() 110 eq(TEST_CMD_NAME), any(AlarmManager.OnAlarmListener.class), eq(mHandler)); in scheduleAndVerifyAlarm() 114 verify(mHandler, times(1)).handleMessage(any(Message.class)); in verifyMessageDispatchedOnce() 115 assertEquals("what", TEST_CMD, mHandler.getLastMessage().what); in verifyMessageDispatchedOnce() 116 assertEquals("arg1", TEST_ARG1, mHandler.getLastMessage().arg1); in verifyMessageDispatchedOnce() 117 assertEquals("arg2", TEST_ARG2, mHandler.getLastMessage().arg2); in verifyMessageDispatchedOnce() 118 assertEquals("obj", TEST_OBJ, mHandler.getLastMessage().obj); in verifyMessageDispatchedOnce() 128 verify(mHandler, never()).handleMessage(any(Message.class)); in scheduleAndDeliverMessage() 146 verify(mHandler, never()).handleMessage(any(Message.class)); in scheduleAndCancelMessage() [all …]
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/ |
D | CameraTestThread.java | 35 private Handler mHandler = null; field in CameraTestThread 42 if (mLooper != null || mHandler !=null) { in start() 44 return mHandler; in start() 55 mHandler = new Handler(); in start() 66 return mHandler; in start() 73 if (mLooper == null || mHandler == null) { in close() 82 mHandler = null; in close()
|
/frameworks/ex/camera2/utils/src/com/android/ex/camera2/utils/ |
D | Camera2CaptureCallbackForwarder.java | 33 private Handler mHandler; field in Camera2CaptureCallbackForwarder 37 mHandler = handler; in Camera2CaptureCallbackForwarder() 43 mHandler.post(new Runnable() { in onCaptureCompleted() 53 mHandler.post(new Runnable() { in onCaptureFailed() 64 mHandler.post(new Runnable() { in onCaptureProgressed() 73 mHandler.post(new Runnable() { in onCaptureSequenceAborted() 83 mHandler.post(new Runnable() { in onCaptureSequenceCompleted() 93 mHandler.post(new Runnable() { in onCaptureStarted()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | DozeScrimController.java | 43 private final Handler mHandler = new Handler(); field in DozeScrimController 78 mHandler.postDelayed(mPulseOut, mDozeParameters.getPulseVisibleDuration()); 79 mHandler.postDelayed(mPulseOutExtended, 148 mHandler.removeCallbacks(mPulseOut); in extendPulse() 155 mHandler.removeCallbacks(mPulseOut); in cancelPendingPulseTimeout() 156 mHandler.removeCallbacks(mPulseOutExtended); in cancelPendingPulseTimeout() 163 mHandler.removeCallbacks(mPulseOut); in cancelPulsing() 164 mHandler.removeCallbacks(mPulseOutExtended); in cancelPulsing() 187 mHandler.removeCallbacks(mPulseOut); 196 mHandler.removeCallbacks(mPulseOut); [all …]
|
/frameworks/base/core/java/android/service/voice/ |
D | SoftwareHotwordDetector.java | 55 private final Handler mHandler; field in SoftwareHotwordDetector 68 mHandler = new Handler(Looper.getMainLooper()); in SoftwareHotwordDetector() 70 new InitializationStateListener(mHandler, mCallback)); in SoftwareHotwordDetector() 84 mAudioFormat, new BinderCallback(mHandler, mCallback)); in startRecognition() 119 private final Handler mHandler; field in SoftwareHotwordDetector.BinderCallback 124 this.mHandler = handler; in BinderCallback() 134 mHandler.sendMessage(obtainMessage( in onDetected() 144 private final Handler mHandler; field in SoftwareHotwordDetector.InitializationStateListener 148 this.mHandler = handler; in InitializationStateListener() 200 mHandler.sendMessage(obtainMessage( in onStatusReported() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | GbaManager.java | 72 private Handler mHandler; field in GbaManager 120 if (!mHandler.hasMessages(EVENT_BIND_SERVICE)) { in handleMessage() 121 mHandler.sendEmptyMessage(EVENT_BIND_SERVICE); in handleMessage() 183 mHandler.sendEmptyMessage(EVENT_BIND_SUCCESS); in onServiceConnected() 204 mHandler = new GbaManagerHandler(headlerThread.getLooper()); in GbaManager() 207 mHandler.sendEmptyMessage(EVENT_BIND_SERVICE); in GbaManager() 252 if (!mHandler.hasMessages(EVENT_REQUESTS_RECEIVED)) { in bootstrapAuthenticationRequest() 253 mHandler.sendEmptyMessage(EVENT_REQUESTS_RECEIVED); in bootstrapAuthenticationRequest() 347 if (mHandler.hasMessages(EVENT_UNBIND_SERVICE)) { in releaseServiceAsNeeded() 348 mHandler.removeMessages(EVENT_UNBIND_SERVICE); in releaseServiceAsNeeded() [all …]
|
/frameworks/base/core/java/android/os/ |
D | ResultReceiver.java | 36 final Handler mHandler; field in ResultReceiver 56 if (mHandler != null) { in send() 57 mHandler.post(new MyRunnable(resultCode, resultData)); in send() 71 mHandler = handler; in ResultReceiver() 83 if (mHandler != null) { in send() 84 mHandler.post(new MyRunnable(resultCode, resultData)); in send() 124 mHandler = null; in ResultReceiver()
|
/frameworks/base/services/core/java/com/android/server/servicewatcher/ |
D | ServiceWatcherImpl.java | 58 final Handler mHandler; field in ServiceWatcherImpl 84 mHandler = handler; in ServiceWatcherImpl() 100 mPackageMonitor.register(mContext, UserHandle.ALL, /*externalStorage=*/ true, mHandler); in register() 125 mHandler.post(() -> serviceConnection.runOnBinder(operation)); in runOnBinder() 142 mHandler.post(() -> { in onServiceChanged() 194 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in bind() 208 mHandler, UserHandle.of(mBoundServiceInfo.getUserId()))) { in bind() 211 mHandler.postDelayed(mRebinder, RETRY_DELAY_MS); in bind() 218 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in unbind() 229 mHandler.removeCallbacks(mRebinder); in unbind() [all …]
|