diff options
author | Mike Cailean <mcailean@codeaurora.org> | 2021-02-23 11:29:04 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-08-11 05:50:27 -0700 |
commit | 218203ee28390e0588e5928bb2f5455bce09c5e4 (patch) | |
tree | ef75cb8766e2e16726ec69d7e06a3bbae84c4397 | |
parent | c5c6dd5b15231c2d8fe77f7164f1f0200420a977 (diff) |
Block antennainfoCallback when vector size is 0
Change-Id: Ic84c6500baffae18b503f8eff8106f5cab42ad3f
CRs-fixed: 2884526
-rw-r--r-- | gnss/GnssAdapter.cpp | 6 | ||||
-rw-r--r-- | gnss/location_gnss.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 6312f9b..b0ed2a3 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -6731,7 +6731,9 @@ GnssAdapter::reportGnssAntennaInformation(const antennaInfoCb antennaInfoCallbac } gnssAntennaInformations.push_back(std::move(gnssAntennaInfo)); } - antennaInfoCallback(gnssAntennaInformations); + if (antennaInfoVectorSize > 0) { + antennaInfoCallback(gnssAntennaInformations); + } } /* ==== DGnss Usable Reporter ========================================================= */ diff --git a/gnss/location_gnss.cpp b/gnss/location_gnss.cpp index 0454a13..8f67369 100644 --- a/gnss/location_gnss.cpp +++ b/gnss/location_gnss.cpp @@ -519,7 +519,7 @@ static uint32_t antennaInfoInit(const antennaInfoCb antennaInfoCallback) { static void antennaInfoClose() { if (NULL != gGnssAdapter) { return gGnssAdapter->antennaInfoCloseCommand(); - } + } } static uint32_t configRobustLocation(bool enable, bool enableForE911){ |