Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf96737e authored by Nick Kralevich's avatar Nick Kralevich
Browse files

Switch from FloatMath -> Math and Math.hypot where possible

Somehow the change at
https://android-review.googlesource.com/#/c/109481/1/core/java/android/util/Spline.java
isn't in master, which seems to be causing a boot failure.

  07-28 07:44:51.338   771   771 E art     : No implementation found for float android.util.FloatMath.hypot(float, float) (tried Java_android_util_FloatMath_hypot and Java_android_util_FloatMath_hypot__FF)
  07-28 07:44:51.338   771   771 W SystemServer: ***********************************************
  07-28 07:44:51.339   771   771 F SystemServer: BOOT FAILURE making Power Manager Service ready
  07-28 07:44:51.339   771   771 F SystemServer: java.lang.UnsatisfiedLinkError: No implementation found for float android.util.FloatMath.hypot(float, float) (tried Java_android_util_FloatMath_hypot and Java_android_util_FloatMath_hypot__FF)
  07-28 07:44:51.339   771   771 F SystemServer: 	at android.util.FloatMath.hypot(Native Method)
  07-28 07:44:51.339   771   771 F SystemServer: 	at android.util.Spline$MonotoneCubicSpline.<init>(Spline.java:168)
  07-28 07:44:51.339   771   771 F SystemServer: 	at android.util.Spline.createMonotoneCubicSpline(Spline.java:72)
  07-28 07:44:51.339   771   771 F SystemServer: 	at android.util.Spline.createSpline(Spline.java:47)
  07-28 07:44:51.339   771   771 F SystemServer: 	at com.android.server.display.DisplayPowerController.createAutoBrightnessSpline(DisplayPowerController.java:1100)

Change-Id: Ic6a85d4f9125b921fa4f307e9d5723c09104ca4d
parent 515defde
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ public abstract class Spline {
                        throw new IllegalArgumentException("The control points must have "
                                + "monotonic Y values.");
                    }
                    float h = FloatMath.hypot(a, b);
                    float h = (float) Math.hypot(a, b);
                    if (h > 9f) {
                        float t = 3f / h;
                        m[i] = t * a * d[i];