Add teleport animation to the navigation bar.

Whenever the location of the bubble bar is changed, the navigation bar
moves with a "teleport" animation to the opposite side.

Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: manual. Drag bubble bar from one location to another observe that
navigation is animated to the opposite side.
Video: http://recall/-/gx8ASgewUeUS3QYohfrd1J/g3zFtGYWFpCsBTkoCAhBUH

Change-Id: I6e32bb7ff7be56a0b616fec8485cc6a97d7ac872
This commit is contained in:
mpodolian
2024-09-24 11:49:22 -07:00
parent 6f231f694d
commit 26ed420173
4 changed files with 233 additions and 100 deletions
@@ -84,7 +84,6 @@ import com.android.wm.shell.shared.bubbles.BubbleBarLocation;
import java.io.PrintWriter;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.function.Predicate;
@@ -160,7 +159,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
private final View.OnLayoutChangeListener mTaskbarViewLayoutChangeListener =
(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
updateTaskbarIconTranslationXForPinning();
mControllers.navbarButtonsViewController.onTaskbarLayoutChange();
mControllers.navbarButtonsViewController.onTaskbarLayoutChanged();
};
// Animation to align icons with Launcher, created lazily. This allows the controller to be