Merge "Upate face sensor loc as resolution" into tm-dev am: 0ad655dd20
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18343888 Change-Id: I17a5e117353d17eddf0d1cb9a731b24bd58b981f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -484,7 +484,13 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba
|
|||||||
if (mFaceProps == null || mFaceAuthSensorLocation == null) {
|
if (mFaceProps == null || mFaceAuthSensorLocation == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new PointF(mFaceAuthSensorLocation.x, mFaceAuthSensorLocation.y);
|
DisplayInfo displayInfo = new DisplayInfo();
|
||||||
|
mContext.getDisplay().getDisplayInfo(displayInfo);
|
||||||
|
final float scaleFactor = android.util.DisplayUtils.getPhysicalPixelDisplaySizeRatio(
|
||||||
|
mStableDisplaySize.x, mStableDisplaySize.y, displayInfo.getNaturalWidth(),
|
||||||
|
displayInfo.getNaturalHeight());
|
||||||
|
return new PointF(mFaceAuthSensorLocation.x * scaleFactor,
|
||||||
|
mFaceAuthSensorLocation.y * scaleFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user