mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Fix use-after-free in GnssMesaurementInterface" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c495886f97
@@ -153,7 +153,6 @@ void Gnss::reportSvStatus(const std::vector<GnssSvInfo>& svInfoList) const {
|
||||
|
||||
std::vector<GnssSvInfo> Gnss::filterBlocklistedSatellites(
|
||||
std::vector<GnssSvInfo> gnssSvInfoList) const {
|
||||
ALOGD("filterBlocklistedSatellites");
|
||||
for (uint32_t i = 0; i < gnssSvInfoList.size(); i++) {
|
||||
if (mGnssConfiguration->isBlocklisted(gnssSvInfoList[i])) {
|
||||
gnssSvInfoList[i].svFlag &= ~(uint32_t)IGnssCallback::GnssSvFlags::USED_IN_FIX;
|
||||
|
||||
@@ -106,12 +106,14 @@ void GnssMeasurementInterface::start(const bool enableCorrVecOutputs) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(mMinIntervalMillis));
|
||||
}
|
||||
});
|
||||
mThread.detach();
|
||||
}
|
||||
|
||||
void GnssMeasurementInterface::stop() {
|
||||
ALOGD("stop");
|
||||
mIsActive = false;
|
||||
if (mThread.joinable()) {
|
||||
mThread.join();
|
||||
}
|
||||
}
|
||||
|
||||
void GnssMeasurementInterface::reportMeasurement(const GnssData& data) {
|
||||
|
||||
@@ -69,12 +69,14 @@ void GnssNavigationMessageInterface::start() {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(mMinIntervalMillis));
|
||||
}
|
||||
});
|
||||
mThread.detach();
|
||||
}
|
||||
|
||||
void GnssNavigationMessageInterface::stop() {
|
||||
ALOGD("stop");
|
||||
mIsActive = false;
|
||||
if (mThread.joinable()) {
|
||||
mThread.join();
|
||||
}
|
||||
}
|
||||
|
||||
void GnssNavigationMessageInterface::reportMessage(const GnssNavigationMessage& message) {
|
||||
|
||||
Reference in New Issue
Block a user