Merge "[Launcher Jank] Avoid SimpleBroadcastReceiver making binder calls on main thread" into main

This commit is contained in:
Fengjiang Li
2024-06-24 21:00:41 +00:00
committed by Android (Google) Code Review
13 changed files with 106 additions and 49 deletions
@@ -239,7 +239,8 @@ public abstract class AbstractLauncherUiTest<LAUNCHER_TYPE extends Launcher> {
final CountDownLatch count = new CountDownLatch(2);
final SimpleBroadcastReceiver broadcastReceiver =
new SimpleBroadcastReceiver(i -> count.countDown());
broadcastReceiver.registerPkgActions(mTargetContext, pkg,
// We OK to make binder calls on main thread in test.
broadcastReceiver.registerPkgActionsSync(mTargetContext, pkg,
Intent.ACTION_PACKAGE_RESTARTED, Intent.ACTION_PACKAGE_DATA_CLEARED);
mDevice.executeShellCommand("pm clear " + pkg);