From 17fd5f13f48fe3cbc248832b2bb1aaf5b1e039d2 Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Thu, 3 Apr 2025 10:18:23 -0700 Subject: [PATCH] Remove unused overviewActionsButtonSpacing from DeviceProfile Bug: 404479758 Flag: EXEMPT. Clean-up code. Test: DeviceProfileDumpTest Test: DeviceProfileAlternativeDisplaysDumpTest Test: DeviceDefaultGridTest Change-Id: Ieb9ec81f82e80d293f04de71d5c2575a4ce50301 --- res/values/dimens.xml | 1 - src/com/android/launcher3/DeviceProfile.java | 6 ------ .../dumpTests/DeviceProfileDumpTest/phonePortrait.txt | 1 - .../DeviceProfileDumpTest/phonePortrait3Button.txt | 1 - .../dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt | 1 - .../DeviceProfileDumpTest/phoneVerticalBar3Button.txt | 1 - .../dumpTests/DeviceProfileDumpTest/tabletLandscape.txt | 1 - .../DeviceProfileDumpTest/tabletLandscape3Button.txt | 1 - .../dumpTests/DeviceProfileDumpTest/tabletPortrait.txt | 1 - .../DeviceProfileDumpTest/tabletPortrait3Button.txt | 1 - .../dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt | 1 - .../DeviceProfileDumpTest/twoPanelLandscape3Button.txt | 1 - .../twoPanelLandscape3Button_decoupleDepth.txt | 1 - .../twoPanelLandscape_decoupleDepth.txt | 1 - .../dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt | 1 - .../DeviceProfileDumpTest/twoPanelPortrait3Button.txt | 1 - .../twoPanelPortrait3Button_decoupleDepth.txt | 1 - .../twoPanelPortrait_decoupleDepth.txt | 1 - 18 files changed, 23 deletions(-) diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 671e2e2159..346b9bf456 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -493,7 +493,6 @@ 0dp 0dp 0dp - 0dp 0dp 0dp 0dp diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index e17f5b26c5..71fdf0751b 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -270,7 +270,6 @@ public class DeviceProfile { public int overviewTaskThumbnailTopMarginPx; public final int overviewActionsHeight; public final int overviewActionsTopMarginPx; - public final int overviewActionsButtonSpacing; public int overviewPageSpacing; public int overviewRowSpacing; public int overviewGridSideMargin; @@ -373,7 +372,6 @@ public class DeviceProfile { numShownAllAppsColumns = 0; overviewActionsHeight = 0; overviewActionsTopMarginPx = 0; - overviewActionsButtonSpacing = 0; mViewScaleProvider = null; mDotRendererWorkSpace = null; mDotRendererAllApps = null; @@ -784,8 +782,6 @@ public class DeviceProfile { overviewActionsTopMarginPx = Flags.floatingSearchBar() ? 0 : 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); overviewActionsHeight = res.getDimensionPixelSize(R.dimen.overview_actions_height); overviewRowSpacing = res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing); overviewGridSideMargin = res.getDimensionPixelSize(R.dimen.overview_grid_side_margin); @@ -2393,8 +2389,6 @@ public class DeviceProfile { overviewActionsHeight)); writer.println(prefix + pxToDpStr("overviewActionsClaimedSpaceBelow", getOverviewActionsClaimedSpaceBelow())); - writer.println(prefix + pxToDpStr("overviewActionsButtonSpacing", - overviewActionsButtonSpacing)); writer.println(prefix + pxToDpStr("overviewPageSpacing", overviewPageSpacing)); writer.println(prefix + pxToDpStr("overviewRowSpacing", overviewRowSpacing)); writer.println(prefix + pxToDpStr("overviewGridSideMargin", overviewGridSideMargin)); diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt index 6a0d774a45..5015cf06d4 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 63.0px (24.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt index 9e2397c62b..606153361a 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 126.0px (48.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt index f25ab42f87..4198956797 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 63.0px (24.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt index 053dd62a08..b9d4c01c69 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt index 958597f73e..615ed04771 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt index aad67b4d9a..da27168b8c 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt index 090e54b681..15f8f343b8 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt index 43b1a6518d..baaa210133 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt index fe5737e45a..787a077bfd 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt index 36e47a0874..3ee747c18c 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button_decoupleDepth.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button_decoupleDepth.txt index 52fea057fe..414b262101 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button_decoupleDepth.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button_decoupleDepth.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape_decoupleDepth.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape_decoupleDepth.txt index 6d972a8e34..04c8cebb3d 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape_decoupleDepth.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape_decoupleDepth.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt index 417353dc6a..eae7abe267 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt index 03dc23a798..e7d38d3aa7 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button_decoupleDepth.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button_decoupleDepth.txt index 45d3171525..85f4713ca4 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button_decoupleDepth.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button_decoupleDepth.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp) diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait_decoupleDepth.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait_decoupleDepth.txt index 55322d6745..eda5bda750 100644 --- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait_decoupleDepth.txt +++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait_decoupleDepth.txt @@ -117,7 +117,6 @@ DeviceProfile: overviewActionsTopMarginPx: 0.0px (0.0dp) overviewActionsHeight: 0.0px (0.0dp) overviewActionsClaimedSpaceBelow: 0.0px (0.0dp) - overviewActionsButtonSpacing: 0.0px (0.0dp) overviewPageSpacing: 0.0px (0.0dp) overviewRowSpacing: 0.0px (0.0dp) overviewGridSideMargin: 0.0px (0.0dp)