Home
last modified time | relevance | path

Searched refs:Looper (Results 1 – 25 of 188) sorted by relevance

12345678

/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowLooper.java8 import android.os.Looper;
30 @Implements(Looper.class)
39 …private static Map<Thread, Looper> loopingLoopers = Collections.synchronizedMap(new WeakHashMap<Th…
41 private static Looper mainLooper;
43 private @RealObject Looper realObject;
56 for (Looper looper : loopingLoopers.values()) { in resetThreadLoopers()
78 invokeConstructor(Looper.class, realObject, from(boolean.class, quitAllowed)); in __constructor__()
88 protected static Looper getMainLooper() { in getMainLooper()
93 protected static Looper myLooper() { in myLooper()
99 shadowOf(Looper.myLooper()).doLoop(); in loop()
[all …]
DShadowChoreographer.java4 import android.os.Looper;
27 private Handler handler = new Handler(Looper.myLooper());
35 Looper looper = Looper.myLooper(); in makeThreadLocal()
42 Choreographer.class.getDeclaredConstructor(Looper.class); in makeThreadLocal()
43 … return Shadow.newInstance(Choreographer.class, new Class[]{Looper.class}, new Object[]{looper}); in makeThreadLocal()
45 …return Shadow.newInstance(Choreographer.class, new Class[]{Looper.class, int.class}, new Object[]{… in makeThreadLocal()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowLooperTest.java11 import android.os.Looper;
48 private Looper looper;
57 Looper.prepare(); in run()
58 looper = Looper.myLooper(); in run()
60 Looper.loop(); in run()
74 assertThat(Looper.myLooper()).isSameInstanceAs(Looper.getMainLooper()); in mainLooper_andMyLooper_shouldBeSame_onMainThread()
80 assertThat(ht.getLooper()).isNotSameInstanceAs(Looper.getMainLooper()); in differentThreads_getDifferentLoopers()
85 assertThat(Looper.getMainLooper().getThread()).isSameInstanceAs(Thread.currentThread()); in mainLooperThread_shouldBeTestThread()
90 … assertThat(ShadowLooper.getShadowMainLooper()).isSameInstanceAs(shadowOf(Looper.getMainLooper())); in shadowMainLooper_shouldBeShadowOfMainLooper()
101 …assertThat(ShadowLooper.getLooperForThread(Thread.currentThread())).isSameInstanceAs(Looper.getMai… in getLooperForThread_returnsLooperForMainThread()
[all …]
/external/kotlinx.coroutines/ui/kotlinx-coroutines-android/test/
DHandlerDispatcherTest.kt34 val mainMessageQueue = shadowOf(Looper.getMainLooper().queue) in <lambda>()
49 val main = Looper.getMainLooper().asHandler(async = true).asCoroutineDispatcher() in <lambda>()
53 val mainMessageQueue = shadowOf(Looper.getMainLooper().queue) in <lambda>()
68 val main = Looper.getMainLooper().asHandler(async = true).asCoroutineDispatcher() in <lambda>()
72 val mainMessageQueue = shadowOf(Looper.getMainLooper().queue) in <lambda>()
87 val main = Looper.getMainLooper().asHandler(async = true).asCoroutineDispatcher() in <lambda>()
91 val mainMessageQueue = shadowOf(Looper.getMainLooper().queue) in <lambda>()
106 val main = Looper.getMainLooper().asHandler(async = false).asCoroutineDispatcher() in <lambda>()
110 val mainMessageQueue = shadowOf(Looper.getMainLooper().queue) in <lambda>()
124 val main = Looper.getMainLooper().asHandler(async = true).asCoroutineDispatcher("testName") in testToString()
[all …]
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/android/internal/
DLocalUiController.java11 import android.os.Looper;
37 checkState(Looper.myLooper() == Looper.getMainLooper(), "Expecting to be on main thread!"); in injectMotionEvent()
51 checkState(Looper.myLooper() == Looper.getMainLooper(), "Expecting to be on main thread!"); in injectKeyEvent()
65 checkState(Looper.myLooper() == Looper.getMainLooper(), "Expecting to be on main thread!"); in injectString()
141 shadowOf(Looper.getMainLooper()).idle(); in loopMainThreadUntilIdle()
146 shadowOf(Looper.getMainLooper()).idle(millisDelay, TimeUnit.MILLISECONDS); in loopMainThreadForAtLeast()
/external/androidplot/AndroidPlot-Core/src/test/java/com/androidplot/mock/
DMockLooper.java3 import android.os.Looper;
13 @MockClass(realClass = Looper.class)
17 public static Looper myLooper() { in myLooper()
22 public static Looper getMainLooper() { in getMainLooper()
/external/exoplayer/tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/
DTestExoPlayer.java22 import android.os.Looper;
63 Assertions.checkNotNull(clazz.getDeclaredMethod("shadowOf", Looper.class));
65 Assertions.checkNotNull(shadowOfMethod.invoke(new Object(), Looper.getMainLooper()));
84 private @MonotonicNonNull Looper looper;
92 @Nullable Looper myLooper = Looper.myLooper(); in Builder()
239 public Builder setLooper(Looper looper) { in setLooper()
249 public Looper getLooper() { in getLooper()
488 if (Looper.myLooper() != Looper.getMainLooper() in verifyMainTestThread()
489 || player.getApplicationLooper() != Looper.getMainLooper()) { in verifyMainTestThread()
495 if (Looper.myLooper() != Looper.getMainLooper()) { in verifyMainTestThread()
DMediaSourceTestRunner.java24 import android.os.Looper;
76 Looper playbackLooper = playbackThread.getLooper(); in MediaSourceTestRunner()
352 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onSourceInfoRefreshed()
360 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onMediaPeriodCreated()
366 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onMediaPeriodReleased()
376 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onLoadStarted()
385 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onLoadCompleted()
395 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onLoadCanceled()
406 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onLoadError()
411 Assertions.checkState(Looper.myLooper() == playbackThread.getLooper()); in onReadingStarted()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/
DEngineResource.java3 import android.os.Looper;
77 if (!Looper.getMainLooper().equals(Looper.myLooper())) { in acquire()
96 if (!Looper.getMainLooper().equals(Looper.myLooper())) { in release()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/telephony/
DTelephonyStateListeners.java19 import android.os.Looper;
62 public CallStateChangeListener(EventFacade ef, int subId, Looper looper) { in CallStateChangeListener()
127 public DataConnectionRealTimeInfoChangeListener(EventFacade ef, int subId, Looper looper) { in DataConnectionRealTimeInfoChangeListener()
166 EventFacade ef, TelephonyManager tm, int subId, Looper looper) { in DataConnectionStateChangeListener()
207 EventFacade ef, TelephonyManager tm, int subId, Looper looper) { in ActiveDataSubIdChangeListener()
244 EventFacade ef, TelephonyManager tm, int subId, Looper looper) { in DisplayInfoStateChangeListener()
278 public ServiceStateChangeListener(EventFacade ef, int subId, Looper looper) { in ServiceStateChangeListener()
308 public CellInfoChangeListener(EventFacade ef, int subId, Looper looper) { in CellInfoChangeListener()
335 public SrvccStateChangeListener(EventFacade ef, int subId, Looper looper) { in SrvccStateChangeListener()
365 public VoiceMailStateChangeListener(EventFacade ef, int subId, Looper looper) { in VoiceMailStateChangeListener()
[all …]
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/source/ads/
DAdsMediaSourceTest.java28 import android.os.Looper;
106 shadowOf(Looper.getMainLooper()).idle(); in setUp()
112 shadowOf(Looper.getMainLooper()).idle(); in setUp()
126 shadowOf(Looper.getMainLooper()).idle(); in createPeriod_preparesChildAdMediaSourceAndRefreshesSourceInfo()
146 shadowOf(Looper.getMainLooper()).idle(); in createPeriod_preparesChildAdMediaSourceAndRefreshesSourceInfoWithAdMediaSourceInfo()
168 shadowOf(Looper.getMainLooper()).idle(); in createPeriod_createsChildPrerollAdMediaPeriod()
177 shadowOf(Looper.getMainLooper()).idle(); in createPeriod_createsChildContentMediaPeriod()
200 shadowOf(Looper.getMainLooper()).idle(); in releasePeriod_releasesChildMediaPeriodsAndSources()
212 shadowOf(Looper.getMainLooper()).idle(); in releasePeriod_releasesChildMediaPeriodsAndSources()
/external/libchrome/base/test/android/java/src/org/chromium/base/
DTestUiThread.java7 import android.os.Looper;
37 Looper.prepare(); in loop()
38 ThreadUtils.setUiThread(Looper.myLooper()); in loop()
40 Looper.loop(); in loop()
/external/libchrome/base/android/java/src/org/chromium/base/
DThreadUtils.java8 import android.os.Looper;
36 public static void setUiThread(Looper looper) { in setUiThread()
46 + Looper.getMainLooper() + "), cannot set to new looper " + looper); in setUiThread()
59 sUiThreadHandler = new Handler(Looper.getMainLooper()); in getUiThreadHandler()
244 return getUiThreadHandler().getLooper() == Looper.myLooper(); in runningOnUiThread()
247 public static Looper getUiThreadLooper() { in getUiThreadLooper()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/drm/
DDrmSessionManager.java18 import android.os.Looper;
43 Looper playbackLooper,
99 default DrmSession acquirePlaceholderSession(Looper playbackLooper, int trackType) { in acquirePlaceholderSession()
116 Looper playbackLooper, in acquireSession()
/external/volley/src/main/java/com/android/volley/toolbox/
DThreads.java3 import android.os.Looper;
9 if (Looper.myLooper() != Looper.getMainLooper()) { in throwIfNotOnMainThread()
/external/kotlinx.coroutines/ui/kotlinx-coroutines-android/src/
DHandlerDispatcher.kt55 HandlerContext(Looper.getMainLooper().asHandler(async = true)) in createDispatcher()
75 internal fun Looper.asHandler(async: Boolean): Handler { in createDispatcher()
83 val factoryMethod = Handler::class.java.getDeclaredMethod("createAsync", Looper::class.java) in createDispatcher()
89 constructor = Handler::class.java.getDeclaredConstructor(Looper::class.java, in createDispatcher()
100 internal val Main: HandlerDispatcher? = runCatching { HandlerContext(Looper.getMainLooper().asHandl… in <lambda>()
128 return !invokeImmediately || Looper.myLooper() != handler.looper in isDispatchNeeded()
/external/kotlinx.coroutines/integration/kotlinx-coroutines-play-services/test/
DFakeAndroid.kt6 class Handler(val looper: Looper) {
13 class Looper { class
16 fun getMainLooper() = Looper()
/external/libchrome/base/test/android/javatests/src/org/chromium/base/test/util/
DTestThread.java8 import android.os.Looper;
60 Looper.prepare(); in run()
71 Looper.loop(); in run()
141 assert Looper.myLooper() == mMainThreadHandler.getLooper(); in checkOnMainThread()
/external/setupcompat/main/java/com/google/android/setupcompat/internal/
DPreconditions.java18 import android.os.Looper;
59 if (Looper.myLooper() == Looper.getMainLooper()) { in ensureOnMainThread()
/external/sl4a/InterpreterForAndroid/src/com/googlecode/android_scripting/
DInterpreterInstaller.java23 import android.os.Looper;
111 Looper.myLooper().quit();
114 Looper.myLooper().quit();
146 Looper.myLooper().quit();
221 if (Looper.myLooper() == null) { in executeInBackground()
222 Looper.prepare(); in executeInBackground()
224 mBackgroundHandler = new Handler(Looper.myLooper()); in executeInBackground()
226 Looper.loop(); in executeInBackground()
/external/connectedappssdk/tests/robotests/src/test/java/com/google/android/enterprise/connectedapps/robotests/
DIfAvailableTest.java26 import android.os.Looper;
134 shadowOf(Looper.getMainLooper()).idle(); in callback_available_makesCall()
144 shadowOf(Looper.getMainLooper()).idle(); in voidCallback_notAvailable_callsBack()
154 shadowOf(Looper.getMainLooper()).idle(); in voidCallback_available_callsBack()
169 shadowOf(Looper.getMainLooper()).idle(); in future_notAvailable_setsDefaultValue()
183 shadowOf(Looper.getMainLooper()).idle(); in future_available_setsCorrectValue()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/
DExoPlayerFactory.java19 import android.os.Looper;
156 Looper looper) { in newSimpleInstance()
175 Looper looper) { in newSimpleInstance()
196 Looper looper) { in newSimpleInstance()
234 Looper looper) { in newInstance()
252 Looper looper) { in newInstance()
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/util/
DMediaSourceEventDispatcherTest.java27 import android.os.Looper;
92 new Handler(Looper.getMainLooper()), in sameListenerInstanceCanBeRegisteredWithTwoTypes()
96 new Handler(Looper.getMainLooper()), in sameListenerInstanceCanBeRegisteredWithTwoTypes()
115 new Handler(Looper.getMainLooper()), in listenerOnlyReceivesEventsForRegisteredType()
133 new Handler(Looper.getMainLooper()), subclassListener, MediaSourceEventListener.class); in listenerDoesntReceiveEventsDispatchedToSubclass()
146 new Handler(Looper.getMainLooper()), subclassListener, SubclassListener.class); in listenerDoesntReceiveEventsDispatchedToSuperclass()
/external/exoplayer/tree/extensions/opus/src/androidTest/java/com/google/android/exoplayer2/ext/opus/
DOpusPlaybackTest.java22 import android.os.Looper;
88 Looper.prepare(); in run()
99 Looper.loop(); in run()
112 Looper.myLooper().quit(); in onPlaybackStateChanged()
/external/ims/rcs/presencepolling/tests/src/com/android/service/ims/presence/
DPresencePollingTestBase.java24 import android.os.Looper;
49 if (Looper.myLooper() == null) { in setUp()
50 Looper.prepare(); in setUp()

12345678