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

Commit 579b74d5 authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

DO NOT MERGE: Do not inject mock location to chipset

Bug: 177561690
Test: on device
Change-Id: Icafbdf54fe807f8779377b13cb4e4eb265db692e
parent e1d00ab8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,9 @@ public class GnssLocationProvider implements LocationProviderInterface, InjectNt
    }

    private void injectBestLocation(Location location) {
        if (location.isFromMockProvider()) {
            return;
        }
        int gnssLocationFlags = LOCATION_HAS_LAT_LONG |
                (location.hasAltitude() ? LOCATION_HAS_ALTITUDE : 0) |
                (location.hasSpeed() ? LOCATION_HAS_SPEED : 0) |
@@ -1141,6 +1144,9 @@ public class GnssLocationProvider implements LocationProviderInterface, InjectNt
    }

    private void handleUpdateLocation(Location location) {
        if (location.isFromMockProvider()) {
            return;
        }
        if (location.hasAccuracy()) {
            native_inject_location(location.getLatitude(), location.getLongitude(),
                    location.getAccuracy());