Updated how taskbar touch area is being set.
Included bubble bar bounds to the taskbar touch area instead of
replacing taskbar touch area.
Fixes: 356903636
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Switch to the persistent task bar mode, have bubble. Go to
any application or overview. Task bar icons are touchable.
Change-Id: I3775c2e69a7bf89f1d5223707d7c4c94175fcfa8
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
index 4c5564e..67cb7cb 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
@@ -137,37 +137,23 @@
}
val touchableHeight = max(taskbarTouchableHeight, bubblesTouchableHeight)
- if (
+ defaultTouchableRegion.set(
+ 0,
+ windowLayoutParams.height - touchableHeight,
+ context.deviceProfile.widthPx,
+ windowLayoutParams.height
+ )
+ val isBubbleBarVisible =
controllers.bubbleControllers.isPresent &&
controllers.bubbleControllers.get().bubbleStashController.isBubbleBarVisible()
- ) {
+ // if there's an animating bubble add it to the touch region so that it's clickable
+ val isAnimatingNewBubble =
+ controllers.bubbleControllers.getOrNull()?.bubbleBarViewController?.isAnimatingNewBubble
+ ?: false
+ if (isBubbleBarVisible || isAnimatingNewBubble) {
val iconBounds =
controllers.bubbleControllers.get().bubbleBarViewController.bubbleBarBounds
- defaultTouchableRegion.set(
- iconBounds.left,
- iconBounds.top,
- iconBounds.right,
- iconBounds.bottom
- )
- } else {
- defaultTouchableRegion.set(
- 0,
- windowLayoutParams.height - touchableHeight,
- context.deviceProfile.widthPx,
- windowLayoutParams.height
- )
-
- // if there's an animating bubble add it to the touch region so that it's clickable
- val isAnimatingNewBubble =
- controllers.bubbleControllers
- .getOrNull()
- ?.bubbleBarViewController
- ?.isAnimatingNewBubble ?: false
- if (isAnimatingNewBubble) {
- val iconBounds =
- controllers.bubbleControllers.get().bubbleBarViewController.bubbleBarBounds
- defaultTouchableRegion.op(iconBounds, Region.Op.UNION)
- }
+ defaultTouchableRegion.op(iconBounds, Region.Op.UNION)
}
// Pre-calculate insets for different providers across different rotations for this gravity