Integrated new BubbleStashControllers into the existing code.

Integrated the PersistentTaskbarStashController and the
TransientTaskbarStashController into the launcher code. Made changes to
the TaskbarInsetsController to set appropriate touchable zones. Updated
the TaskbarUIController to not start the overview transition on clicks
for the collapsed bubble bar.

Bug: 346391377
Fixes: 350065038
Fixes: 355664783
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: com.android.launcher3.taskbar package tests

persistent taskbar and transient taskbar manual testing:
- on launcher home screen expand bubble bar, switch between bubbles,
remove bubble via bubble menu, add bubble, remove bubble with the drug
gesture, add bubble, collapse bubble bar
- repeat previous test on launcher overview screen and inside any
application
- after last test drag expanded bubble view to the opposite side of the
screen

Change-Id: I50f2c510854c4895fdfc9bd453a261c2103286fd
This commit is contained in:
mpodolian committed 2024-07-30 18:36:05 -07:00
1 parent 369a5e749b
commit 484ff0fe9c
20 files changed
+169 -549

No files matched your search

@@ -39,6 +39,7 @@ 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.taskbar.bubbles.stashing.BubbleStashController;
import com.android.launcher3.util.MultiPropertyFactory;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.quickstep.SystemUiProxy;
@@ -92,7 +93,7 @@ public class BubbleBarViewController {
private BubbleBarViewAnimator mBubbleBarViewAnimator;
private TimeSource mTimeSource = System::currentTimeMillis;
private final TimeSource mTimeSource = System::currentTimeMillis;
@Nullable
private BubbleBarBoundsChangeListener mBoundsChangeListener;
@@ -386,7 +387,8 @@ public class BubbleBarViewController {
int newIconSize;
int newPadding;
Resources res = mActivity.getResources();
if (mBubbleStashController.isBubblesShowingOnHome()) {
if (mBubbleStashController.isBubblesShowingOnHome()
|| mBubbleStashController.isTransientTaskBar()) {
newIconSize = getBubbleBarIconSizeFromDeviceProfile(res);
newPadding = getBubbleBarPaddingFromDeviceProfile(res);
} else {
@@ -507,7 +509,8 @@ public class BubbleBarViewController {
// the bubble bar and handle are initialized as part of the first bubble animation.
// if the animation is suppressed, immediately stash or show the bubble bar to
// ensure they've been initialized.
if (mTaskbarStashController.isInApp()) {
if (mTaskbarStashController.isInApp()
&& mBubbleStashController.isTransientTaskBar()) {
mBubbleStashController.stashBubbleBarImmediate();
} else {
mBubbleStashController.showBubbleBarImmediate();
@@ -530,14 +533,15 @@ public class BubbleBarViewController {
mBubbleBarViewAnimator.animateToInitialState(bubble, isInApp, isExpanding);
return;
}
if (mBubbleStashController.isBubblesShowingOnHome() && !isExpanding && !isExpanded()) {
boolean persistentTaskbarOrOnHome = mBubbleStashController.isBubblesShowingOnHome()
|| !mBubbleStashController.isTransientTaskBar();
if (persistentTaskbarOrOnHome && !isExpanding && !isExpanded()) {
mBubbleBarViewAnimator.animateBubbleBarForCollapsed(bubble);
return;
}
// only animate the new bubble if we're in an app and not auto expanding
if (isInApp && !isExpanding && !isExpanded()) {
// only animate the new bubble if we're in an app, have handle view and not auto expanding
if (isInApp && !isExpanding && mBubbleStashController.getHasHandleView() && !isExpanded()) {
mBubbleBarViewAnimator.animateBubbleInForStashed(bubble);
}
}
@@ -598,6 +602,7 @@ public class BubbleBarViewController {
/**
* Updates the dragged bubble view in the bubble bar view, and notifies SystemUI
* that a bubble is being dragged to dismiss.
*
* @param bubbleView dragged bubble view
*/
public void onBubbleDragStart(@NonNull BubbleView bubbleView) {