Home
last modified time | relevance | path

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

12345678910>>...15

/frameworks/base/tests/testables/tests/src/android/testing/
DTestableLooperTest.java132 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/services/tests/servicestests/src/com/android/server/lights/
DLightsServiceTest.java91 LightsService service = new LightsService(mContext, mHal, Looper.getMainLooper()); in testGetLights_filtersSystemLights()
100 LightsService service = new LightsService(mContext, mHal, Looper.getMainLooper()); in testControlMultipleLights()
122 LightsService service = new LightsService(mContext, mHal, Looper.getMainLooper()); in testControlLights_onlyEffectiveForLifetimeOfClient()
143 LightsService service = new LightsService(mContext, mHal, Looper.getMainLooper()); in testControlLights_firstCallerWinsContention()
169 LightsService service = new LightsService(mContext, mHal, Looper.getMainLooper()); in testClearLight()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/remote/
DRemoteCallTest.java142 runToEndOfTasks(Looper.getMainLooper()); in testCall_whenTimesOutBeforeCallbackIsCalled_returnsTimeOut()
154 runToEndOfTasks(Looper.getMainLooper()); in testCall_whenTimesOutBeforeCancelIsCalled_returnsTimeOut()
174 runToEndOfTasks(Looper.getMainLooper()); in testCall_whenCallbackIsCalledBeforeTimeOut_returnsResult()
217 runToEndOfTasks(Looper.getMainLooper()); in testCall_whenCancelIsCalledBeforeTimeOutButAfterCall_returnsCancel()
248 runToEndOfTasks(Looper.getMainLooper()); in testExecute_whenTimesOutBeforeCallback_returnsTimeOut()
/frameworks/base/tests/testables/src/android/testing/
DTestableInstrumentation.java85 mMainHandler = Handler.createAsync(Looper.getMainLooper()); in MainLooperManager()
159 mManager = acquireLooperManager(Looper.getMainLooper()); in startManaging()
177 if (Looper.myLooper() != Looper.getMainLooper()) { in startManaging()
DTestableLooper.java87 if (HOLD_MAIN_THREAD && mLooper == Looper.getMainLooper()) { in destroy()
209 if (HOLD_MAIN_THREAD && l == Looper.getMainLooper()) { in acquireLooperManager()
239 mLooper = setAsMain ? Looper.getMainLooper() : createLooper(); in LooperFrameworkMethod()
305 if (HOLD_MAIN_THREAD && mLooper == Looper.getMainLooper()) { in invokeExplosively()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/
DThreadUtils.java37 sMainThread = Looper.getMainLooper().getThread(); in isMainThread()
47 sMainThreadHandler = new Handler(Looper.getMainLooper()); in getUiThreadHandler()
/frameworks/base/apct-tests/perftests/autofill/src/android/view/autofill/
DAbstractAutofillPerfTestCase.java68 Looper.getMainLooper().getThread() == Thread.currentThread()); in prepareActivity()
70 Looper.myLooper() == Looper.getMainLooper()); in prepareActivity()
/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/src/com/android/keyguard/clock/
DViewPreviewer.java41 private final Handler mMainHandler = new Handler(Looper.getMainLooper());
74 if (Looper.myLooper() == Looper.getMainLooper()) { in createPreview()
/frameworks/base/apct-tests/perftests/core/src/android/widget/
DTextViewAutoSizeLayoutPerfTest.java77 Looper.getMainLooper().getThread() == Thread.currentThread()); in testConstruction()
79 Looper.myLooper() == Looper.getMainLooper()); in testConstruction()
DLayoutPerfTest.java86 Looper.getMainLooper().getThread() == Thread.currentThread()); in testLayoutPerf()
88 Looper.myLooper() == Looper.getMainLooper()); in testLayoutPerf()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImplTest.java114 TestableLooper mainLooper = new TestableLooper(Looper.getMainLooper()); in testAsyncBondState()
135 TestableLooper mainLooper = new TestableLooper(Looper.getMainLooper()); in testAsyncConnectionState()
158 TestableLooper mainLooper = new TestableLooper(Looper.getMainLooper()); in testNullAsync_DoesNotCrash()
222 TestableLooper mainLooper = new TestableLooper(Looper.getMainLooper()); in testOnACLConnectionStateChange_updatesBluetoothStateOnConnection()
/frameworks/base/services/core/java/com/android/server/twilight/
DTwilightService.java77 mHandler = new Handler(Looper.getMainLooper(), this); in TwilightService()
159 null /* default */, this, Looper.getMainLooper()); in startListening()
165 LocationManager.NETWORK_PROVIDER, this, Looper.getMainLooper()); in startListening()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DSysuiTestCase.java84 Assert.sMainLooper = Looper.getMainLooper(); in SysuiTeardown()
107 mHandler = new Handler(Looper.getMainLooper()); in waitForIdleSync()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DAssert.java29 public static Looper sMainLooper = Looper.getMainLooper();
/frameworks/base/core/java/android/bluetooth/le/
DBluetoothLeScanner.java101 mHandler = new Handler(Looper.getMainLooper()); in BluetoothLeScanner()
491 Handler handler = new Handler(Looper.getMainLooper()); in onScanResult()
502 Handler handler = new Handler(Looper.getMainLooper()); in onBatchScanResults()
523 Handler handler = new Handler(Looper.getMainLooper()); in onFoundOrLost()
/frameworks/base/wifi/java/android/net/wifi/aware/
DWifiAwareSession.java157 mgr.publish(mClientId, (handler == null) ? Looper.getMainLooper() : handler.getLooper(), in publish()
203 mgr.subscribe(mClientId, (handler == null) ? Looper.getMainLooper() : handler.getLooper(), in subscribe()
/frameworks/opt/net/ims/src/java/com/android/ims/
DFeatureConnection.java78 if (context.getMainLooper() != null) { in FeatureConnection()
112 if (mContext != null && Looper.getMainLooper() != null) {
/frameworks/base/tests/ActivityManagerPerfTests/test-app/src/com/android/frameworks/perftests/amteststestapp/
DStartProcessService.java35 Looper.getMainLooper().getQueue().addIdleHandler(() -> { in onBind()
/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/tests/ServiceCrashTest/src/com/android/tests/servicecrashtest/
DCrashingService.java48 mServiceHandler = new ServiceHandler(Looper.getMainLooper()); in onCreate()
/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.java397 verify(mContext, never()).getMainLooper(); in testCorrectLooperIsUsedForHandler()
408 when(mContext.getMainLooper()).thenReturn(altLooper.getLooper()); in testMainLooperIsUsedWhenHandlerNotProvided()
416 verify(mContext).getMainLooper(); in testMainLooperIsUsedWhenHandlerNotProvided()
825 verify(mContext, never()).getMainLooper(); in testCorrectLooperIsUsedForSoftApCallbackHandler()
837 verify(mContext, never()).getMainLooper(); in testCorrectLooperIsUsedForObserverHandler()
848 when(mContext.getMainLooper()).thenReturn(altLooper.getLooper()); in testMainLooperIsUsedWhenHandlerNotProvidedForObserver()
854 verify(mContext).getMainLooper(); in testMainLooperIsUsedWhenHandlerNotProvidedForObserver()
1131 when(mContext.getMainLooper()).thenReturn(mLooper.getLooper()); in registerTrafficStateCallbackUsesMainLooperOnNullArgumentForHandler()
1195 verify(mContext, never()).getMainLooper(); in trafficStateCallbackIsCalledOnCorrectThread()
1211 when(mContext.getMainLooper()).thenReturn(mLooper.getLooper()); in registerNetworkRequestMatchCallbackCallGoesToWifiServiceImpl()
[all …]
/frameworks/base/core/java/android/print/
DPrinterDiscoverySession.java68 mHandler = new SessionHandler(context.getMainLooper()); in PrinterDiscoverySession()
262 if (!Looper.getMainLooper().isCurrentThread()) { in throwIfNotCalledOnMainThread()
/frameworks/base/tests/LockTaskTests/src/com/google/android/example/locktasktests/
DLaunchActivity.java53 mHandler = new Handler(Looper.getMainLooper()); in onCreate()

12345678910>>...15