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

Commit 05cc4a30 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix declination argument boundary checks" into main am: 7d558a42 am:...

Merge "Fix declination argument boundary checks" into main am: 7d558a42 am: ba5ca297 am: 6a68f4c1

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2729274



Change-Id: I41870e0ef7dccfbced3d2f4221da1859c6c989a9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9357ba00 6a68f4c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ public class SensorAdditionalInfo {
    public static SensorAdditionalInfo createLocalGeomagneticField(
            float strength, float declination, float inclination) {
        if (strength < 10 || strength > 100 // much beyond extreme values on earth
                || declination < 0 || declination > Math.PI
                || declination < -Math.PI / 2 || declination > Math.PI / 2
                || inclination < -Math.PI / 2 || inclination > Math.PI / 2) {
            throw new IllegalArgumentException("Geomagnetic field info out of range");
        }