From 8c2932567b70480687df08029f8a2b17f66f7277 Mon Sep 17 00:00:00 2001 From: Pratyush Date: Wed, 15 Sep 2021 08:30:08 +0000 Subject: [PATCH] Revert "Make hotseat bottom a launcher config" Revert "Add vendor/unbundled_google/packages/LauncherIndiaGoogle..." Revert "Create a new launcher for lily" Revert submission 15080460-lily-launcher-master Reason for revert: Reverted Changes: I0b2d19ee7:Make hotseat bottom a launcher config I0bb4c815c:Add vendor/unbundled_google/packages/LauncherIndia... I666ce8258:Create a new launcher for lily I4d078a9d9:Move QSB to bottom of the home screen in LauncherL... Change-Id: Ib9f32150de561dcd56122761975abe8828839f40 --- res/values/dimens.xml | 8 -------- src/com/android/launcher3/DeviceProfile.java | 9 ++++----- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 8f263a696f..bb06be8e55 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -35,14 +35,6 @@ 8dp 2dp - 0dp - - - - 0.325 - 0dp 34dp diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index b5038934b1..b7d0481c96 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -53,7 +53,7 @@ public class DeviceProfile { private static final int DEFAULT_DOT_SIZE = 100; // Ratio of empty space, qsb should take up to appear visually centered. - private final float mQsbCenterFactor; + private static final float QSB_CENTER_FACTOR = .325f; public final InvariantDeviceProfile inv; private final Info mInfo; @@ -253,7 +253,7 @@ public class DeviceProfile { aspectRatio = ((float) Math.max(widthPx, heightPx)) / Math.min(widthPx, heightPx); boolean isTallDevice = Float.compare(aspectRatio, TALL_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0; - mQsbCenterFactor=context.getResources().getFloat(R.dimen.qsb_center_factor); + // Some more constants context = getContext(context, info, isVerticalBarLayout() ? Configuration.ORIENTATION_LANDSCAPE @@ -339,8 +339,7 @@ public class DeviceProfile { hotseatBarSizeExtraSpacePx = 0; hotseatBarTopPaddingPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_top_padding); - hotseatBarBottomPaddingPx = (isTallDevice ? res.getDimensionPixelSize( - R.dimen.dynamic_grid_hotseat_bottom_tall_padding) + hotseatBarBottomPaddingPx = (isTallDevice ? 0 : res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_non_tall_padding)) + res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_padding); hotseatBarSidePaddingEndPx = @@ -919,7 +918,7 @@ public class DeviceProfile { if (isScalableGrid && qsbBottomMarginPx > mInsets.bottom) { return Math.min(qsbBottomMarginPx, freeSpace); } else { - return (int) (freeSpace * mQsbCenterFactor) + return (int) (freeSpace * QSB_CENTER_FACTOR) + (isTaskbarPresent ? taskbarSize : mInsets.bottom); } }