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

Commit ef5bc804 authored by Yu-Han Yang's avatar Yu-Han Yang Committed by Android (Google) Code Review
Browse files

Merge "Drop invalid GNSS location instead of crash" into main

parents 41e3d35e 76519950
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1384,7 +1384,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
        try {
            reportLocation(LocationResult.wrap(location).validate());
        } catch (BadLocationException e) {
            throw new IllegalArgumentException(e);
            Log.e(TAG, "Dropping invalid location: " + e);
            return;
        }

        if (mStarted) {
@@ -1759,7 +1760,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
            try {
                reportLocation(LocationResult.wrap(locations).validate());
            } catch (BadLocationException e) {
                throw new IllegalArgumentException(e);
                Log.e(TAG, "Dropping invalid locations: " + e);
                return;
            }
        }