Do not animate bubbles from initial update [4/N]
Bubbles that are restored with initial update should not be animated in. If we restore the bubble bar after rotation, we need to show it immediately. Attempting to animate the bubbles from initial update causes the UI to flicker. Bug: 357115534 Test: on home screen, have bubble bar expanded, rotate device, check bubble bar bubbles do not flicker after rotation Test: have no bubbles in bubble bar, trigger a bubble, check it is animated Flag: com.android.wm.shell.enable_bubble_bar Change-Id: I3da2bc22588c0f5d2dd9c7a3adfcd2c19c339809
This commit is contained in:
1 parent
14474695a2
commit
6c7cb1a5f0
4 files changed
+14
-13
No files matched your search
@@ -715,8 +715,8 @@ public class BubbleBarView extends FrameLayout {
|
||||
}
|
||||
|
||||
/** Add a new bubble to the bubble bar without updating the selected bubble. */
|
||||
public void addBubble(BubbleView bubble) {
|
||||
addBubble(bubble, /* bubbleToSelect = */ null);
|
||||
public void addBubble(BubbleView bubble, boolean suppressAnimation) {
|
||||
addBubble(bubble, /* bubbleToSelect = */ null, suppressAnimation);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -725,12 +725,13 @@ public class BubbleBarView extends FrameLayout {
|
||||
* @param bubble bubble to add
|
||||
* @param bubbleToSelect if {@code null}, then selected bubble does not change
|
||||
*/
|
||||
public void addBubble(BubbleView bubble, @Nullable BubbleView bubbleToSelect) {
|
||||
public void addBubble(BubbleView bubble, @Nullable BubbleView bubbleToSelect,
|
||||
boolean suppressAnimation) {
|
||||
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) mIconSize, (int) mIconSize,
|
||||
Gravity.LEFT);
|
||||
final int index = bubble.isOverflow() ? getChildCount() : 0;
|
||||
|
||||
if (isExpanded()) {
|
||||
if (isExpanded() && !suppressAnimation) {
|
||||
// if we're expanded scale the new bubble in
|
||||
bubble.setScaleX(0f);
|
||||
bubble.setScaleY(0f);
|
||||
|
||||
Reference in new issue
Block a user