Merge "Use getExactRotation for UPSIDE_DOWN rotation" into tm-dev am: 9b4c7a9f57

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988923

Change-Id: I11bf5652af063c6160c88ed6cd2082d573b042ad
This commit is contained in:
TreeHugger Robot
2022-02-24 18:49:56 +00:00
committed by Automerger Merge Worker

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))
}