Register hinge angle sensor listener in a background thread

This was taking ~13ms on the ui thread

Bug: 221394115
Test: Manual
Change-Id: Ibadade5b1c3c8d33a292d36bb6a03dd8021861be
This commit is contained in:
Nicolo' Mazzucato
2022-02-25 12:37:44 +01:00
parent e424f57dcb
commit d986bbd0fa
@@ -25,6 +25,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_SPLIT_FROM_WORKSP
import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID;
import static com.android.launcher3.popup.QuickstepSystemShortcut.getSplitSelectShortcutByPosition;
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
import static com.android.launcher3.util.Executors.THREAD_POOL_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON;
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
@@ -342,6 +343,7 @@ public abstract class BaseQuickstepLauncher extends Launcher
getSystemService(SensorManager.class),
getMainThreadHandler(),
getMainExecutor(),
/* backgroundExecutor= */ THREAD_POOL_EXECUTOR,
/* tracingTagPrefix= */ "launcher"
);