Home
last modified time | relevance | path

Searched refs:getMainLooper (Results 1 – 25 of 291) sorted by relevance

12345678910>>...12

/frameworks/base/tests/testables/tests/src/android/testing/
DTestableLooperTest.java131 assertNotEquals(Looper.myLooper(), Looper.getMainLooper()); in testMainLooper()
134 TestableLooper testableLooper = new TestableLooper(Looper.getMainLooper()); in testMainLooper()
141 new Handler(Looper.getMainLooper()).post(r); in testMainLooper()
153 assertNotEquals(Looper.myLooper(), Looper.getMainLooper()); in testNonMainLooperAnnotation()
159 assertEquals(Looper.myLooper(), Looper.getMainLooper()); in testMainLooperAnnotation()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DAssert.java27 if (!Looper.getMainLooper().isCurrentThread()) { in isMainThread()
33 if (Looper.getMainLooper().isCurrentThread()) { in isNotMainThread()
/frameworks/base/tests/testables/src/android/testing/
DTestableInstrumentation.java80 mMainHandler = new Handler(Looper.getMainLooper()); in MainLooperManager()
154 mManager = acquireLooperManager(Looper.getMainLooper()); in startManaging()
172 if (Looper.myLooper() != Looper.getMainLooper()) { in startManaging()
DTestableLooper.java80 if (mLooper == Looper.getMainLooper()) { in destroy()
202 if (l == Looper.getMainLooper()) { in acquireLooperManager()
228 mLooper = setAsMain ? Looper.getMainLooper() : createLooper(); in LooperFrameworkMethod()
294 if (mLooper == Looper.getMainLooper()) { in invokeExplosively()
/frameworks/support/app-toolkit/runtime/src/main/java/android/arch/core/executor/
DDefaultTaskExecutor.java48 mMainHandler = new Handler(Looper.getMainLooper()); in postToMainThread()
58 return Looper.getMainLooper().getThread() == Thread.currentThread(); in isMainThread()
/frameworks/data-binding/integration-tests/TestApp/app/src/androidTest/java/android/databinding/testapp/
DBaseDataBinderTest.java51 return Looper.myLooper() == Looper.getMainLooper(); in isMainThread()
64 if (Looper.myLooper() == Looper.getMainLooper()) { in runTestOnUiThread()
76 if (Looper.myLooper() != Looper.getMainLooper()) { in initBinder()
/frameworks/base/services/core/java/com/android/server/twilight/
DTwilightService.java76 mHandler = new Handler(Looper.getMainLooper(), this); in TwilightService()
158 null /* default */, this, Looper.getMainLooper()); in startListening()
164 LocationManager.NETWORK_PROVIDER, this, Looper.getMainLooper()); in startListening()
167 LocationManager.GPS_PROVIDER, this, Looper.getMainLooper()); in startListening()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsStateTest.java130 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testReadWrite()
142 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testReadWrite()
169 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testUpgrade()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImplTest.java105 TestableLooper mainLooper = new TestableLooper(Looper.getMainLooper()); in testAsyncBondState()
126 TestableLooper mainLooper = new TestableLooper(Looper.getMainLooper()); in testAsyncConnectionState()
149 TestableLooper mainLooper = new TestableLooper(Looper.getMainLooper()); in testNullAsync_DoesNotCrash()
/frameworks/base/apct-tests/perftests/core/src/android/widget/
DTextViewAutoSizeLayoutPerfTest.java83 Looper.getMainLooper().getThread() == Thread.currentThread()); in testConstruction()
85 Looper.myLooper() == Looper.getMainLooper()); in testConstruction()
DLayoutPerfTest.java84 Looper.getMainLooper().getThread() == Thread.currentThread()); in testLayoutPerf()
86 Looper.myLooper() == Looper.getMainLooper()); in testLayoutPerf()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/
DThreadUtils.java28 sMainThread = Looper.getMainLooper().getThread(); in isMainThread()
/frameworks/base/wifi/java/android/net/wifi/aware/
DWifiAwareSession.java141 mgr.publish(mClientId, (handler == null) ? Looper.getMainLooper() : handler.getLooper(), in publish()
187 mgr.subscribe(mClientId, (handler == null) ? Looper.getMainLooper() : handler.getLooper(), in subscribe()
/frameworks/base/core/java/android/bluetooth/le/
DBluetoothLeScanner.java95 mHandler = new Handler(Looper.getMainLooper()); in BluetoothLeScanner()
474 Handler handler = new Handler(Looper.getMainLooper()); in onScanResult()
485 Handler handler = new Handler(Looper.getMainLooper()); in onBatchScanResults()
506 Handler handler = new Handler(Looper.getMainLooper()); in onFoundOrLost()
/frameworks/layoutlib/bridge/src/android/view/inputmethod/
DInputMethodManager_Delegate.java43 new BridgeIInputMethodManager(), Looper.getMainLooper()); in getInstance()
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/util/
DThreadUtilTest.java177 assertThat(Looper.myLooper(), sameInstance(Looper.getMainLooper())); in assertMainThread()
181 assertThat(Looper.myLooper(), not(Looper.getMainLooper())); in assertBackgroundThread()
/frameworks/base/tests/ServiceCrashTest/src/com/android/tests/servicecrashtest/
DCrashingService.java48 mServiceHandler = new ServiceHandler(Looper.getMainLooper()); in onCreate()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DDropBoxTest.java84 Looper.getMainLooper()); in testAddText()
121 Looper.getMainLooper());
172 Looper.getMainLooper());
239 Looper.getMainLooper()); in testAddEntriesInTheFuture()
291 Looper.getMainLooper()); in testIsTagEnabled()
325 Looper.getMainLooper()); in testGetNextEntry()
388 Looper.getMainLooper()); in testSizeLimits()
483 Looper.getMainLooper()); in testAgeLimits()
515 Looper.getMainLooper()); in testFileCountLimits()
569 Looper.getMainLooper()); in testCreateDropBoxManagerWithInvalidDirectory()
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DKeyguardMessageAreaTest.java37 private Handler mHandler = new Handler(Looper.getMainLooper());
/frameworks/support/room/integration-tests/testapp/src/androidTest/java/android/arch/persistence/room/integration/testapp/test/
DInvalidationTest.java73 Handler mHandler = new Handler(Looper.getMainLooper()); in setSingleThreadedIO()
87 return Thread.currentThread() == Looper.getMainLooper().getThread(); in setSingleThreadedIO()
/frameworks/base/test-runner/src/android/test/
DLoaderTestCase.java77 final Handler mainThreadHandler = new Handler(Looper.getMainLooper()) { in getLoaderResultSynchronously()
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiManagerTest.java348 verify(mContext, never()).getMainLooper(); in testCorrectLooperIsUsedForHandler()
359 when(mContext.getMainLooper()).thenReturn(altLooper.getLooper()); in testMainLooperIsUsedWhenHandlerNotProvided()
367 verify(mContext).getMainLooper(); in testMainLooperIsUsedWhenHandlerNotProvided()
642 verify(mContext, never()).getMainLooper(); in testCorrectLooperIsUsedForObserverHandler()
653 when(mContext.getMainLooper()).thenReturn(altLooper.getLooper()); in testMainLooperIsUsedWhenHandlerNotProvidedForObserver()
659 verify(mContext).getMainLooper(); in testMainLooperIsUsedWhenHandlerNotProvidedForObserver()
/frameworks/support/design/tests/src/android/support/design/testutils/
DActivityUtils.java52 if (Looper.getMainLooper() == Looper.myLooper()) { in runOnUiThreadRethrow()
/frameworks/base/tests/LockTaskTests/src/com/google/android/example/locktasktests/
DLaunchActivity.java53 mHandler = new Handler(Looper.getMainLooper()); in onCreate()
/frameworks/base/core/java/android/print/
DPrinterDiscoverySession.java68 mHandler = new SessionHandler(context.getMainLooper()); in PrinterDiscoverySession()
262 if (!Looper.getMainLooper().isCurrentThread()) { in throwIfNotCalledOnMainThread()

12345678910>>...12