Revert "Synchronize bar expansion with WM Shell"

Revert submission 28703070-bubbles-defer-expand

Reason for revert: DroidMonitor. Potential culprit for b/359765550 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:28703070-bubbles-defer-expand

Change-Id: I5651cc8f740b1f0718abcfa8065e18c174657224
This commit is contained in:
Liana Kazanova (xWF)
2024-08-14 16:58:02 +00:00
committed by Android (Google) Code Review
parent 9b559c48a3
commit 799802cb7e
5 changed files with 22 additions and 158 deletions
@@ -495,11 +495,6 @@ public class BubbleBarController extends IBubblesListener.Stub {
() -> mBubbleBarViewController.animateBubbleBarLocation(bubbleBarLocation));
}
/** Notifies WMShell to show the expanded view. */
void showExpandedView() {
mSystemUiProxy.showExpandedView();
}
//
// Loading data for the bubbles
//
@@ -119,8 +119,7 @@ public class BubbleBarViewController {
mBubbleDragController = bubbleControllers.bubbleDragController;
mTaskbarStashController = controllers.taskbarStashController;
mTaskbarInsetsController = controllers.taskbarInsetsController;
mBubbleBarViewAnimator = new BubbleBarViewAnimator(
mBarView, mBubbleStashController, mBubbleBarController::showExpandedView);
mBubbleBarViewAnimator = new BubbleBarViewAnimator(mBarView, mBubbleStashController);
mTaskbarViewPropertiesProvider = taskbarViewPropertiesProvider;
onBubbleBarConfigurationChanged(/* animate= */ false);
mActivity.addOnDeviceProfileChangeListener(
@@ -36,7 +36,6 @@ class BubbleBarViewAnimator
constructor(
private val bubbleBarView: BubbleBarView,
private val bubbleStashController: BubbleStashController,
private val onExpanded: Runnable,
private val scheduler: Scheduler = HandlerScheduler(bubbleBarView)
) {
@@ -407,7 +406,7 @@ constructor(
springBackAnimation.spring(DynamicAnimation.TRANSLATION_Y, ty)
springBackAnimation.addEndListener { _, _, _, _, _, _, _ ->
if (animatingBubble?.expand == true) {
expandBubbleBar()
bubbleBarView.isExpanded = true
cancelHideAnimation()
} else {
moveToState(AnimatingBubble.State.IN)
@@ -418,7 +417,7 @@ constructor(
ObjectAnimator.ofFloat(bubbleBarView, View.TRANSLATION_Y, ty - bubbleBarBounceDistanceInPx)
.withDuration(BUBBLE_BAR_BOUNCE_ANIMATION_DURATION_MS)
.withEndAction {
if (animatingBubble?.expand == true) expandBubbleBar()
if (animatingBubble?.expand == true) bubbleBarView.isExpanded = true
springBackAnimation.start()
}
.start()
@@ -452,7 +451,7 @@ constructor(
this.animatingBubble = animatingBubble.copy(expand = true)
// if we're fully in and waiting to hide, cancel the hide animation and clean up
if (animatingBubble.state == AnimatingBubble.State.IN) {
expandBubbleBar()
bubbleBarView.isExpanded = true
cancelHideAnimation()
}
}
@@ -490,11 +489,6 @@ constructor(
this.animatingBubble = animatingBubble.copy(state = state)
}
private fun expandBubbleBar() {
bubbleBarView.isExpanded = true
onExpanded.run()
}
/**
* Tracks the translation Y of the bubble bar during the animation. When the bubble bar expands
* as part of the animation, the expansion should start after the bubble bar reaches the peak
@@ -516,7 +510,7 @@ constructor(
}
val expand = animatingBubble?.expand ?: false
if (reachedPeak && expand && !startedExpanding) {
expandBubbleBar()
bubbleBarView.isExpanded = true
startedExpanding = true
}
previousTy = ty
@@ -923,17 +923,6 @@ public class SystemUiProxy implements ISystemUiProxy, NavHandle, SafeCloseable {
}
}
/** Tells SysUI to show the expanded view. */
public void showExpandedView() {
try {
if (mBubbles != null) {
mBubbles.showExpandedView();
}
} catch (RemoteException e) {
Log.w(TAG, "Failed to call showExpandedView");
}
}
//
// Splitscreen
//