diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java | 7 | ||||
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java index 6eb8d8aec417..7cfacbcc92f8 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java @@ -329,6 +329,11 @@ public class BubblePositioner { : mBubbleSize; } + /** Size of the visible (non-overlapping) part of the pointer. */ + public int getPointerSize() { + return mPointerHeight - mPointerOverlap; + } + /** The maximum number of bubbles that can be displayed comfortably on screen. */ public int getMaxBubbles() { return mMaxBubbles; @@ -367,7 +372,7 @@ public class BubblePositioner { * padding is added. */ public int[] getExpandedViewContainerPadding(boolean onLeft, boolean isOverflow) { - final int pointerTotalHeight = mPointerHeight - mPointerOverlap; + final int pointerTotalHeight = getPointerSize(); final int expandedViewLargeScreenInsetFurthestEdge = getExpandedViewLargeScreenInsetFurthestEdge(isOverflow); if (mIsLargeScreen) { diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java index 322c0bf80816..cb88203349fa 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java @@ -2887,7 +2887,10 @@ public class BubbleStackView extends FrameLayout PhysicsAnimator.getInstance(mAnimatingOutSurfaceContainer).cancel(); mAnimatingOutSurfaceContainer.setScaleX(1f); mAnimatingOutSurfaceContainer.setScaleY(1f); - mAnimatingOutSurfaceContainer.setTranslationX(mExpandedViewContainer.getPaddingLeft()); + final float translationX = mPositioner.showBubblesVertically() && mStackOnLeftOrWillBe + ? mExpandedViewContainer.getPaddingLeft() + mPositioner.getPointerSize() + : mExpandedViewContainer.getPaddingLeft(); + mAnimatingOutSurfaceContainer.setTranslationX(translationX); mAnimatingOutSurfaceContainer.setTranslationY(0); final int[] taskViewLocation = |