Remove usage of the enableBubbleBarInPersistentTaskBar flag.

Remove and merge the usage of the enableBubbleBarInPersistentTaskBar
flag to the enableBubbleBar flag.

Bug: 383181643
Flag: com.android.wm.shell.enable_bubble_bar
Test: NONE - removed and merged flag usage.
Change-Id: I4f131e1ddf8367425b91c8fb597857ee222b75d8
This commit is contained in:
mpodolian
2024-12-09 15:27:48 -08:00
parent 5f5b1a3f56
commit 3e419ebbf1
7 changed files with 10 additions and 26 deletions
@@ -51,7 +51,6 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_S
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SHORTCUT_HELPER_SHOWING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
import static com.android.window.flags.Flags.predictiveBackThreeButtonNav;
import static com.android.wm.shell.Flags.enableBubbleBarInPersistentTaskBar;
import android.animation.Animator;
import android.animation.ArgbEvaluator;
@@ -1348,8 +1347,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|| mNavButtonsView.getWidth() == 0) {
return;
}
if (enableBubbleBarInPersistentTaskBar()
&& mControllers.bubbleControllers.isPresent()) {
if (mControllers.bubbleControllers.isPresent()) {
if (mBubbleBarTargetLocation == null) {
// only set bubble bar location if it was not set before
mBubbleBarTargetLocation = mControllers.bubbleControllers.get()
@@ -163,7 +163,6 @@ import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags;
import com.android.systemui.unfold.updates.RotationChangeProvider;
import com.android.systemui.unfold.util.ScopedUnfoldTransitionProgressProvider;
import com.android.wm.shell.Flags;
import java.io.PrintWriter;
import java.util.Collections;
@@ -277,12 +276,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
TaskbarScrimView taskbarScrimView = mDragLayer.findViewById(R.id.taskbar_scrim);
NearestTouchFrame navButtonsView = mDragLayer.findViewById(R.id.navbuttons_view);
StashedHandleView stashedHandleView = mDragLayer.findViewById(R.id.stashed_handle);
BubbleBarView bubbleBarView = null;
FrameLayout bubbleBarContainer = null;
if (isTransientTaskbar || Flags.enableBubbleBarInPersistentTaskBar()) {
bubbleBarView = mDragLayer.findViewById(R.id.taskbar_bubbles);
bubbleBarContainer = mDragLayer.findViewById(R.id.taskbar_bubbles_container);
}
BubbleBarView bubbleBarView = mDragLayer.findViewById(R.id.taskbar_bubbles);
FrameLayout bubbleBarContainer = mDragLayer.findViewById(R.id.taskbar_bubbles_container);
StashedHandleView bubbleHandleView = mDragLayer.findViewById(R.id.stashed_bubble_handle);
mAccessibilityDelegate = new TaskbarShortcutMenuAccessibilityDelegate(this);
@@ -772,7 +772,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
* aligned - returns 0.
*/
public float getTranslationXForBubbleBarPosition(BubbleBarLocation location) {
if (!mControllerCallbacks.isBubbleBarEnabledInPersistentTaskbar()
if (!mControllerCallbacks.isBubbleBarEnabled()
|| location == mBubbleBarLocation
|| !mActivityContext.shouldStartAlignTaskbar()
) {
@@ -792,7 +792,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
int iconEnd = centerAlignIconEnd;
if (mShouldTryStartAlign) {
int startSpacingPx = deviceProfile.inlineNavButtonsEndSpacingPx;
if (mControllerCallbacks.isBubbleBarEnabledInPersistentTaskbar()
if (mControllerCallbacks.isBubbleBarEnabled()
&& mBubbleBarLocation != null
&& mActivityContext.shouldStartAlignTaskbar()) {
iconEnd = (int) getTaskBarIconsEndForBubbleBarLocation(mBubbleBarLocation);
@@ -36,7 +36,6 @@ import com.android.internal.jank.Cuj;
import com.android.launcher3.taskbar.bubbles.BubbleBarViewController;
import com.android.launcher3.util.DisplayController;
import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
import com.android.wm.shell.Flags;
import com.android.wm.shell.shared.bubbles.BubbleBarLocation;
/**
@@ -159,10 +158,9 @@ public class TaskbarViewCallbacks {
.orElse(0f);
}
/** Returns true if bubble bar controllers present and enabled in persistent taskbar. */
public boolean isBubbleBarEnabledInPersistentTaskbar() {
return Flags.enableBubbleBarInPersistentTaskBar()
&& mControllers.bubbleControllers.isPresent();
/** Returns true if bubble bar controllers are present. */
public boolean isBubbleBarEnabled() {
return mControllers.bubbleControllers.isPresent();
}
/** Returns on click listener for the taskbar overflow view. */
@@ -90,7 +90,6 @@ import com.android.launcher3.util.MultiTranslateDelegate;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.quickstep.util.GroupTask;
import com.android.systemui.shared.recents.model.Task;
import com.android.wm.shell.Flags;
import com.android.wm.shell.shared.bubbles.BubbleBarLocation;
import java.io.PrintWriter;
@@ -303,8 +302,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
/** Returns whether taskbar should be moved on the bubble bar location update. */
private boolean shouldMoveTaskbarOnBubbleBarLocationUpdate() {
return Flags.enableBubbleBarInPersistentTaskBar()
&& mControllers.bubbleControllers.isPresent()
return mControllers.bubbleControllers.isPresent()
&& mActivity.shouldStartAlignTaskbar()
&& mActivity.isThreeButtonNav();
}
@@ -65,7 +65,6 @@ import static com.android.quickstep.util.AnimUtils.completeRunnableListCallback;
import static com.android.quickstep.util.SplitAnimationTimings.TABLET_HOME_TO_SPLIT;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY;
import static com.android.wm.shell.Flags.enableBubbleAnything;
import static com.android.wm.shell.Flags.enableBubbleBarInPersistentTaskBar;
import static com.android.wm.shell.shared.split.SplitScreenConstants.SNAP_TO_2_50_50;
import android.animation.Animator;
@@ -1134,9 +1133,7 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
/** Provides the translation X for the hotseat item. */
public int getHotseatItemTranslationX(ItemInfo itemInfo) {
int translationX = 0;
if (isBubbleBarEnabled()
&& enableBubbleBarInPersistentTaskBar()
&& mBubbleBarLocation != null) {
if (isBubbleBarEnabled() && mBubbleBarLocation != null) {
boolean isBubblesOnLeft = mBubbleBarLocation.isOnLeft(isRtl(getResources()));
translationX += mDeviceProfile
.getHotseatTranslationXForNavBar(this, isBubblesOnLeft);
@@ -33,7 +33,6 @@ import static com.android.launcher3.testing.shared.ResourceUtils.INVALID_RESOURC
import static com.android.launcher3.testing.shared.ResourceUtils.pxFromDp;
import static com.android.launcher3.testing.shared.ResourceUtils.roundPxValueFromFloat;
import static com.android.wm.shell.Flags.enableBubbleBar;
import static com.android.wm.shell.Flags.enableBubbleBarInPersistentTaskBar;
import static com.android.wm.shell.Flags.enableTinyTaskbar;
import android.annotation.SuppressLint;
@@ -2433,7 +2432,6 @@ public class DeviceProfile {
*/
public boolean shouldAdjustHotseatOnNavBarLocationUpdate(Context context) {
return enableBubbleBar()
&& enableBubbleBarInPersistentTaskBar()
&& !DisplayController.getNavigationMode(context).hasGestures;
}