Fixes to VoiceInteractionWindowController

- Make temporary taskbar background behind assistant non-touchable
  (fail-safe in case the window isn't removed for some reason)
- Give temporary taskbar background a different window title and
  add a couple more dump statements to help debugging
- Only show the taskbar background for persistent taskbar; transient
  taskbar can skip most of the special casing and just hide it
- Fix bug where we weren't drawing the separate taskbar background in 3
  button mode
- Fix bug where we weren't actually synchronizing
  separateWindowForTaskbarBackground with TaskbarDragLayer, since the
  former wasn't attached to the window yet; now we wait until it is
  attached before calling synchronizeNextDraw()
- Also added dump logs for TaskbarDragLayerController alpha channels

Test: manual in 3 button and gesture nav (with and without
FORCE_PERSISTENT_TASKBAR enabled)
Fixes: 243652789
Bug: 262664266

Change-Id: I865871e57dd4cb255a916317a7e5d35cfde97df5
This commit is contained in:
Tony Wickham
2023-01-21 00:47:08 +00:00
parent b9ecff07e4
commit c3963a7ff4
5 changed files with 139 additions and 30 deletions

View File

@@ -18,6 +18,7 @@ package com.android.launcher3.taskbar;
import static android.view.View.AccessibilityDelegate;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION;
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncestor;
@@ -870,8 +871,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
mAreNavButtonsInSeparateWindow = true;
mContext.getDragLayer().removeView(mNavButtonsView);
mSeparateWindowParent.addView(mNavButtonsView);
WindowManager.LayoutParams windowLayoutParams = mContext.createDefaultWindowLayoutParams();
windowLayoutParams.setTitle(NAV_BUTTONS_SEPARATE_WINDOW_TITLE);
WindowManager.LayoutParams windowLayoutParams = mContext.createDefaultWindowLayoutParams(
TYPE_NAVIGATION_BAR_PANEL, NAV_BUTTONS_SEPARATE_WINDOW_TITLE);
mContext.addWindowView(mSeparateWindowParent, windowLayoutParams);
}