Use getExactRotation for UPSIDE_DOWN rotation

Test: manually test charging animation in all
orientations
Bug: 220370196

Change-Id: I772a772ef4fd6154e8c20adbb4b1e699320e79c9
This commit is contained in:
Beverly
2022-02-23 14:03:28 +00:00
committed by Beverly Tai
parent 54dbcaebd2
commit 7cacbce58d

View File

@@ -175,7 +175,7 @@ class WiredChargingRippleController @Inject constructor(
val width = displayMetrics.widthPixels
val height = displayMetrics.heightPixels
rippleView.radius = Integer.max(width, height).toFloat()
rippleView.origin = when (RotationUtils.getRotation(context)) {
rippleView.origin = when (RotationUtils.getExactRotation(context)) {
RotationUtils.ROTATION_LANDSCAPE -> {
PointF(width * normalizedPortPosY, height * (1 - normalizedPortPosX))
}