Searched refs:looper (Results 1 - 25 of 344) sorted by relevance

1234567891011>>

/frameworks/base/native/android/
H A Dlooper.cpp20 #include <android/looper.h>
32 static inline ALooper* Looper_to_ALooper(Looper* looper) { argument
33 return reinterpret_cast<ALooper*>(looper);
44 void ALooper_acquire(ALooper* looper) { argument
45 ALooper_to_Looper(looper)->incStrong((void*)ALooper_acquire);
48 void ALooper_release(ALooper* looper) { argument
49 ALooper_to_Looper(looper)->decStrong((void*)ALooper_acquire);
53 sp<Looper> looper = Looper::getForThread(); local
54 if (looper == NULL) {
55 ALOGE("ALooper_pollOnce: No looper fo
64 sp<Looper> looper = Looper::getForThread(); local
74 ALooper_wake(ALooper* looper) argument
78 ALooper_addFd(ALooper* looper, int fd, int ident, int events, ALooper_callbackFunc callback, void* data) argument
83 ALooper_removeFd(ALooper* looper, int fd) argument
[all...]
H A Dchoreographer.cpp67 explicit Choreographer(const sp<Looper>& looper);
88 sp<Looper> looper = Looper::getForThread(); local
89 if (!looper.get()) {
90 ALOGW("No looper prepared for thread");
93 gChoreographer = new Choreographer(looper);
103 Choreographer::Choreographer(const sp<Looper>& looper) : argument
104 DisplayEventDispatcher(looper), mLooper(looper), mThreadId(std::this_thread::get_id()) {
/frameworks/base/core/java/com/android/internal/view/
H A DWindowManagerPolicyThread.java29 public static void set(Thread thread, Looper looper) { argument
31 mLooper = looper;
/frameworks/native/include/android/
H A Dlooper.h23 * @file looper.h
37 * A looper is the state tracking an event loop for a thread.
50 * Returns the looper associated with the calling thread, or NULL if
58 * This looper will accept calls to ALooper_addFd() that do not
68 * Prepares a looper associated with the calling thread, and returns it.
69 * If the thread already has a looper, it is returned. Otherwise, a new
108 void ALooper_acquire(ALooper* looper);
113 void ALooper_release(ALooper* looper);
116 * Flags for file descriptor events that a looper can monitor.
134 * The looper alway
[all...]
/frameworks/base/core/java/android/os/
H A DHandlerThread.java23 * Handy class for starting a new thread that has a looper. The looper can then be
72 * has been started, this method will block until the looper has been initialized.
73 * @return The looper.
80 // If the thread has been started, wait until the looper has been created.
105 * Quits the handler thread's looper.
107 * Causes the handler thread's looper to terminate without processing any
110 * Any attempt to post messages to the queue after the looper is asked to quit will fail.
114 * before the looper terminates. Consider using {@link #quitSafely} instead to ensure
118 * @return True if the looper loope
[all...]
H A DTestLooperManager.java22 * Blocks a looper from executing any messages, and allows the holder of this object
45 public TestLooperManager(Looper looper) { argument
47 if (sHeldLoopers.contains(looper)) {
48 throw new RuntimeException("TestLooperManager already held for this looper");
50 sHeldLoopers.add(looper);
52 mLooper = looper;
54 // Post a message that will keep the looper blocked as long as we are dispatching.
55 new Handler(looper).post(new LooperHolder());
80 // Wait for the looper block to come up, to make sure we don't accidentally get
95 * Releases the looper t
[all...]
/frameworks/base/core/java/android/view/
H A DDisplayEventReceiver.java74 * @param looper The looper to use when invoking callbacks.
76 public DisplayEventReceiver(Looper looper) { argument
77 this(looper, VSYNC_SOURCE_APP);
83 * @param looper The looper to use when invoking callbacks.
86 public DisplayEventReceiver(Looper looper, int vsyncSource) { argument
87 if (looper == null) {
88 throw new IllegalArgumentException("looper must not be null");
91 mMessageQueue = looper
[all...]
H A DFrameMetricsObserver.java46 * @param looper the looper to use when invoking callbacks
48 FrameMetricsObserver(@NonNull Window window, @NonNull Looper looper, argument
50 if (looper == null) {
51 throw new NullPointerException("looper cannot be null");
54 mMessageQueue = looper.getQueue();
56 throw new IllegalStateException("invalid looper, null message queue\n");
H A DBatchedInputEventReceiver.java30 InputChannel inputChannel, Looper looper, Choreographer choreographer) {
31 super(inputChannel, looper);
29 BatchedInputEventReceiver( InputChannel inputChannel, Looper looper, Choreographer choreographer) argument
H A DInputFilter.java118 * @param looper The looper to run callbacks on.
120 public InputFilter(Looper looper) { argument
121 mH = new H(looper);
214 public H(Looper looper) { argument
215 super(looper);
/frameworks/base/cmds/incidentd/src/
H A Dmain.cpp39 // Set up the looper
40 sp<Looper> looper(Looper::prepare(0 /* opts */));
50 android::sp<IncidentService> service = new IncidentService(looper);
59 looper->pollAll(-1 /* timeoutMillis */);
/frameworks/base/services/core/java/com/android/server/
H A DUiThread.java49 final Looper looper = sInstance.getLooper();
50 looper.setTraceTag(Trace.TRACE_TAG_ACTIVITY_MANAGER);
51 looper.setSlowDispatchThresholdMs(SLOW_DISPATCH_THRESHOLD_MS);
/frameworks/base/location/java/android/location/
H A DCountryDetector.java54 * looper once the country changed and detected.
62 public ListenerTransport(CountryListener listener, Looper looper) { argument
64 if (looper != null) {
65 mHandler = new Handler(looper);
115 * @param looper a Looper object whose message queue will be used to
116 * implement the callback mechanism. If looper is null then the
119 public void addCountryListener(CountryListener listener, Looper looper) { argument
122 ListenerTransport transport = new ListenerTransport(listener, looper);
/frameworks/av/media/libstagefright/foundation/
H A DALooperRoster.cpp37 const sp<ALooper> &looper, const sp<AHandler> &handler) {
46 info.mLooper = looper;
51 handler->setID(handlerID, looper);
86 sp<ALooper> looper = info.mLooper.promote(); local
87 if (looper == NULL) {
91 // At this point 'looper' might be the only sp<> keeping
97 activeLoopers.add(looper);
139 sp<ALooper> looper = info.mLooper.promote(); local
140 if (looper != NULL) {
141 s.append(looper
36 registerHandler( const sp<ALooper> &looper, const sp<AHandler> &handler) argument
[all...]
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
H A DHistoryHandler.java30 HistoryHandler(Looper looper) { argument
31 super(looper);
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
H A DWifiHandler.java37 public WifiHandler(String tag, Looper looper) { argument
38 super(looper);
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/
H A DWifiScannerImpl.java40 WifiScannerImpl create(Context context, Looper looper, Clock clock); argument
48 public WifiScannerImpl create(Context context, Looper looper, Clock clock) {
52 return new HalWifiScannerImpl(context, wifiNative, wifiMonitor, looper, clock);
54 return new WificondScannerImpl(context, wifiNative, wifiMonitor, looper,
/frameworks/av/include/media/stagefright/foundation/
H A DAHandler.h40 sp<ALooper> looper() const { function in struct:android::AHandler
63 inline void setID(ALooper::handler_id id, const wp<ALooper> &looper) { argument
65 mLooper = looper;
/frameworks/av/media/libstagefright/foundation/include/foundation/
H A DAHandler.h40 sp<ALooper> looper() const { function in struct:android::AHandler
63 inline void setID(ALooper::handler_id id, const wp<ALooper> &looper) { argument
65 mLooper = looper;
/frameworks/av/media/libstagefright/include/foundation/
H A DAHandler.h40 sp<ALooper> looper() const { function in struct:android::AHandler
63 inline void setID(ALooper::handler_id id, const wp<ALooper> &looper) { argument
65 mLooper = looper;
/frameworks/base/core/jni/include/android_runtime/
H A Dandroid_view_InputQueue.h39 void attachLooper(Looper* looper, int ident, ALooper_callbackFunc callback, void* data);
59 static InputQueue* createQueue(jobject inputQueueObj, const sp<Looper>& looper);
65 InputQueue(jobject inputQueueObj, const sp<Looper>& looper,
/frameworks/base/core/java/android/hardware/soundtrigger/
H A DSoundTriggerModule.java131 // find the looper for our new event handler
132 Looper looper;
134 looper = handler.getLooper();
136 looper = Looper.getMainLooper();
139 // construct the event handler with this looper
140 if (looper != null) {
142 mHandler = new Handler(looper) {
/frameworks/base/media/java/android/media/
H A DMediaSync.java258 Looper looper;
259 if ((looper = Looper.myLooper()) == null) {
260 looper = Looper.getMainLooper();
262 if (looper == null) {
265 mCallbackHandler = new Handler(looper);
291 Looper looper;
292 if ((looper = Looper.myLooper()) == null) {
293 looper = Looper.getMainLooper();
295 if (looper == null) {
298 mOnErrorListenerHandler = new Handler(looper);
[all...]
/frameworks/av/media/libstagefright/rtsp/
H A Drtp_test.cpp64 sp<ALooper> looper = new ALooper; local
71 looper->registerHandler(rtp_pusher);
74 looper->registerHandler(rtcp_pusher);
78 looper->registerHandler(session);
174 looper->start(false /* runOnCallingThread */);
218 looper->stop();
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
H A DGSMTestHandler.java.broken78 Looper looper = getLooper();
79 if (looper != null) looper.quit();

Completed in 487 milliseconds

1234567891011>>