Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +5 −0 Original line number Diff line number Diff line Loading @@ -2335,6 +2335,11 @@ public class BubbleController implements ConfigurationChangeListener, mMainExecutor.execute(() -> mController.setBubbleBarLocation(location)); } @Override public void setBubbleBarBounds(Rect bubbleBarBounds) { mMainExecutor.execute(() -> mBubblePositioner.setBubbleBarBounds(bubbleBarBounds)); } } private class BubblesImpl implements Bubbles { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -44,4 +44,6 @@ interface IBubbles { oneway void showUserEducation(in int positionX, in int positionY) = 8; oneway void setBubbleBarLocation(in BubbleBarLocation location) = 9; oneway void setBubbleBarBounds(in Rect bubbleBarBounds) = 10; } No newline at end of file libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java +14 −9 Original line number Diff line number Diff line Loading @@ -166,13 +166,8 @@ public class BubbleBarAnimationHelper { bbev.setTaskViewAlpha(0f); bbev.setVisibility(VISIBLE); // Set the pivot point for the scale, so the view animates out from the bubble bar. Rect bubbleBarBounds = mPositioner.getBubbleBarBounds(); mExpandedViewContainerMatrix.setScale( 1f - EXPANDED_VIEW_ANIMATE_SCALE_AMOUNT, 1f - EXPANDED_VIEW_ANIMATE_SCALE_AMOUNT, bubbleBarBounds.centerX(), bubbleBarBounds.top); setScaleFromBubbleBar(mExpandedViewContainerMatrix, 1f - EXPANDED_VIEW_ANIMATE_SCALE_AMOUNT); bbev.setAnimationMatrix(mExpandedViewContainerMatrix); Loading Loading @@ -214,8 +209,8 @@ public class BubbleBarAnimationHelper { } bbev.setScaleX(1f); bbev.setScaleY(1f); mExpandedViewContainerMatrix.setScaleX(1f); mExpandedViewContainerMatrix.setScaleY(1f); setScaleFromBubbleBar(mExpandedViewContainerMatrix, 1f); PhysicsAnimator.getInstance(mExpandedViewContainerMatrix).cancel(); PhysicsAnimator.getInstance(mExpandedViewContainerMatrix) Loading @@ -240,6 +235,16 @@ public class BubbleBarAnimationHelper { mExpandedViewAlphaAnimator.reverse(); } private void setScaleFromBubbleBar(AnimatableScaleMatrix matrix, float scale) { // Set the pivot point for the scale, so the view animates out from the bubble bar. Rect bubbleBarBounds = mPositioner.getBubbleBarBounds(); matrix.setScale( scale, scale, bubbleBarBounds.centerX(), bubbleBarBounds.top); } /** * Animate the expanded bubble when it is being dragged */ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +5 −0 Original line number Diff line number Diff line Loading @@ -2335,6 +2335,11 @@ public class BubbleController implements ConfigurationChangeListener, mMainExecutor.execute(() -> mController.setBubbleBarLocation(location)); } @Override public void setBubbleBarBounds(Rect bubbleBarBounds) { mMainExecutor.execute(() -> mBubblePositioner.setBubbleBarBounds(bubbleBarBounds)); } } private class BubblesImpl implements Bubbles { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -44,4 +44,6 @@ interface IBubbles { oneway void showUserEducation(in int positionX, in int positionY) = 8; oneway void setBubbleBarLocation(in BubbleBarLocation location) = 9; oneway void setBubbleBarBounds(in Rect bubbleBarBounds) = 10; } No newline at end of file
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java +14 −9 Original line number Diff line number Diff line Loading @@ -166,13 +166,8 @@ public class BubbleBarAnimationHelper { bbev.setTaskViewAlpha(0f); bbev.setVisibility(VISIBLE); // Set the pivot point for the scale, so the view animates out from the bubble bar. Rect bubbleBarBounds = mPositioner.getBubbleBarBounds(); mExpandedViewContainerMatrix.setScale( 1f - EXPANDED_VIEW_ANIMATE_SCALE_AMOUNT, 1f - EXPANDED_VIEW_ANIMATE_SCALE_AMOUNT, bubbleBarBounds.centerX(), bubbleBarBounds.top); setScaleFromBubbleBar(mExpandedViewContainerMatrix, 1f - EXPANDED_VIEW_ANIMATE_SCALE_AMOUNT); bbev.setAnimationMatrix(mExpandedViewContainerMatrix); Loading Loading @@ -214,8 +209,8 @@ public class BubbleBarAnimationHelper { } bbev.setScaleX(1f); bbev.setScaleY(1f); mExpandedViewContainerMatrix.setScaleX(1f); mExpandedViewContainerMatrix.setScaleY(1f); setScaleFromBubbleBar(mExpandedViewContainerMatrix, 1f); PhysicsAnimator.getInstance(mExpandedViewContainerMatrix).cancel(); PhysicsAnimator.getInstance(mExpandedViewContainerMatrix) Loading @@ -240,6 +235,16 @@ public class BubbleBarAnimationHelper { mExpandedViewAlphaAnimator.reverse(); } private void setScaleFromBubbleBar(AnimatableScaleMatrix matrix, float scale) { // Set the pivot point for the scale, so the view animates out from the bubble bar. Rect bubbleBarBounds = mPositioner.getBubbleBarBounds(); matrix.setScale( scale, scale, bubbleBarBounds.centerX(), bubbleBarBounds.top); } /** * Animate the expanded bubble when it is being dragged */ Loading