Loading quickstep/res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,7 @@ <dimen name="bubblebar_stashed_handle_height">@dimen/taskbar_stashed_handle_height</dimen> <dimen name="bubblebar_pointer_size">8dp</dimen> <dimen name="bubblebar_elevation">1dp</dimen> <dimen name="bubblebar_hotseat_adjustment_threshold">90dp</dimen> <dimen name="bubblebar_icon_size">50dp</dimen> <dimen name="bubblebar_badge_size">24dp</dimen> Loading quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +24 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.logging.InstanceId; import com.android.launcher3.logging.InstanceIdSequence; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.taskbar.bubbles.BubbleBarController; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.MultiPropertyFactory; Loading Loading @@ -202,10 +203,18 @@ public class LauncherTaskbarUIController extends TaskbarUIController { return mTaskbarLauncherStateController.applyState(fromInit ? 0 : duration, startAnimation); } @Override public void refreshResumedState() { onLauncherResumedOrPaused(mLauncher.hasBeenResumed()); } @Override public void adjustHotseatForBubbleBar(boolean isBubbleBarVisible) { if (mLauncher.getHotseat() != null) { mLauncher.getHotseat().adjustForBubbleBar(isBubbleBarVisible); } } /** * Create Taskbar animation when going from an app to Launcher as part of recents transition. * @param toState If known, the state we will end up in when reaching Launcher. Loading Loading @@ -327,6 +336,21 @@ public class LauncherTaskbarUIController extends TaskbarUIController { return mTaskbarInAppDisplayProgress.value > 0; } public boolean isBubbleBarEnabled() { return BubbleBarController.BUBBLE_BAR_ENABLED; } /** Whether the bubble bar has any bubbles. */ public boolean hasBubbles() { if (mControllers == null) { return false; } if (mControllers.bubbleControllers.isEmpty()) { return false; } return mControllers.bubbleControllers.get().bubbleBarViewController.hasBubbles(); } @Override public void onExpandPip() { super.onExpandPip(); Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +5 −0 Original line number Diff line number Diff line Loading @@ -302,6 +302,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mNavMode = DisplayController.getNavigationMode(this); } /** Called when the visibility of the bubble bar changed. */ public void bubbleBarVisibilityChanged(boolean isVisible) { mControllers.uiController.adjustHotseatForBubbleBar(isVisible); mControllers.taskbarViewController.resetIconAlignmentController(); } public void init(@NonNull TaskbarSharedState sharedState) { mImeDrawsImeNavBar = getBoolByName(IME_DRAWS_IME_NAV_BAR_RES_NAME, getResources(), false); Loading quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import com.android.quickstep.views.TaskView.TaskIdAttributeContainer; import com.android.systemui.shared.recents.model.Task; import java.io.PrintWriter; import java.util.Arrays; import java.util.Collections; import java.util.stream.Stream; Loading Loading @@ -336,4 +335,7 @@ public class TaskbarUIController { .stream() .map(mControllers.taskbarPopupController::createSplitShortcutFactory); } /** Adjusts the hotseat for the bubble bar. */ public void adjustHotseatForBubbleBar(boolean isBubbleBarVisible) {} } quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +22 −3 Original line number Diff line number Diff line Loading @@ -448,6 +448,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar } } /** Resets the icon alignment controller so that it can be recreated again later. */ void resetIconAlignmentController() { mIconAlignControllerLazy = null; } /** * Creates an animation for aligning the Taskbar icons with the provided Launcher device profile */ Loading Loading @@ -564,9 +569,18 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar continue; } float hotseatIconCenter = hotseatPadding.left float hotseatAdjustedBorderSpace = launcherDp.getHotseatAdjustedBorderSpaceForBubbleBar(child.getContext()); float hotseatIconCenter; if (bubbleBarHasBubbles() && hotseatAdjustedBorderSpace != 0) { hotseatIconCenter = hotseatPadding.left + hotseatCellSize + (hotseatCellSize + hotseatAdjustedBorderSpace) * positionInHotseat + hotseatCellSize / 2f; } else { hotseatIconCenter = hotseatPadding.left + (hotseatCellSize + borderSpacing) * positionInHotseat + hotseatCellSize / 2f; } float childCenter = (child.getLeft() + child.getRight()) / 2f; float toX = hotseatIconCenter - childCenter; if (child instanceof Reorderable) { Loading @@ -588,6 +602,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar return controller; } private boolean bubbleBarHasBubbles() { return mControllers.bubbleControllers.isPresent() && mControllers.bubbleControllers.get().bubbleBarViewController.hasBubbles(); } public void onRotationChanged(DeviceProfile deviceProfile) { if (!mControllers.uiController.isIconAlignedWithHotseat()) { // We only translate on rotation when icon is aligned with hotseat Loading Loading
quickstep/res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,7 @@ <dimen name="bubblebar_stashed_handle_height">@dimen/taskbar_stashed_handle_height</dimen> <dimen name="bubblebar_pointer_size">8dp</dimen> <dimen name="bubblebar_elevation">1dp</dimen> <dimen name="bubblebar_hotseat_adjustment_threshold">90dp</dimen> <dimen name="bubblebar_icon_size">50dp</dimen> <dimen name="bubblebar_badge_size">24dp</dimen> Loading
quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +24 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.logging.InstanceId; import com.android.launcher3.logging.InstanceIdSequence; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.taskbar.bubbles.BubbleBarController; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.MultiPropertyFactory; Loading Loading @@ -202,10 +203,18 @@ public class LauncherTaskbarUIController extends TaskbarUIController { return mTaskbarLauncherStateController.applyState(fromInit ? 0 : duration, startAnimation); } @Override public void refreshResumedState() { onLauncherResumedOrPaused(mLauncher.hasBeenResumed()); } @Override public void adjustHotseatForBubbleBar(boolean isBubbleBarVisible) { if (mLauncher.getHotseat() != null) { mLauncher.getHotseat().adjustForBubbleBar(isBubbleBarVisible); } } /** * Create Taskbar animation when going from an app to Launcher as part of recents transition. * @param toState If known, the state we will end up in when reaching Launcher. Loading Loading @@ -327,6 +336,21 @@ public class LauncherTaskbarUIController extends TaskbarUIController { return mTaskbarInAppDisplayProgress.value > 0; } public boolean isBubbleBarEnabled() { return BubbleBarController.BUBBLE_BAR_ENABLED; } /** Whether the bubble bar has any bubbles. */ public boolean hasBubbles() { if (mControllers == null) { return false; } if (mControllers.bubbleControllers.isEmpty()) { return false; } return mControllers.bubbleControllers.get().bubbleBarViewController.hasBubbles(); } @Override public void onExpandPip() { super.onExpandPip(); Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +5 −0 Original line number Diff line number Diff line Loading @@ -302,6 +302,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mNavMode = DisplayController.getNavigationMode(this); } /** Called when the visibility of the bubble bar changed. */ public void bubbleBarVisibilityChanged(boolean isVisible) { mControllers.uiController.adjustHotseatForBubbleBar(isVisible); mControllers.taskbarViewController.resetIconAlignmentController(); } public void init(@NonNull TaskbarSharedState sharedState) { mImeDrawsImeNavBar = getBoolByName(IME_DRAWS_IME_NAV_BAR_RES_NAME, getResources(), false); Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import com.android.quickstep.views.TaskView.TaskIdAttributeContainer; import com.android.systemui.shared.recents.model.Task; import java.io.PrintWriter; import java.util.Arrays; import java.util.Collections; import java.util.stream.Stream; Loading Loading @@ -336,4 +335,7 @@ public class TaskbarUIController { .stream() .map(mControllers.taskbarPopupController::createSplitShortcutFactory); } /** Adjusts the hotseat for the bubble bar. */ public void adjustHotseatForBubbleBar(boolean isBubbleBarVisible) {} }
quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +22 −3 Original line number Diff line number Diff line Loading @@ -448,6 +448,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar } } /** Resets the icon alignment controller so that it can be recreated again later. */ void resetIconAlignmentController() { mIconAlignControllerLazy = null; } /** * Creates an animation for aligning the Taskbar icons with the provided Launcher device profile */ Loading Loading @@ -564,9 +569,18 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar continue; } float hotseatIconCenter = hotseatPadding.left float hotseatAdjustedBorderSpace = launcherDp.getHotseatAdjustedBorderSpaceForBubbleBar(child.getContext()); float hotseatIconCenter; if (bubbleBarHasBubbles() && hotseatAdjustedBorderSpace != 0) { hotseatIconCenter = hotseatPadding.left + hotseatCellSize + (hotseatCellSize + hotseatAdjustedBorderSpace) * positionInHotseat + hotseatCellSize / 2f; } else { hotseatIconCenter = hotseatPadding.left + (hotseatCellSize + borderSpacing) * positionInHotseat + hotseatCellSize / 2f; } float childCenter = (child.getLeft() + child.getRight()) / 2f; float toX = hotseatIconCenter - childCenter; if (child instanceof Reorderable) { Loading @@ -588,6 +602,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar return controller; } private boolean bubbleBarHasBubbles() { return mControllers.bubbleControllers.isPresent() && mControllers.bubbleControllers.get().bubbleBarViewController.hasBubbles(); } public void onRotationChanged(DeviceProfile deviceProfile) { if (!mControllers.uiController.isIconAlignedWithHotseat()) { // We only translate on rotation when icon is aligned with hotseat Loading