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

Commit e8c6ba8f authored by Guang Zhu's avatar Guang Zhu Committed by Automerger Merge Worker
Browse files

Merge "Merge fix to AOSP: Report default location when location is not...

Merge "Merge fix to AOSP: Report default location when location is not available in /dev/gnss0" am: 6c602e4e

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1853860

Change-Id: Ia3e33841b77e789af8bbe86418bdd47bf05f4b7d
parents 77faf3af 6c602e4e
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -223,14 +223,8 @@ Return<bool> GnssTemplate<T_IGnss>::start() {
            this->reportSvStatus(svStatus);
            auto currentLocation = getLocationFromHW();
            notePowerConsumption();
            if (mGnssFd != -1) {
                // Only report location if the return from hardware is valid
                // note that we can not merge these two "if" together, if didn't
                // get location from hardware, we shouldn't report location, not
                // report the "default" one.
            if (currentLocation != nullptr) {
                this->reportLocation(*currentLocation);
                }
            } else {
                if (sGnssCallback_2_1 != nullptr || sGnssCallback_2_0 != nullptr) {
                    const auto location = Utils::getMockLocationV2_0();