/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/packages/SystemUI/src/com/android/systemui/util/concurrency/ |
D | SysUIConcurrencyModule.java | 23 import android.os.Looper; 48 public static Looper provideBgLooper() { in provideBgLooper() 59 public static Looper provideBroadcastRunningLooper() { in provideBroadcastRunningLooper() 70 public static Looper provideLongRunningLooper() { in provideLongRunningLooper() 84 public static Handler provideBgHandler(@Background Looper bgLooper) { in provideBgHandler() 93 public static Executor provideExecutor(@Background Looper looper) { in provideExecutor() 103 public static Executor provideBroadcastRunningExecutor(@BroadcastRunning Looper looper) { in provideBroadcastRunningExecutor() 113 public static Executor provideLongRunningExecutor(@LongRunning Looper looper) { in provideLongRunningExecutor() 124 @LongRunning Looper looper) { in provideLongRunningDelayableExecutor() 134 public static Executor provideBackgroundExecutor(@Background Looper looper) { in provideBackgroundExecutor() [all …]
|
D | GlobalConcurrencyModule.java | 21 import android.os.Looper; 51 public static Looper provideMainLooper() { in provideMainLooper() 52 return Looper.getMainLooper(); in provideMainLooper() 62 public static Handler provideMainHandler(@Main Looper mainLooper) { in provideMainHandler() 103 public static DelayableExecutor provideMainDelayableExecutor(@Main Looper looper) { in provideMainDelayableExecutor()
|
D | ThreadFactory.java | 20 import android.os.Looper; 38 Looper buildLooperOnNewThread(String threadName); in buildLooperOnNewThread() 72 DelayableExecutor buildDelayableExecutorOnLooper(Looper looper); in buildDelayableExecutorOnLooper()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ |
D | RecordingControllerTest.java | 30 import android.os.Looper; 98 if (Looper.myLooper() == null) { in testCancelCountdown() 99 Looper.prepare(); in testCancelCountdown() 118 if (Looper.myLooper() == null) { in testStartRecording() 119 Looper.prepare(); in testStartRecording() 132 if (Looper.myLooper() == null) { in testStopRecording() 133 Looper.prepare(); in testStopRecording() 163 if (Looper.myLooper() == null) { in testUpdateStateBroadcast() 164 Looper.prepare(); in testUpdateStateBroadcast() 192 if (Looper.myLooper() == null) { in testUserChange() [all …]
|
/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 116 sThreadLocal.set(new Looper(quitAllowed)); in prepare() 129 synchronized (Looper.class) { in prepareMainLooper() 140 public static Looper getMainLooper() { in getMainLooper() 141 synchronized (Looper.class) { in getMainLooper() 159 private static boolean loopOnce(final Looper me, in loopOnce() 261 final Looper me = myLooper(); in loop() 311 public static @Nullable Looper myLooper() { in myLooper() [all …]
|
/frameworks/native/cmds/servicemanager/ |
D | main.cpp | 30 using ::android::Looper; 41 static sp<BinderCallback> setupTo(const sp<Looper>& looper) { in setupTo() 49 Looper::POLL_CALLBACK, in setupTo() 50 Looper::EVENT_INPUT, in setupTo() 67 …static sp<ClientCallbackCallback> setupTo(const sp<Looper>& looper, const sp<ServiceManager>& mana… in setupTo() 88 Looper::POLL_CALLBACK, in setupTo() 89 Looper::EVENT_INPUT, in setupTo() 136 sp<Looper> looper = Looper::prepare(false /*allowNonCallbacks*/); in main()
|
/frameworks/base/tests/testables/src/android/testing/ |
D | TestableLooper.java | 19 import android.os.Looper; 53 private Looper mLooper; 74 public TestableLooper(Looper l) throws Exception { in TestableLooper() 78 private TestableLooper(TestLooperManager wrapper, Looper l) { in TestableLooper() 83 private TestableLooper(Looper looper, boolean b) { in TestableLooper() 87 public Looper getLooper() { in getLooper() 91 private void setupQueue(Looper l) { in setupQueue() 104 if (HOLD_MAIN_THREAD && mLooper == Looper.getMainLooper()) { in destroy() 252 private static TestLooperManager acquireLooperManager(Looper l) { in acquireLooperManager() 253 if (HOLD_MAIN_THREAD && l == Looper.getMainLooper()) { in acquireLooperManager() [all …]
|
/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/packages/SystemUI/tests/utils/src/com/android/systemui/util/concurrency/ |
D | FakeThreadFactory.java | 20 import android.os.Looper; 30 private Looper mLooper; 40 public void setLooper(Looper looper) { in setLooper() 45 public Looper buildLooperOnNewThread(String threadName) { in buildLooperOnNewThread() 70 public DelayableExecutor buildDelayableExecutorOnLooper(Looper looper) { in buildDelayableExecutorOnLooper()
|
/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/tests/testables/tests/src/android/testing/ |
D | TestableLooperTest.java | 37 import android.os.Looper; 136 assertNotEquals(Looper.myLooper(), Looper.getMainLooper()); in testMainLooper() 139 TestableLooper testableLooper = new TestableLooper(Looper.getMainLooper()); in testMainLooper() 146 new Handler(Looper.getMainLooper()).post(r); in testMainLooper() 158 assertNotEquals(Looper.myLooper(), Looper.getMainLooper()); in testNonMainLooperAnnotation() 164 assertEquals(Looper.myLooper(), Looper.getMainLooper()); in testMainLooperAnnotation() 171 assertEquals("Should run on main looper", Looper.getMainLooper(), Looper.myLooper()); in testCorrectLooperExecution() 174 TestableLooper testableLooper = new TestableLooper(Looper.getMainLooper()); in testCorrectLooperExecution() 176 new Handler(Looper.getMainLooper()).post(r); in testCorrectLooperExecution()
|
/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/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/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/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/packages/SystemUI/customization/src/com/android/systemui/util/ |
D | Assert.java | 19 import android.os.Looper; 27 private static final Looper sMainLooper = Looper.getMainLooper(); 31 public static void setTestableLooper(Looper testLooper) { in setTestableLooper()
|
/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/services/core/java/com/android/server/vcn/ |
D | VcnContext.java | 21 import android.os.Looper; 32 @NonNull private final Looper mLooper; 38 @NonNull Looper looper, in VcnContext() 53 public Looper getLooper() { in getLooper()
|
/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; 57 LOOPER_CONSTRUCTOR = Looper.class.getDeclaredConstructor(Boolean.TYPE); 59 THREAD_LOCAL_LOOPER_FIELD = Looper.class.getDeclaredField("sThreadLocal"); 96 ThreadLocal<Looper> threadLocalLooper = (ThreadLocal<Looper>) THREAD_LOCAL_LOOPER_FIELD in TestLooper() 106 public Looper getLooper() { in getLooper()
|
/frameworks/base/services/core/java/com/android/server/soundtrigger_middleware/ |
D | UptimeTimer.java | 21 import android.os.Looper; 62 Looper.prepare(); in threadFunc() 64 mHandler = new Handler(Looper.myLooper()); in threadFunc() 67 Looper.loop(); in threadFunc()
|
/frameworks/base/graphics/java/android/graphics/ |
D | SurfaceTexture.java | 25 import android.os.Looper; 74 private final Looper mCreatorLooper; 142 mCreatorLooper = Looper.myLooper(); in SurfaceTexture() 169 mCreatorLooper = Looper.myLooper(); in SurfaceTexture() 209 Looper looper = handler != null ? handler.getLooper() : in setOnFrameAvailableListener() 210 mCreatorLooper != null ? mCreatorLooper : Looper.getMainLooper(); in setOnFrameAvailableListener()
|