Initial animation of new bubble bar bubble

This change animates a new bubble bar bubble. Currently only handles the case where the bubble is added when the bubble bar is stashed.
There's no synchronization with the stash handle yet either.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605790
Test: atest BubbleBarViewAnimatorTest
Change-Id: Ic3f5edc0dde204f871cf7e1288bd50620e6beebb
This commit is contained in:
Liran Binyamin committed 2024-03-28 11:30:56 -04:00
1 parent 65bf9fac38
commit 074a3a66b0
6 files changed
+308 -11

No files matched your search

@@ -34,6 +34,7 @@ import com.android.launcher3.taskbar.TaskbarActivityContext;
import com.android.launcher3.taskbar.TaskbarControllers;
import com.android.launcher3.taskbar.TaskbarInsetsController;
import com.android.launcher3.taskbar.TaskbarStashController;
import com.android.launcher3.taskbar.bubbles.animation.BubbleBarViewAnimator;
import com.android.launcher3.util.MultiPropertyFactory;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.quickstep.SystemUiProxy;
@@ -81,6 +82,8 @@ public class BubbleBarViewController {
private boolean mHiddenForNoBubbles = true;
private boolean mShouldShowEducation;
private BubbleBarViewAnimator mBubbleBarViewAnimator;
public BubbleBarViewController(TaskbarActivityContext activity, BubbleBarView barView) {
mActivity = activity;
mBarView = barView;
@@ -113,6 +116,8 @@ public class BubbleBarViewController {
mBarView.addOnLayoutChangeListener((view, i, i1, i2, i3, i4, i5, i6, i7) ->
mTaskbarInsetsController.onTaskbarOrBubblebarWindowHeightOrInsetsChanged()
);
mBubbleBarViewAnimator = new BubbleBarViewAnimator(mBarView, mBubbleStashController);
}
private void onBubbleClicked(View v) {
@@ -316,6 +321,12 @@ public class BubbleBarViewController {
new FrameLayout.LayoutParams(mIconSize, mIconSize, Gravity.LEFT));
b.getView().setOnClickListener(mBubbleClickListener);
mBubbleDragController.setupBubbleView(b.getView());
boolean isStashedOrGone =
mBubbleStashController.isStashed() || mBarView.getVisibility() != VISIBLE;
if (b instanceof BubbleBarBubble && isStashedOrGone) {
mBubbleBarViewAnimator.animateBubbleInForStashed((BubbleBarBubble) b);
}
} else {
Log.w(TAG, "addBubble, bubble was null!");
}