Let the bubble bar handle gestures over the bubble bar.

This change introduces a motion event flag to signal that the gesture
is being originated over the bubble bar (similar to the nav bar gesture flag). Downstream consumers use this flag to ignore the event in order
to allow the bubble bar to handle it.

The black screen in b/293348900 seemed to be related to the recents
shell transition closing the app that was in the foreground before
swiping on the bubble bar handle. Not sure why it ended up with a black
screen, but this change avoids starting the recents transition entirely.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/BSxLROoflr1i2yy0v6Y4G

Fixes: 294421126
Bug: 293348900
Test: Manual:
      - Add bubble to the bubble bar
      - Swipe up over the bubble bar
      - Observe that the bubble bar expands

      - Launch application
      - Swipe up on the bubble bar handle
      - Observe that the bubble bar expands

Change-Id: Iea15829de97edb6bfbfb7007388865230faaf736
This commit is contained in:
Liran Binyamin committed 2023-09-26 12:02:27 -04:00
1 parent 136bdf80b3
commit d7f1942d4a
5 files changed
+127 -26

No files matched your search

@@ -22,6 +22,7 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.annotation.Nullable;
import android.view.InsetsController;
import android.view.MotionEvent;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.taskbar.StashedHandleViewController;
@@ -350,4 +351,9 @@ public class BubbleStashController {
return mBubblesShowingOnHome ? getBubbleBarTranslationYForHotseat()
: getBubbleBarTranslationYForTaskbar();
}
/** Checks whether the motion event is over the stash handle. */
public boolean isEventOverStashHandle(MotionEvent ev) {
return mHandleViewController.isEventOverHandle(ev);
}
}