Merge "Always show fp icon in portrait on keyguard" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-07-13 15:48:15 +00:00
committed by Android (Google) Code Review

View File

@@ -636,9 +636,12 @@ public class UdfpsController implements DozeReceiver {
// Gets the size based on the current rotation of the display.
mContext.getDisplay().getRealSize(p);
// Transform dimensions if the device is in landscape mode.
// Transform dimensions if the device is in landscape mode
switch (mContext.getDisplay().getRotation()) {
case Surface.ROTATION_90:
if (animation instanceof UdfpsKeyguardViewController) {
break;
}
mCoreLayoutParams.x = mSensorProps.sensorLocationY - mSensorProps.sensorRadius
- paddingX;
mCoreLayoutParams.y = p.y - mSensorProps.sensorLocationX - mSensorProps.sensorRadius
@@ -646,6 +649,9 @@ public class UdfpsController implements DozeReceiver {
break;
case Surface.ROTATION_270:
if (animation instanceof UdfpsKeyguardViewController) {
break;
}
mCoreLayoutParams.x = p.x - mSensorProps.sensorLocationY - mSensorProps.sensorRadius
- paddingX;
mCoreLayoutParams.y = mSensorProps.sensorLocationX - mSensorProps.sensorRadius
@@ -654,6 +660,7 @@ public class UdfpsController implements DozeReceiver {
default:
// Do nothing to stay in portrait mode.
// Keyguard is always in portrait mode.
}
// avoid announcing window title
mCoreLayoutParams.accessibilityTitle = " ";