Revert "Moving DeviceProfile properties into DeviceProperties da..."

Revert submission 33672643-DataDeviceProfile1

Reason for revert: Droidmonitor created revert due to b/419867875. Will be verifying through ABTD before submission.

Fix: 419867875

Reverted changes: /q/submissionid:33672643-DataDeviceProfile1

Change-Id: Icb66aefbbcee24e05806b2139923e1f2ea1c65e3
This commit is contained in:
Priyanka Advani (xWF) authored and Android (Google) Code Review committed 2025-05-23 13:53:04 -07:00
1 parent e1111e28c2
commit 7705e92d93
127 files changed
+596 -726

No files matched your search

@@ -122,7 +122,7 @@ public class ClipIconView extends View implements ClipPathView {
MarginLayoutParams lp = (MarginLayoutParams) container.getLayoutParams();
float dX = mIsRtl
? rect.left - (dp.getDeviceProperties().getWidthPx() - lp.getMarginStart() - lp.width)
? rect.left - (dp.widthPx - lp.getMarginStart() - lp.width)
: rect.left - lp.getMarginStart();
float dY = rect.top - lp.topMargin;
container.setTranslationX(dX);
@@ -164,7 +164,7 @@ public class ClipIconView extends View implements ClipPathView {
float shapeRevealProgress = boundToRange(mapToRange(max(shapeProgressStart, progress),
shapeProgressStart, 1f, 0, toMax, LINEAR), 0, 1);
if (dp.getDeviceProperties().isLandscape()) {
if (dp.isLandscape) {
mOutline.right = (int) (rect.width() / scale);
} else {
mOutline.bottom = (int) (rect.height() / scale);
@@ -188,16 +188,16 @@ public class ClipIconView extends View implements ClipPathView {
mRevealAnimator.setCurrentFraction(shapeRevealProgress);
}
float drawableScale = (dp.getDeviceProperties().isLandscape() ? mOutline.width() : mOutline.height())
float drawableScale = (dp.isLandscape ? mOutline.width() : mOutline.height())
/ minSize;
setBackgroundDrawableBounds(drawableScale, dp.getDeviceProperties().isLandscape());
setBackgroundDrawableBounds(drawableScale, dp.isLandscape);
// Center align foreground
int height = mFinalDrawableBounds.height();
int width = mFinalDrawableBounds.width();
int diffY = dp.getDeviceProperties().isLandscape() ? 0
int diffY = dp.isLandscape ? 0
: (int) (((height * drawableScale) - height) / 2);
int diffX = dp.getDeviceProperties().isLandscape() ? (int) (((width * drawableScale) - width) / 2)
int diffX = dp.isLandscape ? (int) (((width * drawableScale) - width) / 2)
: 0;
sTmpRect.set(mFinalDrawableBounds);
sTmpRect.offset(diffX, diffY);
@@ -264,14 +264,14 @@ public class ClipIconView extends View implements ClipPathView {
Utilities.scaleRectAboutCenter(mStartRevealRect, ICON_VISIBLE_AREA_FACTOR);
}
if (dp.getDeviceProperties().isLandscape()) {
lp.width = (int) Math.max(lp.width, lp.height * dp.getDeviceProperties().getAspectRatio());
if (dp.isLandscape) {
lp.width = (int) Math.max(lp.width, lp.height * dp.aspectRatio);
} else {
lp.height = (int) Math.max(lp.height, lp.width * dp.getDeviceProperties().getAspectRatio());
lp.height = (int) Math.max(lp.height, lp.width * dp.aspectRatio);
}
int left = mIsRtl
? dp.getDeviceProperties().getWidthPx() - lp.getMarginStart() - lp.width
? dp.widthPx - lp.getMarginStart() - lp.width
: lp.leftMargin;
layout(left, lp.topMargin, left + lp.width, lp.topMargin + lp.height);
@@ -285,7 +285,7 @@ public class ClipIconView extends View implements ClipPathView {
bgDrawableStartScale = scale;
mOutline.set(0, 0, lp.width, lp.height);
}
setBackgroundDrawableBounds(bgDrawableStartScale, dp.getDeviceProperties().isLandscape());
setBackgroundDrawableBounds(bgDrawableStartScale, dp.isLandscape);
mEndRevealRect.set(0, 0, lp.width, lp.height);
setOutlineProvider(new ViewOutlineProvider() {
@Override