summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-10-02 10:18:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-02 10:18:29 +0000
commitee665151a4c6359cbfbb9a6795aa9097c4622083 (patch)
tree42274866ba592cd70031f4e32f7e3a9399d38a35 /policy
parent152d9aae631381ea28f5701168d372a1486a7502 (diff)
parent0c1faf43aecadc37b78c4ad6cb669eb351d21385 (diff)
downloadframeworks_base-ee665151a4c6359cbfbb9a6795aa9097c4622083.zip
frameworks_base-ee665151a4c6359cbfbb9a6795aa9097c4622083.tar.gz
frameworks_base-ee665151a4c6359cbfbb9a6795aa9097c4622083.tar.bz2
am 0c1faf43: Merge "Switch from FloatMath -> Math and Math.hypot where possible"
* commit '0c1faf43aecadc37b78c4ad6cb669eb351d21385': Switch from FloatMath -> Math and Math.hypot where possible
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/WindowOrientationListener.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java b/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java
index 0c77556..d927592 100644
--- a/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java
+++ b/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java
@@ -23,7 +23,6 @@ import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Handler;
import android.os.SystemProperties;
-import android.util.FloatMath;
import android.util.Log;
import android.util.Slog;
@@ -401,7 +400,7 @@ public abstract class WindowOrientationListener {
if (LOG) {
Slog.v(TAG, "Raw acceleration vector: "
+ "x=" + x + ", y=" + y + ", z=" + z
- + ", magnitude=" + FloatMath.sqrt(x * x + y * y + z * z));
+ + ", magnitude=" + Math.sqrt(x * x + y * y + z * z));
}
// Apply a low-pass filter to the acceleration up vector in cartesian space.
@@ -428,7 +427,7 @@ public abstract class WindowOrientationListener {
if (LOG) {
Slog.v(TAG, "Filtered acceleration vector: "
+ "x=" + x + ", y=" + y + ", z=" + z
- + ", magnitude=" + FloatMath.sqrt(x * x + y * y + z * z));
+ + ", magnitude=" + Math.sqrt(x * x + y * y + z * z));
}
skipSample = false;
}
@@ -442,7 +441,7 @@ public abstract class WindowOrientationListener {
boolean isSwinging = false;
if (!skipSample) {
// Calculate the magnitude of the acceleration vector.
- final float magnitude = FloatMath.sqrt(x * x + y * y + z * z);
+ final float magnitude = (float) Math.sqrt(x * x + y * y + z * z);
if (magnitude < NEAR_ZERO_MAGNITUDE) {
if (LOG) {
Slog.v(TAG, "Ignoring sensor data, magnitude too close to zero.");