Skip to content

Commit 90a8043

Browse files
committed
[Shape] Code format.
PiperOrigin-RevId: 828094095
1 parent ea9d250 commit 90a8043

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

lib/java/com/google/android/material/shape/MaterialShapeDrawable.java

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ private static int modulateAlpha(int paintAlpha, int alpha) {
319319
}
320320

321321
/**
322-
* Sets the {@link ShapeAppearance} for shapes of this drawable. This can be a
323-
* {@link ShapeAppearanceModel} or {@link StateListShapeAppearanceModel}.
322+
* Sets the {@link ShapeAppearance} for shapes of this drawable. This can be a {@link
323+
* ShapeAppearanceModel} or {@link StateListShapeAppearanceModel}.
324324
*
325325
* @param shapeAppearance The new {@link ShapeAppearance} object.
326326
* @hide
@@ -993,8 +993,8 @@ public void setShadowRadius(int shadowRadius) {
993993
}
994994

995995
/**
996-
* Returns true if compat shadows should be drawn.
997-
* Native elevation shadows can't be drawn for concave paths on API < 29.
996+
* Returns true if compat shadows should be drawn. Native elevation shadows can't be drawn for
997+
* concave paths on API < 29.
998998
*/
999999
public boolean requiresCompatShadow() {
10001000
return !isRoundRect() && !path.isConvex() && VERSION.SDK_INT < VERSION_CODES.Q;
@@ -1437,9 +1437,7 @@ public void getOutline(@NonNull Outline outline) {
14371437
// Calculates the radius of a round rect, if the stroke shape can be drawn as a round rect.
14381438
float roundRectRadius =
14391439
calculateRoundRectCornerSize(
1440-
bounds,
1441-
drawableState.shapeAppearance.getDefaultShape(),
1442-
springAnimatedCornerSizes);
1440+
bounds, drawableState.shapeAppearance.getDefaultShape(), springAnimatedCornerSizes);
14431441
if (roundRectRadius >= 0) {
14441442
outline.setRoundRect(getBounds(), roundRectRadius * drawableState.interpolation);
14451443
} else {
@@ -1565,7 +1563,7 @@ private void updateShape(int[] state, boolean skipAnimation) {
15651563
}
15661564
ShapeAppearanceModel shapeAppearanceModel =
15671565
drawableState.shapeAppearance.getShapeForState(state);
1568-
if(areAllElementsEqual(springAnimatedCornerSizes)){
1566+
if (areAllElementsEqual(springAnimatedCornerSizes)) {
15691567
isRoundRectCornerMorph = shapeAppearanceModel.isRoundRect(getBoundsAsRectF());
15701568
}
15711569
for (int i = 0; i < NUM_CORNERS; i++) {
@@ -1632,7 +1630,9 @@ public float getTopLeftCornerResolvedSize() {
16321630
if (springAnimatedCornerSizes != null) {
16331631
return springAnimatedCornerSizes[ShapeAppearancePathProvider.TOP_LEFT_CORNER_INDEX];
16341632
}
1635-
return drawableState.shapeAppearance.getDefaultShape()
1633+
return drawableState
1634+
.shapeAppearance
1635+
.getDefaultShape()
16361636
.getTopLeftCornerSize()
16371637
.getCornerSize(getBoundsAsRectF());
16381638
}
@@ -1642,7 +1642,9 @@ public float getTopRightCornerResolvedSize() {
16421642
if (springAnimatedCornerSizes != null) {
16431643
return springAnimatedCornerSizes[ShapeAppearancePathProvider.TOP_RIGHT_CORNER_INDEX];
16441644
}
1645-
return drawableState.shapeAppearance.getDefaultShape()
1645+
return drawableState
1646+
.shapeAppearance
1647+
.getDefaultShape()
16461648
.getTopRightCornerSize()
16471649
.getCornerSize(getBoundsAsRectF());
16481650
}
@@ -1652,7 +1654,9 @@ public float getBottomLeftCornerResolvedSize() {
16521654
if (springAnimatedCornerSizes != null) {
16531655
return springAnimatedCornerSizes[ShapeAppearancePathProvider.BOTTOM_LEFT_CORNER_INDEX];
16541656
}
1655-
return drawableState.shapeAppearance.getDefaultShape()
1657+
return drawableState
1658+
.shapeAppearance
1659+
.getDefaultShape()
16561660
.getBottomLeftCornerSize()
16571661
.getCornerSize(getBoundsAsRectF());
16581662
}
@@ -1662,7 +1666,9 @@ public float getBottomRightCornerResolvedSize() {
16621666
if (springAnimatedCornerSizes != null) {
16631667
return springAnimatedCornerSizes[ShapeAppearancePathProvider.BOTTOM_RIGHT_CORNER_INDEX];
16641668
}
1665-
return drawableState.shapeAppearance.getDefaultShape()
1669+
return drawableState
1670+
.shapeAppearance
1671+
.getDefaultShape()
16661672
.getBottomRightCornerSize()
16671673
.getCornerSize(getBoundsAsRectF());
16681674
}

0 commit comments

Comments
 (0)