Make UdfpsUtils Java 8 compilable

Bug: 260441791
Test: Make Settings
Change-Id: I4d0bae30d74772bd93a6b1ce413578326859df2a
This commit is contained in:
Chaohui Wang
2023-02-03 13:30:17 +08:00
parent 190c22723c
commit a1364c70ff

View File

@@ -131,7 +131,7 @@ public class UdfpsUtils {
// Touch coordinates are with respect to the upper left corner, so reverse
// this calculation
float yRelativeToSensor = sensorY - touchY;
var angleInRad = Math.atan2(yRelativeToSensor, xRelativeToSensor);
double angleInRad = Math.atan2(yRelativeToSensor, xRelativeToSensor);
// If the radians are negative, that means we are counting clockwise.
// So we need to add 360 degrees
if (angleInRad < 0.0) {