Updated bubble bar position to be center aligned with the hotseat

Added a method to the device profile to calculate the vertical center of
the hotseat icons. Simplified the logic for positioning the bubble bar.

Test: TransientBubbleStashControllerTest
Test: PersistentBubbleStashControllerTest
Test: Visual. Go to home page, check that bubble bar is vertically
center aligned with the hotseat
Bug: 345491493
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I52f1b94de79f6c912f43a88fcc5c884e20e56310
This commit is contained in:
mpodolian
2024-10-15 17:14:06 -07:00
parent bea43b0c03
commit f230eee2ff
9 changed files with 46 additions and 35 deletions
@@ -2018,6 +2018,18 @@ public class DeviceProfile {
}
}
/**
* Returns the number of pixels the hotseat icons vertical center is translated from the bottom
* of the screen.
*/
public int getHotseatVerticalCenter() {
return hotseatBarSizePx
- (isQsbInline ? 0 : hotseatQsbVisualHeight)
- hotseatQsbSpace
- (hotseatCellHeightPx / 2)
+ ((hotseatCellHeightPx - iconSizePx) / 2);
}
/**
* Returns the number of pixels the taskbar is translated from the bottom of the screen.
*/