Merge "Send bubble bar distance to shell" into main

This commit is contained in:
Liran Binyamin
2025-05-02 14:35:40 -07:00
committed by Android (Google) Code Review
8 changed files with 33 additions and 44 deletions
@@ -280,11 +280,6 @@ public class BubbleBarViewController {
: PINNING_PERSISTENT;
mBubbleBarPinning.updateValue(pinningValue);
mBarView.setController(new BubbleBarView.Controller() {
@Override
public int getScreenHeight() {
return mActivity.getScreenSize().y;
}
@Override
public float getBubbleBarTranslationY() {
return mBubbleStashController.getBubbleBarTranslationY();
@@ -741,7 +736,8 @@ public class BubbleBarViewController {
public boolean isEventOverBubbleBar(MotionEvent event) {
if (!isBubbleBarVisible()) return false;
final Rect bounds = getBubbleBarBounds();
final int bubbleBarTopOnScreen = mBarView.getRestingTopPositionOnScreen();
final int bubbleBarTopOnScreen =
mActivity.getScreenSize().y - mBarView.getTopToScreenBottom();
final float x = event.getX();
return event.getRawY() >= bubbleBarTopOnScreen && x >= bounds.left && x <= bounds.right;
}
@@ -1359,7 +1355,7 @@ public class BubbleBarViewController {
* Notifies SystemUI to expand the selected bubble when the bubble is released.
*/
public void onBubbleDragRelease(BubbleBarLocation location) {
mSystemUiProxy.stopBubbleDrag(location, mBarView.getRestingTopPositionOnScreen());
mSystemUiProxy.stopBubbleDrag(location, mBarView.getTopToScreenBottom());
}
/** Handle given bubble being dismissed */