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

Commit 387f9e77 authored by Mohammed Khider's avatar Mohammed Khider Committed by Android (Google) Code Review
Browse files

Merge "Unset Vertical Accuracy, Speed Accruacy and Bearing Accuracy fields as...

Merge "Unset Vertical Accuracy, Speed Accruacy and Bearing Accuracy fields as some chipsets set them in pre-Android-O devices. Test: Existing unit tests still pass."
parents f18be3d7 cf6b4d32
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -28,7 +28,10 @@ GnssLocation convertToGnssLocation(GpsLocation* location) {
    GnssLocation gnssLocation = {};
    if (location != nullptr) {
        gnssLocation = {
            .gnssLocationFlags = location->flags,
            // Bit operation AND with 1f below is needed to clear vertical accuracy,
            // speed accuracy and bearing accuracy flags as some vendors are found
            // to be setting these bits in pre-Android-O devices
            .gnssLocationFlags = static_cast<uint16_t>(location->flags & 0x1f),
            .latitudeDegrees = location->latitude,
            .longitudeDegrees = location->longitude,
            .altitudeMeters = location->altitude,