From a1364c70ff23071edf9fdfe28544d4e6130028af Mon Sep 17 00:00:00 2001 From: Chaohui Wang Date: Fri, 3 Feb 2023 13:30:17 +0800 Subject: [PATCH] Make UdfpsUtils Java 8 compilable Bug: 260441791 Test: Make Settings Change-Id: I4d0bae30d74772bd93a6b1ce413578326859df2a --- .../src/com/android/settingslib/udfps/UdfpsUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java b/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java index c966757cc789c..dc8a862d72c7b 100644 --- a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java @@ -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) {