Merge "Update the available size for suggestions in small landscape heights." into main

This commit is contained in:
Shamali Patwa
2024-03-21 02:55:58 +00:00
committed by Android (Google) Code Review
@@ -631,6 +631,12 @@ public class WidgetsFullSheet extends BaseWidgetSheet
@Px
private float getMaxAvailableHeightForRecommendations() {
// There isn't enough space to show recommendations in landscape orientation on phones with
// a full sheet design. Tablets use a two pane picker.
if (!isTwoPane() && mDeviceProfile.isLandscape) {
return 0f;
}
return (mDeviceProfile.heightPx - mDeviceProfile.bottomSheetTopPadding)
* getRecommendationSectionHeightRatio();
}