#define LOG_TAG "GnssConfiguration" #include "GnssConfiguration.h" #include namespace android { namespace hardware { namespace gnss { namespace V1_1 { namespace implementation { // Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow. Return GnssConfiguration::setSuplEs(bool) { // TODO implement return bool{}; } Return GnssConfiguration::setSuplVersion(uint32_t) { // TODO implement return bool{}; } Return GnssConfiguration::setSuplMode(hidl_bitfield) { // TODO implement return bool{}; } Return GnssConfiguration::setGpsLock(hidl_bitfield) { // TODO implement return bool{}; } Return GnssConfiguration::setLppProfile(hidl_bitfield) { // TODO implement return bool{}; } Return GnssConfiguration::setGlonassPositioningProtocol(hidl_bitfield) { // TODO implement return bool{}; } Return GnssConfiguration::setEmergencySuplPdn(bool) { // TODO implement return bool{}; } // Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow. Return GnssConfiguration::setBlacklist(const hidl_vec& sourceList) { std::unique_lock lock(mMutex); mBlacklistedConstellationSet.clear(); mBlacklistedSourceSet.clear(); for (auto source : sourceList) { if (source.svid == 0) { // Wildcard blacklist, i.e., blacklist entire constellation. mBlacklistedConstellationSet.insert(source.constellation); } else { mBlacklistedSourceSet.insert(source); } } return true; } Return GnssConfiguration::isBlacklisted(const GnssSvInfo& gnssSvInfo) const { std::unique_lock lock(mMutex); if (mBlacklistedConstellationSet.find(gnssSvInfo.constellation) != mBlacklistedConstellationSet.end()) { return true; } BlacklistedSource source = {.constellation = gnssSvInfo.constellation, .svid = gnssSvInfo.svid}; return (mBlacklistedSourceSet.find(source) != mBlacklistedSourceSet.end()); } std::recursive_mutex& GnssConfiguration::getMutex() const { return mMutex; } // Methods from ::android::hidl::base::V1_0::IBase follow. } // namespace implementation } // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android