diff options
author | 2025-03-20 16:25:34 -0700 | |
---|---|---|
committer | 2025-03-20 16:25:34 -0700 | |
commit | a75e779ee82ccaf620e36324c4239127bf0ced08 (patch) | |
tree | dae0de4a0d9127792cc6935dee7cc8246cd6fb66 /quickstep/src | |
parent | fe1502122663158fd31fb4da731abb156b63abf4 (diff) | |
parent | 602874bb515a5676da891dd2fc322c57e00128e6 (diff) |
Merge "[CD Taskbar] Bypass binder calls for TaskbarManager#getDefaultDisplayId()" into main
Diffstat (limited to 'quickstep/src')
-rw-r--r-- | quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java | 13 | ||||
-rw-r--r-- | quickstep/src/com/android/quickstep/TouchInteractionService.java | 3 |
2 files changed, 9 insertions, 7 deletions
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java index ebff620159..f3cbdb5a2a 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java @@ -140,6 +140,7 @@ public class TaskbarManager implements DisplayDecorationListener { Settings.Secure.NAV_BAR_KIDS_MODE); private final Context mBaseContext; + private final int mPrimaryDisplayId; private final TaskbarNavButtonCallbacks mNavCallbacks; // TODO: Remove this during the connected displays lifecycle refactor. private final Context mPrimaryWindowContext; @@ -436,21 +437,21 @@ public class TaskbarManager implements DisplayDecorationListener { TaskbarNavButtonCallbacks navCallbacks, RecentsDisplayModel recentsDisplayModel) { mBaseContext = context; + mPrimaryDisplayId = mBaseContext.getDisplayId(); mAllAppsActionManager = allAppsActionManager; mNavCallbacks = navCallbacks; mRecentsDisplayModel = recentsDisplayModel; // Set up primary display. - int primaryDisplayId = getDefaultDisplayId(); debugPrimaryTaskbar("TaskbarManager constructor"); - mPrimaryWindowContext = createWindowContext(primaryDisplayId); + mPrimaryWindowContext = createWindowContext(getDefaultDisplayId()); mPrimaryWindowManager = mPrimaryWindowContext.getSystemService(WindowManager.class); DesktopVisibilityController.INSTANCE.get( mPrimaryWindowContext).registerTaskbarDesktopModeListener( mTaskbarDesktopModeListener); - createTaskbarRootLayout(primaryDisplayId); - createNavButtonController(primaryDisplayId); - createAndRegisterComponentCallbacks(primaryDisplayId); + createTaskbarRootLayout(getDefaultDisplayId()); + createNavButtonController(getDefaultDisplayId()); + createAndRegisterComponentCallbacks(getDefaultDisplayId()); SettingsCache.INSTANCE.get(mPrimaryWindowContext) .register(USER_SETUP_COMPLETE_URI, mOnSettingsChangeListener); @@ -1678,7 +1679,7 @@ public class TaskbarManager implements DisplayDecorationListener { } private int getDefaultDisplayId() { - return mBaseContext.getDisplayId(); + return mPrimaryDisplayId; } /** diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 3543ad1427..30936ad9d4 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -1048,7 +1048,8 @@ public class TouchInteractionService extends Service { private boolean isHoverActionWithoutConsumer(MotionEvent event) { // Only process these events when taskbar is present. - TaskbarActivityContext tac = mTaskbarManager.getCurrentActivityContext(); + int displayId = event.getDisplayId(); + TaskbarActivityContext tac = mTaskbarManager.getTaskbarForDisplay(displayId); boolean isTaskbarPresent = tac != null && tac.getDeviceProfile().isTaskbarPresent && !tac.isPhoneMode(); return event.isHoverEvent() && (mUncheckedConsumer.getType() & TYPE_CURSOR_HOVER) == 0 |