Merge "Fix QSB and Hotseat positions when ENABLE_DEVICE_SEARCH is enabled" into sc-dev

This commit is contained in:
Tony Wickham 2021-03-19 17:32:19 +00:00 committed by Android (Google) Code Review
commit ff78367361
1 changed files with 2 additions and 7 deletions

View File

@ -29,7 +29,6 @@ import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.util.MultiValueAlpha;
import java.util.function.Consumer;
@ -96,7 +95,7 @@ public class Hotseat extends CellLayout implements Insettable {
if (hasVerticalHotseat) {
setGridSize(1, idp.numHotseatIcons);
} else {
setGridSize(idp.numHotseatIcons, FeatureFlags.ENABLE_DEVICE_SEARCH.get() ? 2 : 1);
setGridSize(idp.numHotseatIcons, 1);
}
showInlineQsb();
}
@ -130,11 +129,7 @@ public class Hotseat extends CellLayout implements Insettable {
// When taskbar is present, we set the padding separately to ensure a seamless visual
// handoff between taskbar and hotseat during drag and drop.
Rect padding = grid.getHotseatLayoutPadding();
int paddingBottom = padding.bottom;
if (FeatureFlags.ENABLE_DEVICE_SEARCH.get() && !grid.isVerticalBarLayout()) {
paddingBottom -= grid.hotseatBarBottomPaddingPx;
}
setPadding(padding.left, padding.top, padding.right, paddingBottom);
setPadding(padding.left, padding.top, padding.right, padding.bottom);
}
setLayoutParams(lp);