Merge "Revert "Make hotseat bottom a launcher config""

This commit is contained in:
Pratyush authored and Android (Google) Code Review committed 2021-09-15 09:15:57 +00:00
commit fa29127c48
2 files changed
+4 -13

No files matched your search

+4 -5
View File
@@ -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);
}
}