Update placement of the hotseat according to the bubble bar location.
Update the hotseat and Qsb placement according to the 3 nav buttons bar. Test: Manual. Set navigation mode to 3 buttons. On launcher home screen move the bubble bar from one side to another. Observe that the Hotseat and Qsb moving together with the navigation bar. Once moved the bubble bar, expand the bubble bar and collapse it. Observe how the Hotseat is stashing and un-stashing. After bubble bar changes position hit the recent apps button, observe the transition. On launcher home screen start application with the hotseat icon and exit opened application. Observe that flying icon comes back to the correct position in the hotseat. Video with the above scenarios: http://recall/-/gx8ASgewUeUS3QYohfrd1J/blTYrKopTyufOcRoPuVpYK Bug: 346381754 Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar Change-Id: Ic8c6acdffbbb111cbe4f3fd6bc60195578d7035d
This commit is contained in:
@@ -201,6 +201,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
|
||||
private final Rect mFloatingRotationButtonBounds = new Rect();
|
||||
|
||||
private @Nullable BubbleBarLocation mBubbleBarLocation;
|
||||
|
||||
// Initialized in init.
|
||||
private TaskbarControllers mControllers;
|
||||
private boolean mIsImeRenderingNavButtons;
|
||||
@@ -1174,6 +1176,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
/** Adjusts navigation buttons layout accordingly to the bubble bar position. */
|
||||
@Override
|
||||
public void onBubbleBarLocationUpdated(BubbleBarLocation location) {
|
||||
mBubbleBarLocation = location;
|
||||
mNavButtonContainer.setTranslationX(getNavBarTranslationX(location));
|
||||
}
|
||||
|
||||
@@ -1181,6 +1184,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
@Override
|
||||
public void onBubbleBarLocationAnimated(BubbleBarLocation location) {
|
||||
// TODO(b/346381754) add the teleport animation similarly to the bubble bar
|
||||
mBubbleBarLocation = location;
|
||||
mNavButtonContainer.setTranslationX(getNavBarTranslationX(location));
|
||||
}
|
||||
|
||||
@@ -1221,9 +1225,12 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
public void onTaskbarLayoutChange() {
|
||||
if (com.android.wm.shell.Flags.enableBubbleBarInPersistentTaskBar()
|
||||
&& mControllers.bubbleControllers.isPresent()) {
|
||||
BubbleBarLocation bubblesLocation = mControllers.bubbleControllers.get()
|
||||
.bubbleBarViewController.getBubbleBarLocation();
|
||||
onBubbleBarLocationUpdated(bubblesLocation);
|
||||
if (mBubbleBarLocation == null) {
|
||||
// only set bubble bar location if it was not set before, e.g. at device boot
|
||||
mBubbleBarLocation = mControllers.bubbleControllers.get()
|
||||
.bubbleBarViewController.getBubbleBarLocation();
|
||||
}
|
||||
onBubbleBarLocationUpdated(mBubbleBarLocation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user