diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java index d92e845360a8..9de71c1880fe 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java @@ -44,6 +44,7 @@ import android.os.Looper; import android.os.UserManager; import android.util.Log; import android.view.Display; +import android.view.DisplayInfo; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; @@ -653,11 +654,14 @@ public class AuthContainerView extends LinearLayout if (display == null) { return false; } + + final DisplayInfo cachedDisplayInfo = new DisplayInfo(); + display.getDisplayInfo(cachedDisplayInfo); if (mBiometricView == null || !shouldUpdatePositionForUdfps(mBiometricView.asView())) { return false; } - final int displayRotation = display.getRotation(); + final int displayRotation = cachedDisplayInfo.rotation; switch (displayRotation) { case Surface.ROTATION_0: mPanelController.setPosition(AuthPanelController.POSITION_BOTTOM); |