/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestableLooperTest.java | 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/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/ |
D | RadiiAnimatorTest.java | 76 new Handler(Looper.getMainLooper()).post(() -> radiiAnimator.startAnimation(endRadii)); in skipAnimation_updatesToEnd() 81 new Handler(Looper.getMainLooper()).post(radiiAnimator::skipAnimationToEnd); in skipAnimation_updatesToEnd() 115 new Handler(Looper.getMainLooper()).post(() -> animator.startAnimation(endRadii)); in playAndSkipAnimation() 117 new Handler(Looper.getMainLooper()).post(animator::skipAnimationToEnd); in playAndSkipAnimation()
|
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/ |
D | SettingsStateTest.java | 126 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testLoadValidAconfigProto() 184 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testSkipLoadingAconfigFlagWithMissingFields() 215 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testWritingAconfigFlagStages() 352 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testReadWrite() 367 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testReadWrite() 396 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in testUpgrade() 506 SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper()); in getSettingStateObject() 522 SettingsState.MAX_BYTES_PER_APP_PACKAGE_LIMITED, Looper.getMainLooper()); in testInsertSetting_memoryUsage() 561 SettingsState.MAX_BYTES_PER_APP_PACKAGE_LIMITED, Looper.getMainLooper()); in testMemoryUsagePerPackage() 651 SettingsState.MAX_BYTES_PER_APP_PACKAGE_LIMITED, Looper.getMainLooper()); in testLargeSettingKey() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/lights/ |
D | LightsServiceTest.java | 112 LightsService service = new LightsService(mContext, () -> mHal, Looper.getMainLooper()); in testGetLights_filtersSystemLights() 121 LightsService service = new LightsService(mContext, () -> mHal, Looper.getMainLooper()); in testControlMultipleLights() 143 LightsService service = new LightsService(mContext, () -> mHal, Looper.getMainLooper()); in testControlLights_onlyEffectiveForLifetimeOfClient() 165 LightsService service = new LightsService(mContext, () -> mHal, Looper.getMainLooper()); in testControlLights_firstCallerWinsContention() 193 LightsService service = new LightsService(mContext, () -> mHal, Looper.getMainLooper()); in testClearLight() 210 LightsService service = new LightsService(mContext, () -> mHal, Looper.getMainLooper()); in testControlLights_higherPriorityCallerWinsContention()
|
/frameworks/base/tests/testables/src/android/testing/ |
D | TestableInstrumentation.java | 85 mMainHandler = Handler.createAsync(Looper.getMainLooper()); in MainLooperManager() 159 mManager = acquireLooperManager(Looper.getMainLooper()); in startManaging() 177 if (Looper.myLooper() != Looper.getMainLooper()) { in startManaging()
|
D | TestableLooper.java | 158 if (HOLD_MAIN_THREAD && mLooper == Looper.getMainLooper()) { 333 if (HOLD_MAIN_THREAD && l == Looper.getMainLooper()) { 380 mLooper = mSetAsMain ? Looper.getMainLooper() : createLooper(); 461 if (HOLD_MAIN_THREAD && mLooperHolder.mLooper == Looper.getMainLooper()) {
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/remote/ |
D | RemoteCallTest.java | 142 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/packages/SettingsLib/src/com/android/settingslib/utils/ |
D | ThreadUtils.java | 41 sMainThread = Looper.getMainLooper().getThread(); in isMainThread() 52 sMainThreadHandler = new Handler(Looper.getMainLooper()); in getUiThreadHandler()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/media/ |
D | DeviceRouteControllerTest.java | 61 mContext, Looper.getMainLooper(), mOnDeviceRouteChangedListener); in createInstance_audioPoliciesFlagIsDisabled_createsLegacyController() 71 mContext, Looper.getMainLooper(), mOnDeviceRouteChangedListener); in createInstance_audioPoliciesFlagIsEnabled_createsAudioPoliciesController()
|
/frameworks/base/packages/SettingsLib/AvatarPicker/src/ |
D | ThreadUtils.java | 43 sMainThread = Looper.getMainLooper().getThread(); in isMainThread() 54 sMainThreadHandler = new Handler(Looper.getMainLooper()); in getUiThreadHandler()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/demomode/ |
D | DemoModeAvailabilityTracker.kt | 70 private val allowedObserver = object : ContentObserver(Handler(Looper.getMainLooper())) { 86 private val onObserver = object : ContentObserver(Handler(Looper.getMainLooper())) {
|
/frameworks/base/services/tests/servicestests/src/com/android/server/tv/ |
D | TvRemoteProviderWatcherTest.java | 96 mMockContext, new Object(), new Handler(Looper.getMainLooper())); in acceptsValidCsvPackageName() 109 mMockContext, new Object(), new Handler(Looper.getMainLooper())); in rejectsInvalidCsvPackageName() 155 mMockContext, new Object(), new Handler(Looper.getMainLooper())); in whitelistingPackageNameIsRequired()
|
/frameworks/base/apct-tests/perftests/autofill/src/android/view/autofill/ |
D | AbstractAutofillPerfTestCase.java | 97 Looper.getMainLooper().getThread() == Thread.currentThread()); in prepareActivity() 99 Looper.myLooper() == Looper.getMainLooper()); in prepareActivity()
|
/frameworks/base/apct-tests/perftests/core/src/android/widget/ |
D | TextViewAutoSizeLayoutPerfTest.java | 77 Looper.getMainLooper().getThread() == Thread.currentThread()); in testConstruction() 79 Looper.myLooper() == Looper.getMainLooper()); in testConstruction()
|
D | LayoutPerfTest.java | 86 Looper.getMainLooper().getThread() == Thread.currentThread()); in testLayoutPerf() 88 Looper.myLooper() == Looper.getMainLooper()); in testLayoutPerf()
|
/frameworks/base/packages/SettingsLib/tests/robotests/fragment/src/test/java/org/robolectric/shadows/androidx/fragment/ |
D | FragmentControllerTest.java | 19 import static android.os.Looper.getMainLooper; 79 shadowOf(getMainLooper()).idle(); in attachedAfterCreate() 92 shadowOf(getMainLooper()).idle(); in attachedAfterCreate_customActivity() 177 shadowOf(getMainLooper()).idle(); in withIntent() 204 shadowOf(getMainLooper()).idle(); in withIntentAndArguments()
|
/frameworks/base/location/java/android/location/provider/ |
D | LocationProviderBase.java | 335 new Handler(Looper.getMainLooper()).post(() -> { in setRequest() 348 new Handler(Looper.getMainLooper()).post(() -> { in flush() 372 new Handler(Looper.getMainLooper()).post(() -> { in sendExtraCommand()
|
D | GeocodeProviderBase.java | 124 new Handler(Looper.getMainLooper()) in forwardGeocode() 139 new Handler(Looper.getMainLooper()) in reverseGeocode()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | BatteryControllerStartableTest.java | 83 new Handler(Looper.getMainLooper()), in setUp() 84 new Handler(Looper.getMainLooper())); in setUp()
|
/frameworks/base/core/tests/coretests/src/android/app/ |
D | UiAutomationTest.java | 43 private final Looper mLooper = Looper.getMainLooper(); 54 when(mContext.getMainLooper()).thenReturn(mLooper); in setFixtures()
|
/frameworks/base/core/tests/packagemonitortests/src/com/android/internal/content/ |
D | PackageMonitorVisibilityTest.java | 77 new Handler(Looper.getMainLooper())); in testPackageMonitorPackageVisible() 101 new Handler(Looper.getMainLooper())); in testPackageMonitorPackageNotVisible()
|
/frameworks/base/services/companion/java/com/android/server/companion/devicepresence/ |
D | BleDeviceProcessor.java | 114 if (Looper.getMainLooper().isCurrentThread()) { in onAssociationChanged() 117 new Handler(Looper.getMainLooper()).post(this::restartScan); in onAssociationChanged() 245 new Handler(Looper.getMainLooper()).post(() -> checkBleState()); in registerBluetoothStateBroadcastReceiver()
|
/frameworks/base/tests/ActivityManagerPerfTests/test-app/src/com/android/frameworks/perftests/amteststestapp/ |
D | StartProcessService.java | 35 Looper.getMainLooper().getQueue().addIdleHandler(() -> { in onBind()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/concurrency/ |
D | Execution.kt | 31 private val mainLooper = Looper.getMainLooper() in assertIsMainThread()
|
/frameworks/opt/net/wifi/libs/WifiTrackerLib/tests/src/com/android/wifitrackerlib/ |
D | MergedCarrierEntryTest.java | 63 when(mMockContext.getMainLooper()).thenReturn(Looper.getMainLooper()); in setUp()
|