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

Commit 0fd91cc1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add 0,0 location check"

parents 69a5323a 7fc24c65
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1000,6 +1000,12 @@ public class LocationManagerService extends ILocationManager.Stub {

        @Override
        public void onReportLocation(Location location) {
            // likelihood of a 0,0 bug is far greater than this being a valid location
            if (!isMock() && location.getLatitude() == 0 && location.getLongitude() == 0) {
                Slog.w(TAG, "blocking 0,0 location from " + mName + " provider");
                return;
            }

            synchronized (mLock) {
                handleLocationChangedLocked(location, this);
            }