Send bubble bar distance to shell
We previously sent the top coordinate of the bubble bar to shell.
However when the screen height changes, launcher takes a bit longer
to update than shell. So instead of calculating the top coordinate
on the launcher side, we now send the amount of space between the
bubble bar and the bottom of the screen to shell, where we can offset
that as needed.
Bug: 392893178
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual
- send some bubbles
- launch app
- expand
- swipe to home
- fold and unfold
Change-Id: I57b96db49dab1e2304fde8dc55a99eaaf85e40f8
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -1336,7 +1332,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 */
|
||||
|
||||
Reference in New Issue
Block a user