Home
last modified time | relevance | path

Searched refs:looper (Results 1 – 25 of 125) sorted by relevance

12345

/frameworks/base/native/android/
Dlooper.cpp36 void ALooper_acquire(ALooper* looper) { in ALooper_acquire() argument
37 static_cast<Looper*>(looper)->incStrong((void*)ALooper_acquire); in ALooper_acquire()
40 void ALooper_release(ALooper* looper) { in ALooper_release() argument
41 static_cast<Looper*>(looper)->decStrong((void*)ALooper_acquire); in ALooper_release()
45 sp<Looper> looper = Looper::getForThread(); in ALooper_pollOnce() local
46 if (looper == NULL) { in ALooper_pollOnce()
52 return looper->pollOnce(timeoutMillis, outFd, outEvents, outData); in ALooper_pollOnce()
56 sp<Looper> looper = Looper::getForThread(); in ALooper_pollAll() local
57 if (looper == NULL) { in ALooper_pollAll()
63 return looper->pollAll(timeoutMillis, outFd, outEvents, outData); in ALooper_pollAll()
[all …]
Dsensor.cpp63 ALooper* looper, int ident, ALooper_callbackFunc callback, void* data) in ASensorManager_createEventQueue() argument
68 ALooper_addFd(looper, queue->getFd(), ident, ALOOPER_EVENT_INPUT, callback, data); in ASensorManager_createEventQueue()
69 queue->looper = looper; in ASensorManager_createEventQueue()
79 ALooper_removeFd(queue->looper, queue->getFd()); in ASensorManager_destroyEventQueue()
/frameworks/base/graphics/java/android/graphics/
DSurfaceTexture.java112 Looper looper; in SurfaceTexture() local
113 if ((looper = Looper.myLooper()) != null) { in SurfaceTexture()
114 mEventHandler = new EventHandler(looper); in SurfaceTexture()
115 } else if ((looper = Looper.getMainLooper()) != null) { in SurfaceTexture()
116 mEventHandler = new EventHandler(looper); in SurfaceTexture()
272 public EventHandler(Looper looper) { in EventHandler() argument
273 super(looper); in EventHandler()
/frameworks/native/include/android/
Dlooper.h99 void ALooper_acquire(ALooper* looper);
104 void ALooper_release(ALooper* looper);
202 void ALooper_wake(ALooper* looper);
230 int ALooper_addFd(ALooper* looper, int fd, int ident, int events,
250 int ALooper_removeFd(ALooper* looper, int fd);
/frameworks/av/media/libstagefright/foundation/
DALooperRoster.cpp35 const sp<ALooper> looper, const sp<AHandler> &handler) { in registerHandler() argument
44 info.mLooper = looper; in registerHandler()
91 sp<ALooper> looper = info.mLooper.promote(); in postMessage_l() local
93 if (looper == NULL) { in postMessage_l()
102 looper->post(msg, delayUs); in postMessage_l()
145 sp<ALooper> looper = mHandlers.valueAt(index).mLooper.promote(); in findLooper() local
147 if (looper == NULL) { in findLooper()
152 return looper; in findLooper()
/frameworks/av/media/libstagefright/rtsp/
Drtp_test.cpp66 sp<ALooper> looper = new ALooper; in main() local
73 looper->registerHandler(rtp_pusher); in main()
76 looper->registerHandler(rtcp_pusher); in main()
80 looper->registerHandler(session); in main()
176 looper->start(false /* runOnCallingThread */); in main()
227 looper->stop(); in main()
/frameworks/base/location/java/android/location/
DCountryDetector.java65 public ListenerTransport(CountryListener listener, Looper looper) { in ListenerTransport() argument
67 if (looper != null) { in ListenerTransport()
68 mHandler = new Handler(looper); in ListenerTransport()
122 public void addCountryListener(CountryListener listener, Looper looper) { in addCountryListener() argument
125 ListenerTransport transport = new ListenerTransport(listener, looper); in addCountryListener()
DLocationManager.java193 ListenerTransport(LocationListener listener, Looper looper) { in ListenerTransport() argument
196 if (looper == null) { in ListenerTransport()
204 mListenerHandler = new Handler(looper) { in ListenerTransport()
455 LocationListener listener, Looper looper) { in requestLocationUpdates() argument
461 requestLocationUpdates(request, listener, looper, null); in requestLocationUpdates()
487 LocationListener listener, Looper looper) { in requestLocationUpdates() argument
493 requestLocationUpdates(request, listener, looper, null); in requestLocationUpdates()
643 public void requestSingleUpdate(String provider, LocationListener listener, Looper looper) { in requestSingleUpdate() argument
649 requestLocationUpdates(request, listener, looper, null); in requestSingleUpdate()
672 public void requestSingleUpdate(Criteria criteria, LocationListener listener, Looper looper) { in requestSingleUpdate() argument
[all …]
/frameworks/base/media/java/android/media/
DSoundPool.java419 Looper looper; in setOnLoadCompleteListener() local
420 if ((looper = Looper.myLooper()) != null) { in setOnLoadCompleteListener()
421 mEventHandler = new EventHandler(this, looper); in setOnLoadCompleteListener()
422 } else if ((looper = Looper.getMainLooper()) != null) { in setOnLoadCompleteListener()
423 mEventHandler = new EventHandler(this, looper); in setOnLoadCompleteListener()
438 public EventHandler(SoundPool soundPool, Looper looper) { in EventHandler() argument
439 super(looper); in EventHandler()
DMediaRecorder.java99 Looper looper; in MediaRecorder() local
100 if ((looper = Looper.myLooper()) != null) { in MediaRecorder()
101 mEventHandler = new EventHandler(this, looper); in MediaRecorder()
102 } else if ((looper = Looper.getMainLooper()) != null) { in MediaRecorder()
103 mEventHandler = new EventHandler(this, looper); in MediaRecorder()
898 public EventHandler(MediaRecorder mr, Looper looper) { in EventHandler() argument
899 super(looper); in EventHandler()
DRemoteControlClient.java323 Looper looper; in RemoteControlClient() local
324 if ((looper = Looper.myLooper()) != null) { in RemoteControlClient()
325 mEventHandler = new EventHandler(this, looper); in RemoteControlClient()
326 } else if ((looper = Looper.getMainLooper()) != null) { in RemoteControlClient()
327 mEventHandler = new EventHandler(this, looper); in RemoteControlClient()
349 public RemoteControlClient(PendingIntent mediaButtonIntent, Looper looper) { in RemoteControlClient() argument
352 mEventHandler = new EventHandler(this, looper); in RemoteControlClient()
920 public EventHandler(RemoteControlClient rcc, Looper looper) { in EventHandler() argument
921 super(looper); in EventHandler()
/frameworks/base/core/java/android/view/
DChoreographer.java91 Looper looper = Looper.myLooper();
92 if (looper == null) {
95 return new Choreographer(looper);
163 private Choreographer(Looper looper) { in Choreographer() argument
164 mLooper = looper; in Choreographer()
165 mHandler = new FrameHandler(looper); in Choreographer()
166 mDisplayEventReceiver = USE_VSYNC ? new FrameDisplayEventReceiver(looper) : null; in Choreographer()
656 public FrameHandler(Looper looper) { in FrameHandler() argument
657 super(looper); in FrameHandler()
682 public FrameDisplayEventReceiver(Looper looper) { in FrameDisplayEventReceiver() argument
[all …]
DInputEventReceiver.java58 public InputEventReceiver(InputChannel inputChannel, Looper looper) { in InputEventReceiver() argument
62 if (looper == null) { in InputEventReceiver()
67 mMessageQueue = looper.getQueue(); in InputEventReceiver()
190 InputChannel inputChannel, Looper looper); in createInputEventReceiver() argument
DInputFilter.java126 public InputFilter(Looper looper) { in InputFilter() argument
127 mH = new H(looper); in InputFilter()
220 public H(Looper looper) { in H() argument
221 super(looper); in H()
DDisplayEventReceiver.java55 public DisplayEventReceiver(Looper looper) { in DisplayEventReceiver() argument
56 if (looper == null) { in DisplayEventReceiver()
60 mMessageQueue = looper.getQueue(); in DisplayEventReceiver()
/frameworks/base/media/java/android/media/audiofx/
DVisualizer.java499 Looper looper; in setDataCaptureListener() local
500 if ((looper = Looper.myLooper()) != null) { in setDataCaptureListener()
501 mNativeEventHandler = new NativeEventHandler(this, looper); in setDataCaptureListener()
502 } else if ((looper = Looper.getMainLooper()) != null) { in setDataCaptureListener()
503 mNativeEventHandler = new NativeEventHandler(this, looper); in setDataCaptureListener()
557 public NativeEventHandler(Visualizer v, Looper looper) { in NativeEventHandler() argument
558 super(looper); in NativeEventHandler()
/frameworks/base/core/java/android/os/
DHandlerThread.java94 Looper looper = getLooper(); in quit() local
95 if (looper != null) { in quit()
96 looper.quit(); in quit()
DHandler.java133 public Handler(Looper looper) { in Handler() argument
134 this(looper, null, false); in Handler()
144 public Handler(Looper looper, Callback callback) { in Handler() argument
145 this(looper, callback, false); in Handler()
224 public Handler(Looper looper, Callback callback, boolean async) { in Handler() argument
225 mLooper = looper; in Handler()
226 mQueue = looper.mQueue; in Handler()
/frameworks/native/libs/gui/
DSensorEventQueue.cpp80 sp<Looper> looper(getLooper()); in waitForEvent() local
85 result = looper->pollOnce(-1, NULL, &events, NULL); in waitForEvent()
104 sp<Looper> looper(getLooper()); in wake() local
105 looper->wake(); in wake()
/frameworks/native/libs/utils/
DLooper.cpp118 void Looper::setForThread(const sp<Looper>& looper) { in setForThread() argument
121 if (looper != NULL) { in setForThread()
122 looper->incStrong((void*)threadDestructor); in setForThread()
125 pthread_setspecific(gTLSKey, looper.get()); in setForThread()
141 sp<Looper> looper = Looper::getForThread(); in prepare() local
142 if (looper == NULL) { in prepare()
143 looper = new Looper(allowNonCallbacks); in prepare()
144 Looper::setForThread(looper); in prepare()
146 if (looper->getAllowNonCallbacks() != allowNonCallbacks) { in prepare()
150 return looper; in prepare()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
DGSMTestHandler.java78 Looper looper = getLooper(); in cleanup() local
79 if (looper != null) looper.quit(); in cleanup()
/frameworks/av/cmds/stagefright/
Dcodec.cpp67 const android::sp<android::ALooper> &looper, in decode() argument
118 looper, mime.c_str(), false /* encoder */); in decode()
372 sp<ALooper> looper = new ALooper; in main() local
373 looper->start(); in main()
413 looper->registerHandler(player); in main()
422 decode(looper, argv[0], useAudio, useVideo, surface); in main()
429 looper->stop(); in main()
Dsf2.cpp70 mDecodeLooper = looper(); in onMessageReceived()
208 if (mDecodeLooper != looper()) { in onMessageReceived()
212 looper()->stop(); in onMessageReceived()
602 sp<ALooper> looper = new ALooper; in main() local
603 looper->setName("sf2"); in main()
639 looper->registerHandler(controller); in main()
643 CHECK_EQ(looper->start(true /* runOnCallingThread */), (status_t)OK); in main()
645 looper->unregisterHandler(controller->id()); in main()
/frameworks/base/core/java/com/android/internal/view/
DWindowManagerPolicyThread.java29 public static void set(Thread thread, Looper looper) { in set() argument
31 mLooper = looper; in set()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/test/
DModelInterpreter.java192 Looper looper = mHandlerThread.getLooper(); in init() local
193 simulatedCallState = new SimulatedGsmCallState(looper); in init()
686 Looper looper = mHandlerThread.getLooper(); in shutdown() local
687 if (looper != null) { in shutdown()
688 looper.quit(); in shutdown()

12345