/frameworks/base/native/android/ |
D | looper.cpp | 24 using android::Looper; 28 static inline Looper* ALooper_to_Looper(ALooper* alooper) { in ALooper_to_Looper() 29 return reinterpret_cast<Looper*>(alooper); in ALooper_to_Looper() 32 static inline ALooper* Looper_to_ALooper(Looper* looper) { in Looper_to_ALooper() 37 return Looper_to_ALooper(Looper::getForThread().get()); in ALooper_forThread() 41 return Looper_to_ALooper(Looper::prepare(opts).get()); in ALooper_prepare() 53 sp<Looper> looper = Looper::getForThread(); in ALooper_pollOnce() 64 sp<Looper> looper = Looper::getForThread(); in ALooper_pollAll()
|
/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestableLooperTest.java | 33 import android.os.Looper; 132 assertNotEquals(Looper.myLooper(), Looper.getMainLooper()); in testMainLooper() 135 TestableLooper testableLooper = new TestableLooper(Looper.getMainLooper()); in testMainLooper() 142 new Handler(Looper.getMainLooper()).post(r); in testMainLooper() 154 assertNotEquals(Looper.myLooper(), Looper.getMainLooper()); in testNonMainLooperAnnotation() 160 assertEquals(Looper.myLooper(), Looper.getMainLooper()); in testMainLooperAnnotation() 167 assertEquals("Should run on main looper", Looper.getMainLooper(), Looper.myLooper()); in testCorrectLooperExecution() 170 TestableLooper testableLooper = new TestableLooper(Looper.getMainLooper()); in testCorrectLooperExecution() 172 new Handler(Looper.getMainLooper()).post(r); in testCorrectLooperExecution()
|
/frameworks/base/core/java/android/os/ |
D | HandlerThread.java | 31 Looper mLooper; 60 Looper.prepare(); in run() 62 mLooper = Looper.myLooper(); in run() 67 Looper.loop(); in run() 77 public Looper getLooper() { in getLooper() 138 Looper looper = getLooper(); in quit() 165 Looper looper = getLooper(); in quitSafely()
|
D | Looper.java | 57 public final class Looper { class 72 static final ThreadLocal<Looper> sThreadLocal = new ThreadLocal<Looper>(); 74 private static Looper sMainLooper; // guarded by Looper.class 110 sThreadLocal.set(new Looper(quitAllowed)); in prepare() 123 synchronized (Looper.class) { in prepareMainLooper() 134 public static Looper getMainLooper() { in getMainLooper() 135 synchronized (Looper.class) { in getMainLooper() 154 final Looper me = myLooper(); in loop() 286 public static @Nullable Looper myLooper() { in myLooper() 299 private Looper(boolean quitAllowed) { in Looper() method in Looper
|
D | Handler.java | 161 public Handler(@NonNull Looper looper) { in Handler() 172 public Handler(@NonNull Looper looper, @Nullable Callback callback) { in Handler() 224 mLooper = Looper.myLooper(); in Handler() 255 public Handler(@NonNull Looper looper, @Nullable Callback callback, boolean async) { in Handler() 275 public static Handler createAsync(@NonNull Looper looper) { in createAsync() 293 public static Handler createAsync(@NonNull Looper looper, @NonNull Callback callback) { in createAsync() 304 MAIN_THREAD_HANDLER = new Handler(Looper.getMainLooper()); in getMain() 596 if (Looper.myLooper() == mLooper) { in runWithScissors() 759 if (mLooper == Looper.myLooper()) { in executeOrSendMessage() 869 public final Looper getLooper() { in getLooper() [all …]
|
/frameworks/base/tests/testables/src/android/testing/ |
D | TestableLooper.java | 19 import android.os.Looper; 49 private Looper mLooper; 57 public TestableLooper(Looper l) throws Exception { in TestableLooper() 61 private TestableLooper(TestLooperManager wrapper, Looper l) { in TestableLooper() 66 private TestableLooper(Looper looper, boolean b) { in TestableLooper() 70 public Looper getLooper() { in getLooper() 74 private void setupQueue(Looper l) { in setupQueue() 87 if (HOLD_MAIN_THREAD && mLooper == Looper.getMainLooper()) { in destroy() 208 private static TestLooperManager acquireLooperManager(Looper l) { in acquireLooperManager() 209 if (HOLD_MAIN_THREAD && l == Looper.getMainLooper()) { in acquireLooperManager() [all …]
|
D | TestableInstrumentation.java | 19 import android.os.Looper; 85 mMainHandler = Handler.createAsync(Looper.getMainLooper()); in MainLooperManager() 159 mManager = acquireLooperManager(Looper.getMainLooper()); in startManaging() 177 if (Looper.myLooper() != Looper.getMainLooper()) { in startManaging()
|
/frameworks/native/cmds/servicemanager/ |
D | main.cpp | 30 using ::android::Looper; 41 static sp<BinderCallback> setupTo(const sp<Looper>& looper) { in setupTo() 53 Looper::POLL_CALLBACK, in setupTo() 54 Looper::EVENT_INPUT, in setupTo() 71 …static sp<ClientCallbackCallback> setupTo(const sp<Looper>& looper, const sp<ServiceManager>& mana… in setupTo() 92 Looper::POLL_CALLBACK, in setupTo() 93 Looper::EVENT_INPUT, in setupTo() 135 sp<Looper> looper = Looper::prepare(false /*allowNonCallbacks*/); in main()
|
/frameworks/base/core/jni/ |
D | android_os_MessageQueue.cpp | 80 mLooper = Looper::getForThread(); in NativeMessageQueue() 82 mLooper = new Looper(false); in NativeMessageQueue() 83 Looper::setForThread(mLooper); in NativeMessageQueue() 129 looperEvents |= Looper::EVENT_INPUT; in setFileDescriptorEvents() 132 looperEvents |= Looper::EVENT_OUTPUT; in setFileDescriptorEvents() 134 mLooper->addFd(fd, Looper::POLL_CALLBACK, looperEvents, this, in setFileDescriptorEvents() 143 if (looperEvents & Looper::EVENT_INPUT) { in handleEvent() 146 if (looperEvents & Looper::EVENT_OUTPUT) { in handleEvent() 149 if (looperEvents & (Looper::EVENT_ERROR | Looper::EVENT_HANGUP | Looper::EVENT_INVALID)) { in handleEvent()
|
/frameworks/native/services/displayservice/ |
D | DisplayEventReceiver.cpp | 32 sp<Looper> getLooper() { in getLooper() 33 static sp<Looper> looper = []() { in getLooper() 34 sp<Looper> looper = new Looper(false /* allowNonCallbacks */); in getLooper() 51 Looper::POLL_CALLBACK, in AttachedEvent() 52 Looper::EVENT_INPUT, in AttachedEvent() 82 if (events & (Looper::EVENT_ERROR | Looper::EVENT_HANGUP)) { in handleEvent() 87 if (!(events & Looper::EVENT_INPUT)) { in handleEvent()
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | TestHandlerThread.java | 23 private Looper mLooper; 56 public Looper getLooper() { in getLooper() 77 Looper.prepare(); in run() 78 mLooper = Looper.myLooper(); in run() 80 Looper.loop(); in run()
|
D | HandlerTester.java | 57 Looper.prepare(); in run() 58 mLooper = Looper.myLooper(); in run() 60 Looper.loop(); in run() 83 private Looper mLooper;
|
/frameworks/base/core/jni/include/android_runtime/ |
D | android_view_InputQueue.h | 39 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, 73 Vector<Looper*> mAppLoopers; 74 sp<Looper> mDispatchLooper;
|
/frameworks/base/core/java/com/android/internal/view/ |
D | WindowManagerPolicyThread.java | 20 import android.os.Looper; 28 static Looper mLooper; 30 public static void set(Thread thread, Looper looper) { in set() 40 public static Looper getLooper() { in getLooper()
|
/frameworks/base/libs/hwui/thread/ |
D | ThreadBase.h | 36 , mLooper(new Looper(false)) in ThreadBase() 65 LOG_ALWAYS_FATAL_IF(result == Looper::POLL_ERROR, "RenderThread Looper POLL_ERROR!"); in waitForWork() 71 Looper::setForThread(mLooper); in threadLoop() 76 Looper::setForThread(nullptr); in threadLoop() 80 sp<Looper> mLooper;
|
/frameworks/native/services/surfaceflinger/Scheduler/ |
D | MessageQueue.cpp | 84 mLooper = new Looper(true); in init() 102 mLooper->addFd(mEventTube.getFd(), 0, Looper::EVENT_INPUT, MessageQueue::cb_eventReceiver, in setEventThread() 113 mLooper->addFd(mEventTube.getFd(), 0, Looper::EVENT_INPUT, MessageQueue::cb_eventReceiver, in setEventConnection() 122 case Looper::POLL_WAKE: in waitMessage() 123 case Looper::POLL_CALLBACK: in waitMessage() 125 case Looper::POLL_ERROR: in waitMessage() 128 case Looper::POLL_TIMEOUT: in waitMessage()
|
/frameworks/base/media/java/android/media/ |
D | MediaSync.java | 25 import android.os.Looper; 197 private Looper mAudioLooper = null; 258 Looper looper; in setCallback() 259 if ((looper = Looper.myLooper()) == null) { in setCallback() 260 looper = Looper.getMainLooper(); in setCallback() 291 Looper looper; in setOnErrorListener() 292 if ((looper = Looper.myLooper()) == null) { in setOnErrorListener() 293 looper = Looper.getMainLooper(); in setOnErrorListener() 618 Looper.prepare(); in createAudioThread() 620 mAudioLooper = Looper.myLooper(); in createAudioThread() [all …]
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/ |
D | CameraTestThread.java | 21 import android.os.Looper; 34 private Looper mLooper = null; 51 Looper.prepare(); in start() 54 mLooper = Looper.myLooper(); in start() 57 Looper.loop(); in start()
|
/frameworks/base/tests/utils/testutils/java/android/os/test/ |
D | TestLooper.java | 23 import android.os.Looper; 41 protected final Looper mLooper; 43 private static final Constructor<Looper> LOOPER_CONSTRUCTOR; 55 LOOPER_CONSTRUCTOR = Looper.class.getDeclaredConstructor(Boolean.TYPE); 57 THREAD_LOCAL_LOOPER_FIELD = Looper.class.getDeclaredField("sThreadLocal"); 77 ThreadLocal<Looper> threadLocalLooper = (ThreadLocal<Looper>) THREAD_LOCAL_LOOPER_FIELD in TestLooper() 85 public Looper getLooper() { in getLooper()
|
/frameworks/base/graphics/java/android/graphics/ |
D | SurfaceTexture.java | 22 import android.os.Looper; 71 private final Looper mCreatorLooper; 139 mCreatorLooper = Looper.myLooper(); in SurfaceTexture() 166 mCreatorLooper = Looper.myLooper(); in SurfaceTexture() 206 Looper looper = handler != null ? handler.getLooper() : in setOnFrameAvailableListener() 207 mCreatorLooper != null ? mCreatorLooper : Looper.getMainLooper(); in setOnFrameAvailableListener()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/ |
D | Assert.java | 19 import android.os.Looper; 29 public static Looper sMainLooper = Looper.getMainLooper();
|
/frameworks/base/libs/androidfw/ |
D | DisplayEventDispatcher.cpp | 36 DisplayEventDispatcher::DisplayEventDispatcher(const sp<Looper>& looper, in DisplayEventDispatcher() 50 int rc = mLooper->addFd(mReceiver.getFd(), 0, Looper::EVENT_INPUT, in initialize() 91 if (events & (Looper::EVENT_ERROR | Looper::EVENT_HANGUP)) { in handleEvent() 97 if (!(events & Looper::EVENT_INPUT)) { in handleEvent()
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/ |
D | InputChannelCompat.java | 20 import android.os.Looper; 47 Looper looper, Choreographer choreographer, InputEventListener listener) { in fromBundle() 74 public InputEventReceiver(InputChannel inputChannel, Looper looper, in InputEventReceiver() 104 public InputEventDispatcher(InputChannel inputChannel, Looper looper) { in InputEventDispatcher()
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | LooperAcceleration.java | 25 import android.os.Looper; 78 Looper.prepare(); in onCreate() 87 Looper.myLooper().quit(); in onCreate() 92 Looper.loop(); in onCreate()
|
/frameworks/base/apct-tests/perftests/autofill/src/android/view/autofill/ |
D | AbstractAutofillPerfTestCase.java | 21 import android.os.Looper; 68 Looper.getMainLooper().getThread() == Thread.currentThread()); in prepareActivity() 70 Looper.myLooper() == Looper.getMainLooper()); in prepareActivity()
|