Searched refs:looper (Results 51 - 75 of 344) sorted by relevance

1234567891011>>

/frameworks/base/tests/utils/testutils/java/com/android/internal/util/test/
H A DBidirectionalAsyncChannel.java45 public void connect(final Looper looper, final Messenger messenger, argument
50 Handler rawMessageHandler = new Handler(looper) {
/frameworks/hardware/interfaces/sensorservice/libsensorndkbridge/
H A DASensorManager.cpp23 #include <android/looper.h>
155 ALooper *looper, int ident, ALooper_callbackFunc callback, void *data) {
159 new ASensorEventQueue(looper, ident, callback, data);
249 ALooper* looper,
255 if (looper == NULL) {
259 return manager->createEventQueue(looper, ident, callback, data);
444 void ALooper_wake(ALooper* looper) { argument
446 looper->wake();
154 createEventQueue( ALooper *looper, int ident, ALooper_callbackFunc callback, void *data) argument
247 ASensorManager_createEventQueue( ASensorManager* manager, ALooper* looper, int ident, ALooper_callbackFunc callback, void* data) argument
/frameworks/base/core/java/android/app/usage/
H A DNetworkStatsManager.java343 final Looper looper;
345 looper = Looper.myLooper();
347 looper = handler.getLooper();
362 CallbackHandler callbackHandler = new CallbackHandler(looper, networkType,
435 CallbackHandler(Looper looper, int networkType, String subscriberId, argument
437 super(looper);
/frameworks/native/services/sensorservice/hidl/
H A DSensorManager.cpp130 /* One global looper for all event queues created from this SensorManager. */
136 std::thread{[&mutex = mLooperMutex, &looper = mLooper, &looperSet, javaVm = mJavaVm] {
141 LOG(WARNING) << "Could not use SCHED_FIFO for looper thread: "
146 if (looper != nullptr) {
147 LOG(INFO) << "Another thread has already set the looper, exiting this one.";
150 looper = Looper::prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS /* opts */);
162 LOG(FATAL) << "Cannot attach SensorManager looper thread to Java VM.";
166 int pollResult = looper->pollAll(-1 /* timeout */);
172 LOG(ERROR) << "Cannot detach SensorManager looper thread from Java VM.";
198 sp<::android::Looper> looper local
[all...]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
H A DWifiAwareRttStateManager.java57 public void start(Context context, Looper looper) { argument
67 startWithRttService(context, looper, service);
74 public void startWithRttService(Context context, Looper looper, IRttManager service) { argument
84 mAsyncChannel.connect(context, new AwareRttHandler(looper), messenger);
116 AwareRttHandler(Looper looper) { argument
117 super(looper);
/frameworks/base/media/java/android/media/
H A DMediaDrm.java204 Looper looper;
205 if ((looper = Looper.myLooper()) != null) {
206 mEventHandler = new EventHandler(this, looper);
207 } else if ((looper = Looper.getMainLooper()) != null) {
208 mEventHandler = new EventHandler(this, looper);
271 * {@code null} if the listener should be invoked on the calling thread's looper.
276 Looper looper = handler != null ? handler.getLooper() : Looper.myLooper();
277 if (looper != null) {
278 if (mEventHandler == null || mEventHandler.getLooper() != looper) {
279 mEventHandler = new EventHandler(this, looper);
514 EventHandler(@onNull MediaDrm md, @NonNull Looper looper) argument
[all...]
H A DMediaRecorder.java106 Looper looper;
107 if ((looper = Looper.myLooper()) != null) {
108 mEventHandler = new EventHandler(this, looper);
109 } else if ((looper = Looper.getMainLooper()) != null) {
110 mEventHandler = new EventHandler(this, looper);
1193 public EventHandler(MediaRecorder mr, Looper looper) { argument
1194 super(looper);
H A DAudioPortEventHandler.java54 // find the looper for our new event handler
55 Looper looper = Looper.getMainLooper();
57 if (looper != null) {
58 mHandler = new Handler(looper) {
H A DImageWriter.java449 * looper.
451 * thread has no looper.
456 Looper looper = handler != null ? handler.getLooper() : Looper.myLooper();
457 if (looper == null) {
459 "handler is null but the current thread is not a looper");
461 if (mListenerHandler == null || mListenerHandler.getLooper() != looper) {
462 mListenerHandler = new ListenerHandler(looper);
568 public ListenerHandler(Looper looper) { argument
569 super(looper, null, true /* async */);
/frameworks/base/media/java/android/media/audiopolicy/
H A DAudioPolicy.java106 private AudioPolicy(AudioPolicyConfig config, Context context, Looper looper, argument
111 if (looper == null) {
112 looper = Looper.getMainLooper();
114 if (looper != null) {
115 mEventHandler = new EventHandler(this, looper);
118 Log.e(TAG, "No event handler due to looper without a thread");
165 * @param looper a non-null specific Looper.
170 public Builder setLooper(@NonNull Looper looper) throws IllegalArgumentException { argument
171 if (looper == null) {
174 mLooper = looper;
533 EventHandler(AudioPolicy ap, Looper looper) argument
[all...]
/frameworks/base/core/java/android/view/
H A DChoreographer.java104 Looper looper = Looper.myLooper();
105 if (looper == null) {
106 throw new IllegalStateException("The current thread must have a looper!");
108 return new Choreographer(looper, VSYNC_SOURCE_APP);
117 Looper looper = Looper.myLooper();
118 if (looper == null) {
119 throw new IllegalStateException("The current thread must have a looper!");
121 return new Choreographer(looper, VSYNC_SOURCE_SURFACE_FLINGER);
152 // The display event receiver can only be accessed by the looper thread to which
153 // it is attached. We take care to ensure that we post message to the looper
221 Choreographer(Looper looper, int vsyncSource) argument
818 FrameHandler(Looper looper) argument
844 FrameDisplayEventReceiver(Looper looper, int vsyncSource) argument
[all...]
/frameworks/base/cmds/hid/jni/
H A Dcom_android_commands_hid_Device.cpp87 std::unique_ptr<DeviceCallback> callback, sp<Looper> looper) {
123 return new Device(id, fd, std::move(callback), looper);
126 Device::Device(int32_t id, int fd, std::unique_ptr<DeviceCallback> callback, sp<Looper> looper) : argument
127 mId(id), mFd(fd), mDeviceCallback(std::move(callback)), mLooper(looper) {
128 looper->addFd(fd, 0, Looper::EVENT_INPUT, handleLooperEvents, reinterpret_cast<void*>(this));
197 sp<Looper> looper = android_os_MessageQueue_getMessageQueue(env, queue)->getLooper(); local
201 std::move(desc), size, std::move(cb), std::move(looper));
85 open(int32_t id, const char* name, int32_t vid, int32_t pid, std::unique_ptr<uint8_t[]> descriptor, size_t descriptorSize, std::unique_ptr<DeviceCallback> callback, sp<Looper> looper) argument
/frameworks/base/core/java/android/os/
H A DHandler.java113 * If this thread does not have a looper, this handler won't be able to receive messages
125 * If this thread does not have a looper, this handler won't be able to receive messages
137 * @param looper The looper, must not be null.
139 public Handler(Looper looper) { argument
140 this(looper, null, false);
147 * @param looper The looper, must not be null.
150 public Handler(Looper looper, Callback callback) { argument
151 this(looper, callbac
230 Handler(Looper looper, Callback callback, boolean async) argument
[all...]
/frameworks/base/native/android/
H A Dsensor.cpp20 #include <android/looper.h>
105 ALooper* looper, int ident, ALooper_callbackFunc callback, void* data) {
108 if (looper == nullptr) {
109 ERROR_INVALID_PARAMETER("looper cannot be NULL");
116 ALooper_addFd(looper, queue->getFd(), ident, ALOOPER_EVENT_INPUT, callback, data);
117 queue->looper = looper;
128 ALooper_removeFd(q->looper, q->getFd());
104 ASensorManager_createEventQueue(ASensorManager* manager, ALooper* looper, int ident, ALooper_callbackFunc callback, void* data) argument
H A DAndroid.mk16 looper.cpp \
/frameworks/base/core/java/android/widget/
H A DToast.java109 * Constructs an empty Toast object. If looper is null, Looper.myLooper() is used.
112 public Toast(@NonNull Context context, @Nullable Looper looper) { argument
114 mTN = new TN(context.getPackageName(), looper);
271 * Make a standard toast to display using the specified looper.
272 * If looper is null, Looper.myLooper() is used.
275 public static Toast makeText(@NonNull Context context, @Nullable Looper looper, argument
277 Toast result = new Toast(context, looper);
370 TN(String packageName, @Nullable Looper looper) { argument
386 if (looper == null) {
387 // Use Looper.myLooper() if looper i
[all...]
/frameworks/base/location/lib/java/com/android/location/provider/
H A DFusedLocationHardware.java77 public void registerSink(FusedLocationHardwareSink sink, Looper looper) { argument
78 if(sink == null || looper == null) {
79 throw new IllegalArgumentException("Parameter sink and looper cannot be null.");
93 newSinkList.put(sink, new DispatcherHandler(looper));
248 public DispatcherHandler(Looper looper) { argument
249 super(looper, null /*callback*/ , true /*async*/);
/frameworks/base/telephony/java/android/telephony/
H A DPhoneStateListener.java279 public PhoneStateListener(Looper looper) { argument
280 this(null, looper);
286 * own non-null Looper use PhoneStateListener(int subId, Looper looper) below.
298 public PhoneStateListener(Integer subId, Looper looper) { argument
299 if (DBG) log("ctor: subId=" + subId + " looper=" + looper);
301 mHandler = new Handler(looper) {
/frameworks/av/cmds/stagefright/
H A Dmediafilter.cpp313 const sp<ALooper> &looper,
356 looper, mime.c_str(), false /* encoder */);
399 looper, "android.filter.zerofilter");
406 looper, "android.filter.intrinsicblur");
413 looper, "android.filter.saturation");
426 looper, "android.filter.RenderScript");
438 looper, "android.filter.RenderScript");
450 looper, "android.filter.RenderScript");
740 android::sp<ALooper> looper = new ALooper; local
741 looper
312 decode( const sp<ALooper> &looper, const char *path, const sp<Surface> &surface, bool renderSurface, bool useTimestamp, FilterType filterType) argument
[all...]
/frameworks/base/wifi/java/android/net/wifi/aware/
H A DWifiAwareManager.java280 Looper looper = (handler == null) ? Looper.getMainLooper() : handler.getLooper();
285 new WifiAwareEventCallbackProxy(this, looper, binder, attachCallback,
306 public void publish(int clientId, Looper looper, PublishConfig publishConfig, argument
312 new WifiAwareDiscoverySessionCallbackProxy(this, looper, true, callback,
334 public void subscribe(int clientId, Looper looper, SubscribeConfig subscribeConfig, argument
345 new WifiAwareDiscoverySessionCallbackProxy(this, looper, false, callback,
524 * Constructs a {@link AttachCallback} using the specified looper.
525 * All callbacks will delivered on the thread of the specified looper.
527 * @param looper The looper o
529 WifiAwareEventCallbackProxy(WifiAwareManager mgr, Looper looper, Binder binder, final AttachCallback attachCallback, final IdentityChangedListener identityChangedListener) argument
690 WifiAwareDiscoverySessionCallbackProxy(WifiAwareManager mgr, Looper looper, boolean isPublish, DiscoverySessionCallback originalCallback, int clientId) argument
[all...]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/
H A DTelephonyNetworkFactoryTest.java65 final Looper looper; field in class:TelephonyNetworkFactoryTest.TestSetup
72 looper = handlerThread.getLooper();
74 Handler myHandler = new Handler(looper) {
94 phoneSwitcherMock = new PhoneSwitcherMock(numPhones, looper);
102 looper.quit();
109 ts.subscriptionMonitorMock, ts.looper, ts.contextMock, phoneId, ts.dcTrackerMock);
/frameworks/av/media/libstagefright/
H A DSimpleDecodingSource.cpp55 sp<ALooper> looper = new ALooper; local
56 looper->setName("stagefright");
57 looper->start();
69 codec = MediaCodec::CreateByComponentName(looper, componentName);
78 return new SimpleDecodingSource(codec, source, looper,
90 looper->stop();
96 const sp<MediaCodec> &codec, const sp<IMediaSource> &source, const sp<ALooper> &looper,
100 mLooper(looper),
95 SimpleDecodingSource( const sp<MediaCodec> &codec, const sp<IMediaSource> &source, const sp<ALooper> &looper, bool usingSurface, bool isVorbis, const sp<AMessage> &format) argument
/frameworks/base/graphics/java/android/graphics/
H A DSurfaceTexture.java199 // prefer to send the callback on the creating looper or the main looper
201 Looper looper = handler != null ? handler.getLooper() :
203 mOnFrameAvailableHandler = new Handler(looper, null, true /*async*/) {
/frameworks/base/libs/androidfw/
H A DDisplayEventDispatcher.cpp36 DisplayEventDispatcher::DisplayEventDispatcher(const sp<Looper>& looper, argument
38 mLooper(looper), mReceiver(vsyncSource), mWaitingForVsync(false) {
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/
H A DInputConsumerController.java63 public PipInputEventReceiver(InputChannel inputChannel, Looper looper) { argument
64 super(inputChannel, looper, Choreographer.getSfInstance());

Completed in 722 milliseconds

1234567891011>>