Revert "Revert "Moving DeviceProfile properties into DevicePrope..."

Revert submission 33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK

Reason for revert: Error is fixed

Reverted changes: /q/submissionid:33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK

Change-Id: Ib86824134955903c11e51e52dbfd6368aba1cd50
This commit is contained in:
Sebastián Franco authored and Sebastian Franco committed 2025-05-23 14:08:11 -07:00
1 parent 1bec329180
commit e1d31e5406
128 files changed
+727 -597

No files matched your search

@@ -653,11 +653,11 @@ public class WidgetsFullSheet extends BaseWidgetSheet
protected 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 (mDeviceProfile.isLandscape) {
if (mDeviceProfile.getDeviceProperties().isLandscape()) {
return 0f;
}
return (mDeviceProfile.heightPx - mDeviceProfile.bottomSheetTopPadding)
return (mDeviceProfile.getDeviceProperties().getHeightPx() - mDeviceProfile.bottomSheetTopPadding)
* RECOMMENDATION_TABLE_HEIGHT_RATIO;
}
@@ -775,7 +775,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet
}
private static int getWidgetSheetId(BaseActivity activity) {
boolean isTwoPane = activity.getDeviceProfile().isTablet;
boolean isTwoPane = activity.getDeviceProfile().getDeviceProperties().isTablet();
return isTwoPane ? R.layout.widgets_two_pane_sheet : R.layout.widgets_full_sheet;
}
@@ -922,7 +922,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet
private static boolean shouldRecreateLayout(DeviceProfile oldDp, DeviceProfile newDp) {
// When folding/unfolding the foldables, we need to switch between the regular widget picker
// and the two pane picker, so we rebuild the picker with the correct layout.
return oldDp.isTwoPanels != newDp.isTwoPanels;
return oldDp.getDeviceProperties().isTwoPanels() != newDp.getDeviceProperties().isTwoPanels();
}
/**