From 3c2c3f1aea02788d44ace9023be0a09720aa7e95 Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Mon, 16 May 2022 20:37:43 -0700 Subject: [PATCH] Remove deprecated verticalBar layout in Overview Removes code that was intended for a now-deprecated layout style in Overview. See ag/18386646 for an example of an issue caused by this. Bug: 232298587 Test: Manual on 3 devices Change-Id: Icfd40e1e5a99cf5821b1c46357db58a31daaa835 --- quickstep/res/values-land/dimens.xml | 3 ++- .../android/quickstep/views/OverviewActionsView.java | 12 ------------ src/com/android/launcher3/DeviceProfile.java | 5 +---- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/quickstep/res/values-land/dimens.xml b/quickstep/res/values-land/dimens.xml index f233bde73a..732f511367 100644 --- a/quickstep/res/values-land/dimens.xml +++ b/quickstep/res/values-land/dimens.xml @@ -15,7 +15,8 @@ limitations under the License. --> - 8dp + + 12dp 126dp diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java index 1c4e497332..31334531fd 100644 --- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java +++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java @@ -22,10 +22,8 @@ import android.graphics.Rect; import android.util.AttributeSet; import android.view.View; import android.view.View.OnClickListener; -import android.view.ViewGroup; import android.widget.Button; import android.widget.FrameLayout; -import android.widget.LinearLayout; import androidx.annotation.IntDef; import androidx.annotation.Nullable; @@ -233,10 +231,6 @@ public class OverviewActionsView extends FrameLayo return 0; } - if (mDp.isVerticalBarLayout()) { - return mDp.getInsets().bottom; - } - if (!mDp.isGestureMode && mDp.isTaskbarPresent) { return mDp.getOverviewActionsClaimedSpaceBelow(); } @@ -254,12 +248,6 @@ public class OverviewActionsView extends FrameLayo mTaskSize.set(taskSize); updateVerticalMargin(DisplayController.getNavigationMode(getContext())); - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( - dp.isVerticalBarLayout() ? 0 : dp.overviewActionsButtonSpacing, - ViewGroup.LayoutParams.MATCH_PARENT); - params.weight = dp.isVerticalBarLayout() ? 1 : 0; - findViewById(R.id.action_split_space).setLayoutParams(params); - requestLayout(); mSplitButton.setCompoundDrawablesWithIntrinsicBounds( diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 515221752a..1e3aa0debd 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -411,10 +411,7 @@ public class DeviceProfile { overviewTaskIconDrawableSizeGridPx = res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_drawable_size_grid); overviewTaskThumbnailTopMarginPx = overviewTaskIconSizePx + overviewTaskMarginPx * 2; - // In vertical bar, use the smaller task margin for the top regardless of mode. - overviewActionsTopMarginPx = isVerticalBarLayout() - ? overviewTaskMarginPx - : res.getDimensionPixelSize(R.dimen.overview_actions_top_margin); + overviewActionsTopMarginPx = res.getDimensionPixelSize(R.dimen.overview_actions_top_margin); overviewPageSpacing = res.getDimensionPixelSize(R.dimen.overview_page_spacing); overviewActionsButtonSpacing = res.getDimensionPixelSize( R.dimen.overview_actions_button_spacing);