summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Beverly Tai <beverlyt@google.com> 2022-09-20 12:34:44 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-09-20 12:34:44 +0000
commitfa561d39347c7b392065b8c9a031d8b2d6726d27 (patch)
treed5af4221a0981445966c4f90ecdb720b4cd7baaf
parent668090c09b0a23e9dca94cd48ebb88e4e2c58edc (diff)
parent54a7b623b1a165b085bd74358268636675453bad (diff)
Merge "Do not use stableDisplaySize for scale factor" into tm-qpr-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
index 92f37e07614a..3ba78ef77f6c 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
@@ -56,6 +56,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
import android.os.UserManager;
+import android.util.DisplayUtils;
import android.util.Log;
import android.util.RotationUtils;
import android.util.SparseBooleanArray;
@@ -118,8 +119,6 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba
private final Provider<UdfpsController> mUdfpsControllerFactory;
private final Provider<SidefpsController> mSidefpsControllerFactory;
- @NonNull private Point mStableDisplaySize = new Point();
-
private final Display mDisplay;
private float mScaleFactor = 1f;
// sensor locations without any resolution scaling nor rotation adjustments:
@@ -508,10 +507,11 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba
*/
private void updateSensorLocations() {
mDisplay.getDisplayInfo(mCachedDisplayInfo);
-
+ final Display.Mode maxDisplayMode =
+ DisplayUtils.getMaximumResolutionDisplayMode(mCachedDisplayInfo.supportedModes);
final float scaleFactor = android.util.DisplayUtils.getPhysicalPixelDisplaySizeRatio(
- mStableDisplaySize.x, mStableDisplaySize.y, mCachedDisplayInfo.getNaturalWidth(),
- mCachedDisplayInfo.getNaturalHeight());
+ maxDisplayMode.getPhysicalWidth(), maxDisplayMode.getPhysicalHeight(),
+ mCachedDisplayInfo.getNaturalWidth(), mCachedDisplayInfo.getNaturalHeight());
if (scaleFactor == Float.POSITIVE_INFINITY) {
mScaleFactor = 1f;
} else {
@@ -768,7 +768,6 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba
mFingerprintAuthenticatorsRegisteredCallback);
}
- mStableDisplaySize = mDisplayManager.getStableDisplaySize();
mActivityTaskManager.registerTaskStackListener(mTaskStackListener);
mOrientationListener.enable();
updateSensorLocations();
@@ -1148,7 +1147,6 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba
@Override
public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
final AuthDialog dialog = mCurrentDialog;
- pw.println(" stableDisplaySize=" + mStableDisplaySize);
pw.println(" mCachedDisplayInfo=" + mCachedDisplayInfo);
pw.println(" mScaleFactor=" + mScaleFactor);
pw.println(" faceAuthSensorLocationDefault=" + mFaceSensorLocationDefault);