Only animate bubbles when in app

We currently animate bubbles on home but the animation hasn't been implemented properly yet, so ensure we don't play the animation on home.

This also deflakes some tests that fail because we're not yet handling interruptions while animations are playing.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Fixes: 333796110
Fixes: 333910495
Fixes: 336086185
Test: https://android-build.corp.google.com/builds/tests/view?invocationId=I78600010269170812&testResultId=TR95029270629703599&redirect=http://fusion2/ac10ec72-4e02-4573-86be-59ecb823ecd1
Change-Id: I99de02cbaebeb6c930a1368ea65562aa178f6762
diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java
index a1a2898..0e62eaf 100644
--- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java
@@ -371,10 +371,9 @@
                 return;
             }
 
-            boolean isStashedOrGone =
-                    mBubbleStashController.isStashed() || mBarView.getVisibility() != VISIBLE;
-            // don't animate the new bubble if we're auto expanding from stashed
-            if (b instanceof BubbleBarBubble && isStashedOrGone && !isExpanding) {
+            boolean isInApp = mTaskbarStashController.isInApp();
+            // only animate the new bubble if we're in an app and not auto expanding
+            if (b instanceof BubbleBarBubble && isInApp && !isExpanding) {
                 mBubbleBarViewAnimator.animateBubbleInForStashed((BubbleBarBubble) b);
             }
         } else {