From cdc38fd64260e7eca2820fed1812a3cd92232a23 Mon Sep 17 00:00:00 2001 From: Jorge Lucas Date: Mon, 16 Dec 2019 08:03:37 +0100 Subject: [PATCH] Revert "sanders: GPS: Update from LA.UM.7.6.2.r1-04200-89xx.0 and update GPS packages" This reverts commit a6c556a56ededa4a5d41912ad966e67e3ce655d6. --- device.mk | 10 +- gps/android/AGnss.cpp | 4 +- gps/android/AGnss.h | 10 +- gps/android/AGnssRil.cpp | 4 +- gps/android/AGnssRil.h | 4 +- gps/android/Android.mk | 8 +- gps/android/Gnss.cpp | 113 +++++++++++++++++- gps/android/Gnss.h | 23 +++- gps/android/GnssBatching.cpp | 4 +- gps/android/GnssBatching.h | 10 +- gps/android/GnssConfiguration.cpp | 12 +- gps/android/GnssConfiguration.h | 18 +-- gps/android/GnssDebug.cpp | 4 +- gps/android/GnssDebug.h | 10 +- gps/android/GnssGeofencing.cpp | 4 +- gps/android/GnssGeofencing.h | 10 +- gps/android/GnssMeasurement.cpp | 34 +++++- gps/android/GnssMeasurement.h | 22 ++-- gps/android/GnssNi.cpp | 4 +- gps/android/GnssNi.h | 10 +- .../android.hardware.gnss@1.0-service-qti.rc | 2 +- .../location_api/BatchingAPIClient.cpp | 4 +- gps/android/location_api/BatchingAPIClient.h | 4 +- .../location_api/GeofenceAPIClient.cpp | 4 +- gps/android/location_api/GeofenceAPIClient.h | 4 +- gps/android/location_api/GnssAPIClient.cpp | 4 +- gps/android/location_api/GnssAPIClient.h | 8 +- gps/android/location_api/LocationUtil.cpp | 4 +- gps/android/location_api/LocationUtil.h | 4 +- .../location_api/MeasurementAPIClient.cpp | 48 +++++++- .../location_api/MeasurementAPIClient.h | 11 +- gps/android/service.cpp | 2 +- gps/core/SystemStatusOsObserver.cpp | 9 +- gps/gnss/GnssAdapter.cpp | 30 ++--- gps/utils/log_util.h | 8 +- 35 files changed, 329 insertions(+), 135 deletions(-) diff --git a/device.mk b/device.mk index c9daf16..4c9cd4b 100644 --- a/device.mk +++ b/device.mk @@ -1,6 +1,6 @@ # # Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2018 The LineageOS Project +# Copyright (C) 2017 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -183,14 +183,12 @@ PRODUCT_PACKAGES += \ android.hardware.gatekeeper@1.0-impl \ android.hardware.gatekeeper@1.0-service -# GPS / Location +# GPS PRODUCT_PACKAGES += \ - android.hardware.gnss@1.0-impl-qti \ - android.hardware.gnss@1.0-service-qti \ libgnss \ libgnsspps \ - libcurl \ - libqsap_shim + android.hardware.gnss@1.1-impl-qti \ + android.hardware.gnss@1.1-service-qti PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/gps/etc/cacert_location.pem:$(TARGET_COPY_OUT_VENDOR)/etc/cacert_location.pem \ diff --git a/gps/android/AGnss.cpp b/gps/android/AGnss.cpp index faaf75e..fe50c9a 100644 --- a/gps/android/AGnss.cpp +++ b/gps/android/AGnss.cpp @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { static AGnss* spAGnss = nullptr; @@ -197,7 +197,7 @@ Return AGnss::setServer(IAGnssCallback::AGnssType type, } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/AGnss.h b/gps/android/AGnss.h index cdd5931..4b599b9 100644 --- a/gps/android/AGnss.h +++ b/gps/android/AGnss.h @@ -18,8 +18,8 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H -#define ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H +#define ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H #include #include @@ -28,7 +28,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IAGnss; @@ -71,9 +71,9 @@ struct AGnss : public IAGnss { }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H diff --git a/gps/android/AGnssRil.cpp b/gps/android/AGnssRil.cpp index f4b9849..10478aa 100644 --- a/gps/android/AGnssRil.cpp +++ b/gps/android/AGnssRil.cpp @@ -36,7 +36,7 @@ typedef void* (getLocationInterface)(); namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { @@ -87,7 +87,7 @@ Return AGnssRil::updateNetworkState(bool connected, NetworkType type, bool } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/AGnssRil.h b/gps/android/AGnssRil.h index 7f18c57..5c9298a 100644 --- a/gps/android/AGnssRil.h +++ b/gps/android/AGnssRil.h @@ -28,7 +28,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IAGnssRil; @@ -75,7 +75,7 @@ struct AGnssRil : public IAGnssRil { }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/Android.mk b/gps/android/Android.mk index dc721db..4f1cdf2 100644 --- a/gps/android/Android.mk +++ b/gps/android/Android.mk @@ -1,7 +1,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.gnss@1.0-impl-qti +LOCAL_MODULE := android.hardware.gnss@1.1-impl-qti LOCAL_VENDOR_MODULE := true LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_SRC_FILES := \ @@ -38,6 +38,7 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ android.hardware.gnss@1.0 \ + android.hardware.gnss@1.1 \ LOCAL_SHARED_LIBRARIES += \ libloc_core \ @@ -57,10 +58,10 @@ endif # BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET ifeq ($(BUILD_GNSS_HIDL_SERVICE), true) include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.gnss@1.0-service-qti +LOCAL_MODULE := android.hardware.gnss@1.1-service-qti LOCAL_VENDOR_MODULE := true LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_INIT_RC := android.hardware.gnss@1.0-service-qti.rc +LOCAL_INIT_RC := android.hardware.gnss@1.1-service-qti.rc LOCAL_SRC_FILES := \ service.cpp \ @@ -85,6 +86,7 @@ LOCAL_SHARED_LIBRARIES += \ libhidlbase \ libhidltransport \ android.hardware.gnss@1.0 \ + android.hardware.gnss@1.1 \ LOCAL_CFLAGS += $(GNSS_CFLAGS) include $(BUILD_EXECUTABLE) diff --git a/gps/android/Gnss.cpp b/gps/android/Gnss.cpp index c844118..de1430c 100644 --- a/gps/android/Gnss.cpp +++ b/gps/android/Gnss.cpp @@ -29,12 +29,52 @@ typedef void* (getLocationInterface)(); +#define IMAGES_INFO_FILE "/sys/devices/soc0/images" +#define DELIMITER ";" + namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { +static std::string getVersionString() { + static std::string version; + if (!version.empty()) + return version; + + char value[PROPERTY_VALUE_MAX] = {0}; + property_get("ro.hardware", value, "unknown"); + version.append(value).append(DELIMITER); + + std::ifstream in(IMAGES_INFO_FILE); + std::string s; + while(getline(in, s)) { + std::size_t found = s.find("CRM:"); + if (std::string::npos == found) { + continue; + } + + // skip over space characters after "CRM:" + const char* substr = s.c_str(); + found += 4; + while (0 != substr[found] && isspace(substr[found])) { + found++; + } + if (s.find("11:") != found) { + continue; + } + s.erase(0, found + 3); + + found = s.find_first_of("\r\n"); + if (std::string::npos != found) { + s.erase(s.begin() + found, s.end()); + } + version.append(s).append(DELIMITER); + } + return version; +} + void Gnss::GnssDeathRecipient::serviceDied(uint64_t cookie, const wp& who) { LOC_LOGE("%s] service died. cookie: %llu, who: %p", __FUNCTION__, static_cast(cookie), &who); @@ -326,6 +366,75 @@ Return> Gnss::getExtensionAGnssRil() { return mGnssRil; } +// Methods from ::android::hardware::gnss::V1_1::IGnss follow. +Return Gnss::setCallback_1_1(const sp& callback) { + ENTRY_LOG_CALLFLOW(); + callback->gnssNameCb(getVersionString()); + mGnssCbIface_1_1 = callback; + GnssInterface* gnssInterface = getGnssInterface(); + if (nullptr != gnssInterface) { + OdcpiRequestCallback cb = [this](const OdcpiRequestInfo& odcpiRequest) { + odcpiRequestCb(odcpiRequest); + }; + gnssInterface->odcpiInit(cb); + } + return setCallback(callback); +} + +Return Gnss::setPositionMode_1_1(V1_0::IGnss::GnssPositionMode mode, + V1_0::IGnss::GnssPositionRecurrence recurrence, + uint32_t minIntervalMs, + uint32_t preferredAccuracyMeters, + uint32_t preferredTimeMs, + bool /*lowPowerMode*/) { + ENTRY_LOG_CALLFLOW(); + return setPositionMode(mode, recurrence, minIntervalMs, + preferredAccuracyMeters, preferredTimeMs); +} + +Return> Gnss::getExtensionGnssMeasurement_1_1() { + ENTRY_LOG_CALLFLOW(); + if (mGnssMeasurement == nullptr) + mGnssMeasurement = new GnssMeasurement(); + return mGnssMeasurement; +} + +Return> Gnss::getExtensionGnssConfiguration_1_1() { + ENTRY_LOG_CALLFLOW(); + if (mGnssConfig == nullptr) + mGnssConfig = new GnssConfiguration(this); + return mGnssConfig; +} + +Return Gnss::injectBestLocation(const GnssLocation& gnssLocation) { + ENTRY_LOG_CALLFLOW(); + GnssInterface* gnssInterface = getGnssInterface(); + if (nullptr != gnssInterface) { + Location location = {}; + convertGnssLocation(gnssLocation, location); + gnssInterface->odcpiInject(location); + } + return true; +} + +void Gnss::odcpiRequestCb(const OdcpiRequestInfo& request) { + ENTRY_LOG_CALLFLOW(); + if (mGnssCbIface_1_1 != nullptr) { + // For emergency mode, request DBH (Device based hybrid) location + // Mark Independent from GNSS flag to false. + if (ODCPI_REQUEST_TYPE_START == request.type) { + auto r = mGnssCbIface_1_1->gnssRequestLocationCb(!request.isEmergencyMode); + if (!r.isOk()) { + LOC_LOGe("Error invoking gnssRequestLocationCb %s", r.description().c_str()); + } + } else { + LOC_LOGv("Unsupported ODCPI request type: %d", request.type); + } + } else { + LOC_LOGe("ODCPI request not supported."); + } +} + IGnss* HIDL_FETCH_IGnss(const char* hal) { ENTRY_LOG_CALLFLOW(); IGnss* iface = nullptr; @@ -337,7 +446,7 @@ IGnss* HIDL_FETCH_IGnss(const char* hal) { } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/Gnss.h b/gps/android/Gnss.h index 03ef170..4c0c8b0 100644 --- a/gps/android/Gnss.h +++ b/gps/android/Gnss.h @@ -18,8 +18,8 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSS_H -#define ANDROID_HARDWARE_GNSS_V1_0_GNSS_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSS_H +#define ANDROID_HARDWARE_GNSS_V1_1_GNSS_H #include #include @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include @@ -40,7 +40,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::hidl_array; @@ -95,6 +95,16 @@ struct Gnss : public IGnss { Return> getExtensionGnssDebug() override; + // Methods from ::android::hardware::gnss::V1_1::IGnss follow. + Return setCallback_1_1(const sp& callback) override; + Return setPositionMode_1_1(V1_0::IGnss::GnssPositionMode mode, + V1_0::IGnss::GnssPositionRecurrence recurrence, + uint32_t minIntervalMs, uint32_t preferredAccuracyMeters, + uint32_t preferredTimeMs, bool lowPowerMode) override; + Return> getExtensionGnssMeasurement_1_1() override; + Return> getExtensionGnssConfiguration_1_1() override; + Return injectBestLocation(const GnssLocation& location) override; + // These methods are not part of the IGnss base class. GnssAPIClient* getApi(); Return setGnssNiCb(const sp& niCb); @@ -127,6 +137,7 @@ struct Gnss : public IGnss { GnssAPIClient* mApi = nullptr; sp mGnssCbIface = nullptr; + sp mGnssCbIface_1_1 = nullptr; sp mGnssNiCbIface = nullptr; GnssConfig mPendingConfig; GnssInterface* mGnssInterface = nullptr; @@ -135,9 +146,9 @@ struct Gnss : public IGnss { extern "C" IGnss* HIDL_FETCH_IGnss(const char* name); } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_GNSS_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSS_H diff --git a/gps/android/GnssBatching.cpp b/gps/android/GnssBatching.cpp index 3e5a9f4..9701aff 100644 --- a/gps/android/GnssBatching.cpp +++ b/gps/android/GnssBatching.cpp @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { void GnssBatching::GnssBatchingDeathRecipient::serviceDied( @@ -124,7 +124,7 @@ Return GnssBatching::cleanup() { } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/GnssBatching.h b/gps/android/GnssBatching.h index 8fab857..8e235d8 100644 --- a/gps/android/GnssBatching.h +++ b/gps/android/GnssBatching.h @@ -18,8 +18,8 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSBATCHING_H -#define ANDROID_HARDWARE_GNSS_V1_0_GNSSBATCHING_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSBATCHING_H +#define ANDROID_HARDWARE_GNSS_V1_1_GNSSBATCHING_H #include #include @@ -28,7 +28,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnssBatching; @@ -72,9 +72,9 @@ struct GnssBatching : public IGnssBatching { }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSBATCHING_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSBATCHING_H diff --git a/gps/android/GnssConfiguration.cpp b/gps/android/GnssConfiguration.cpp index 15153dd..9eeceac 100644 --- a/gps/android/GnssConfiguration.cpp +++ b/gps/android/GnssConfiguration.cpp @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { GnssConfiguration::GnssConfiguration(Gnss* gnss) : mGnss(gnss) { @@ -220,8 +220,16 @@ Return GnssConfiguration::setEmergencySuplPdn(bool enabled) { return mGnss->updateConfiguration(config); } +// Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow. +Return GnssConfiguration::setBlacklist( + const hidl_vec& /*blacklist*/) { + + ENTRY_LOG_CALLFLOW(); + return true; +} + } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/GnssConfiguration.h b/gps/android/GnssConfiguration.h index 1629e06..f46f607 100644 --- a/gps/android/GnssConfiguration.h +++ b/gps/android/GnssConfiguration.h @@ -19,19 +19,19 @@ */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H -#define ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSCONFIGURATION_H +#define ANDROID_HARDWARE_GNSS_V1_1_GNSSCONFIGURATION_H -#include +#include #include namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { -using ::android::hardware::gnss::V1_0::IGnssConfiguration; +using ::android::hardware::gnss::V1_1::IGnssConfiguration; using ::android::hardware::Return; using ::android::hardware::Void; using ::android::hardware::hidl_vec; @@ -58,14 +58,18 @@ struct GnssConfiguration : public IGnssConfiguration { Return setEmergencySuplPdn(bool enable) override; Return setGpsLock(uint8_t lock) override; + // Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow. + Return setBlacklist( + const hidl_vec& blacklist) override; + private: Gnss* mGnss = nullptr; }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSCONFIGURATION_H diff --git a/gps/android/GnssDebug.cpp b/gps/android/GnssDebug.cpp index 3d8e055..94238ab 100644 --- a/gps/android/GnssDebug.cpp +++ b/gps/android/GnssDebug.cpp @@ -25,7 +25,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::hidl_vec; @@ -184,7 +184,7 @@ Return GnssDebug::getDebugData(getDebugData_cb _hidl_cb) } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/GnssDebug.h b/gps/android/GnssDebug.h index a7116cb..cb818ac 100644 --- a/gps/android/GnssDebug.h +++ b/gps/android/GnssDebug.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H -#define ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H +#define ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H #include @@ -24,7 +24,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnssDebug; @@ -51,9 +51,9 @@ private: }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H diff --git a/gps/android/GnssGeofencing.cpp b/gps/android/GnssGeofencing.cpp index 2a8ff88..5c11afe 100644 --- a/gps/android/GnssGeofencing.cpp +++ b/gps/android/GnssGeofencing.cpp @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { void GnssGeofencing::GnssGeofencingDeathRecipient::serviceDied( @@ -135,7 +135,7 @@ Return GnssGeofencing::removeAllGeofences() { } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/GnssGeofencing.h b/gps/android/GnssGeofencing.h index db5f9d2..94a73de 100644 --- a/gps/android/GnssGeofencing.h +++ b/gps/android/GnssGeofencing.h @@ -18,8 +18,8 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSGEOFENCING_H -#define ANDROID_HARDWARE_GNSS_V1_0_GNSSGEOFENCING_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSGEOFENCING_H +#define ANDROID_HARDWARE_GNSS_V1_1_GNSSGEOFENCING_H #include #include @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnssGeofenceCallback; @@ -83,9 +83,9 @@ struct GnssGeofencing : public IGnssGeofencing { }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSGEOFENCING_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSGEOFENCING_H diff --git a/gps/android/GnssMeasurement.cpp b/gps/android/GnssMeasurement.cpp index 1c65bd6..2578a85 100644 --- a/gps/android/GnssMeasurement.cpp +++ b/gps/android/GnssMeasurement.cpp @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { void GnssMeasurement::GnssMeasurementDeathRecipient::serviceDied( @@ -89,13 +89,43 @@ Return GnssMeasurement::close() { mGnssMeasurementCbIface->unlinkToDeath(mGnssMeasurementDeathRecipient); mGnssMeasurementCbIface = nullptr; } + if (mGnssMeasurementCbIface_1_1 != nullptr) { + mGnssMeasurementCbIface_1_1->unlinkToDeath(mGnssMeasurementDeathRecipient); + mGnssMeasurementCbIface_1_1 = nullptr; + } mApi->measurementClose(); return Void(); } +// Methods from ::android::hardware::gnss::V1_1::IGnssMeasurement follow. +Return GnssMeasurement::setCallback_1_1( + const sp& callback, bool /*enableFullTracking*/) { + + Return ret = + IGnssMeasurement::GnssMeasurementStatus::ERROR_GENERIC; + if (mGnssMeasurementCbIface_1_1 != nullptr) { + LOC_LOGE("%s]: GnssMeasurementCallback is already set", __FUNCTION__); + return IGnssMeasurement::GnssMeasurementStatus::ERROR_ALREADY_INIT; + } + + if (callback == nullptr) { + LOC_LOGE("%s]: callback is nullptr", __FUNCTION__); + return ret; + } + if (mApi == nullptr) { + LOC_LOGE("%s]: mApi is nullptr", __FUNCTION__); + return ret; + } + + mGnssMeasurementCbIface_1_1 = callback; + mGnssMeasurementCbIface_1_1->linkToDeath(mGnssMeasurementDeathRecipient, 0); + + return mApi->measurementSetCallback_1_1(callback); +} + } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/GnssMeasurement.h b/gps/android/GnssMeasurement.h index 4247dbf..373f0d0 100644 --- a/gps/android/GnssMeasurement.h +++ b/gps/android/GnssMeasurement.h @@ -18,21 +18,21 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSMEASUREMENT_H -#define ANDROID_HARDWARE_GNSS_V1_0_GNSSMEASUREMENT_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSMEASUREMENT_H +#define ANDROID_HARDWARE_GNSS_V1_1_GNSSMEASUREMENT_H -#include +#include #include #include namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { -using ::android::hardware::gnss::V1_0::IGnssMeasurement; -using ::android::hardware::gnss::V1_0::IGnssMeasurementCallback; +using ::android::hardware::gnss::V1_1::IGnssMeasurement; +using ::android::hardware::gnss::V1_1::IGnssMeasurementCallback; using ::android::hardware::Return; using ::android::hardware::Void; using ::android::hardware::hidl_vec; @@ -52,6 +52,11 @@ struct GnssMeasurement : public IGnssMeasurement { const sp& callback) override; Return close() override; + // Methods from ::android::hardware::gnss::V1_1::IGnssMeasurement follow. + Return setCallback_1_1( + const sp& callback, + bool enableFullTracking) override; + private: struct GnssMeasurementDeathRecipient : hidl_death_recipient { GnssMeasurementDeathRecipient(sp gnssMeasurement) : @@ -65,13 +70,14 @@ struct GnssMeasurement : public IGnssMeasurement { private: sp mGnssMeasurementDeathRecipient = nullptr; sp mGnssMeasurementCbIface = nullptr; + sp mGnssMeasurementCbIface_1_1 = nullptr; MeasurementAPIClient* mApi; }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSMEASUREMENT_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSMEASUREMENT_H diff --git a/gps/android/GnssNi.cpp b/gps/android/GnssNi.cpp index d06cc20..5ce9569 100644 --- a/gps/android/GnssNi.cpp +++ b/gps/android/GnssNi.cpp @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { void GnssNi::GnssNiDeathRecipient::serviceDied(uint64_t cookie, const wp& who) { @@ -79,7 +79,7 @@ Return GnssNi::respond(int32_t notifId, IGnssNiCallback::GnssUserResponseT } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/GnssNi.h b/gps/android/GnssNi.h index 90f62d5..6733e5b 100644 --- a/gps/android/GnssNi.h +++ b/gps/android/GnssNi.h @@ -18,8 +18,8 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H -#define ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H +#ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H +#define ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H #include #include @@ -27,7 +27,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnssNi; @@ -67,9 +67,9 @@ struct GnssNi : public IGnssNi { }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H +#endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H diff --git a/gps/android/android.hardware.gnss@1.0-service-qti.rc b/gps/android/android.hardware.gnss@1.0-service-qti.rc index b5da6f9..41b105b 100644 --- a/gps/android/android.hardware.gnss@1.0-service-qti.rc +++ b/gps/android/android.hardware.gnss@1.0-service-qti.rc @@ -1,4 +1,4 @@ -service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service-qti +service gnss_service /vendor/bin/hw/android.hardware.gnss@1.1-service-qti class hal user gps group system gps radio diff --git a/gps/android/location_api/BatchingAPIClient.cpp b/gps/android/location_api/BatchingAPIClient.cpp index 264ab83..82a803f 100644 --- a/gps/android/location_api/BatchingAPIClient.cpp +++ b/gps/android/location_api/BatchingAPIClient.cpp @@ -42,7 +42,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnssBatching; @@ -190,7 +190,7 @@ static void convertBatchOption(const IGnssBatching::Options& in, LocationOptions } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/BatchingAPIClient.h b/gps/android/location_api/BatchingAPIClient.h index 5d64df3..64d47a0 100644 --- a/gps/android/location_api/BatchingAPIClient.h +++ b/gps/android/location_api/BatchingAPIClient.h @@ -39,7 +39,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { class BatchingAPIClient : public LocationAPIClientBase @@ -67,7 +67,7 @@ private: }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/GeofenceAPIClient.cpp b/gps/android/location_api/GeofenceAPIClient.cpp index 774a049..93d175e 100644 --- a/gps/android/location_api/GeofenceAPIClient.cpp +++ b/gps/android/location_api/GeofenceAPIClient.cpp @@ -39,7 +39,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnssGeofenceCallback; @@ -269,7 +269,7 @@ void GeofenceAPIClient::onResumeGeofencesCb(size_t count, LocationError* errors, } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/GeofenceAPIClient.h b/gps/android/location_api/GeofenceAPIClient.h index dc99ddd..c74a59a 100644 --- a/gps/android/location_api/GeofenceAPIClient.h +++ b/gps/android/location_api/GeofenceAPIClient.h @@ -37,7 +37,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::sp; @@ -69,7 +69,7 @@ private: }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/GnssAPIClient.cpp b/gps/android/location_api/GnssAPIClient.cpp index 320ae15..4e3b0ac 100644 --- a/gps/android/location_api/GnssAPIClient.cpp +++ b/gps/android/location_api/GnssAPIClient.cpp @@ -40,7 +40,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnss; @@ -531,7 +531,7 @@ static void convertGnssSvStatus(GnssSvNotification& in, IGnssCallback::GnssSvSta } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/GnssAPIClient.h b/gps/android/location_api/GnssAPIClient.h index 923cb48..1589f39 100644 --- a/gps/android/location_api/GnssAPIClient.h +++ b/gps/android/location_api/GnssAPIClient.h @@ -32,15 +32,15 @@ #include -#include -#include +#include +#include #include #include namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::sp; @@ -101,7 +101,7 @@ private: }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/LocationUtil.cpp b/gps/android/location_api/LocationUtil.cpp index 89681f2..21c2e39 100644 --- a/gps/android/location_api/LocationUtil.cpp +++ b/gps/android/location_api/LocationUtil.cpp @@ -32,7 +32,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::GnssLocation; @@ -182,7 +182,7 @@ void convertGnssEphemerisHealth(GnssEphemerisHealth& in, GnssDebug::SatelliteEph } } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/LocationUtil.h b/gps/android/location_api/LocationUtil.h index 9e0cd36..63f4f6f 100644 --- a/gps/android/location_api/LocationUtil.h +++ b/gps/android/location_api/LocationUtil.h @@ -37,7 +37,7 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { void convertGnssLocation(Location& in, V1_0::GnssLocation& out); @@ -48,7 +48,7 @@ void convertGnssEphemerisSource(GnssEphemerisSource& in, GnssDebug::SatelliteEph void convertGnssEphemerisHealth(GnssEphemerisHealth& in, GnssDebug::SatelliteEphemerisHealth& out); } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/MeasurementAPIClient.cpp b/gps/android/location_api/MeasurementAPIClient.cpp index 823851d..f1a5d01 100644 --- a/gps/android/location_api/MeasurementAPIClient.cpp +++ b/gps/android/location_api/MeasurementAPIClient.cpp @@ -39,20 +39,23 @@ namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::hardware::gnss::V1_0::IGnssMeasurement; -using ::android::hardware::gnss::V1_0::IGnssMeasurementCallback; +using ::android::hardware::gnss::V1_1::IGnssMeasurementCallback; static void convertGnssData(GnssMeasurementsNotification& in, V1_0::IGnssMeasurementCallback::GnssData& out); +static void convertGnssData_1_1(GnssMeasurementsNotification& in, + IGnssMeasurementCallback::GnssData& out); static void convertGnssMeasurement(GnssMeasurementsData& in, V1_0::IGnssMeasurementCallback::GnssMeasurement& out); static void convertGnssClock(GnssMeasurementsClock& in, IGnssMeasurementCallback::GnssClock& out); MeasurementAPIClient::MeasurementAPIClient() : mGnssMeasurementCbIface(nullptr), + mGnssMeasurementCbIface_1_1(nullptr), mTracking(false) { LOC_LOGD("%s]: ()", __FUNCTION__); @@ -76,6 +79,18 @@ MeasurementAPIClient::measurementSetCallback(const sp +MeasurementAPIClient::measurementSetCallback_1_1(const sp& callback) +{ + LOC_LOGD("%s]: (%p)", __FUNCTION__, &callback); + + mMutex.lock(); + mGnssMeasurementCbIface_1_1 = callback; + mMutex.unlock(); + + return startTracking(); +} + Return MeasurementAPIClient::startTracking() { @@ -93,7 +108,7 @@ MeasurementAPIClient::startTracking() locationCallbacks.gnssNmeaCb = nullptr; locationCallbacks.gnssMeasurementsCb = nullptr; - if (mGnssMeasurementCbIface != nullptr) { + if (mGnssMeasurementCbIface_1_1 != nullptr || mGnssMeasurementCbIface != nullptr) { locationCallbacks.gnssMeasurementsCb = [this](GnssMeasurementsNotification gnssMeasurementsNotification) { onGnssMeasurementsCb(gnssMeasurementsNotification); @@ -129,12 +144,23 @@ void MeasurementAPIClient::onGnssMeasurementsCb( if (mTracking) { mMutex.lock(); sp gnssMeasurementCbIface = nullptr; - if (mGnssMeasurementCbIface != nullptr) { + sp gnssMeasurementCbIface_1_1 = nullptr; + if (mGnssMeasurementCbIface_1_1 != nullptr) { + gnssMeasurementCbIface_1_1 = mGnssMeasurementCbIface_1_1; + } else if (mGnssMeasurementCbIface != nullptr) { gnssMeasurementCbIface = mGnssMeasurementCbIface; } mMutex.unlock(); - if (gnssMeasurementCbIface != nullptr) { + if (gnssMeasurementCbIface_1_1 != nullptr) { + IGnssMeasurementCallback::GnssData gnssData; + convertGnssData_1_1(gnssMeasurementsNotification, gnssData); + auto r = gnssMeasurementCbIface_1_1->gnssMeasurementCb(gnssData); + if (!r.isOk()) { + LOC_LOGE("%s] Error from gnssMeasurementCb description=%s", + __func__, r.description().c_str()); + } + } else if (gnssMeasurementCbIface != nullptr) { V1_0::IGnssMeasurementCallback::GnssData gnssData; convertGnssData(gnssMeasurementsNotification, gnssData); auto r = gnssMeasurementCbIface->GnssMeasurementCb(gnssData); @@ -268,8 +294,18 @@ static void convertGnssData(GnssMeasurementsNotification& in, convertGnssClock(in.clock, out.clock); } +static void convertGnssData_1_1(GnssMeasurementsNotification& in, + IGnssMeasurementCallback::GnssData& out) +{ + out.measurements.resize(in.count); + for (size_t i = 0; i < in.count; i++) { + convertGnssMeasurement(in.measurements[i], out.measurements[i].v1_0); + } + convertGnssClock(in.clock, out.clock); +} + } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/location_api/MeasurementAPIClient.h b/gps/android/location_api/MeasurementAPIClient.h index 08b4811..117ad54 100644 --- a/gps/android/location_api/MeasurementAPIClient.h +++ b/gps/android/location_api/MeasurementAPIClient.h @@ -31,15 +31,15 @@ #define MEASUREMENT_API_CLINET_H #include -#include -#include +#include +#include #include #include namespace android { namespace hardware { namespace gnss { -namespace V1_0 { +namespace V1_1 { namespace implementation { using ::android::sp; @@ -55,6 +55,8 @@ public: // for GpsMeasurementInterface Return measurementSetCallback( const sp& callback); + Return measurementSetCallback_1_1( + const sp& callback); void measurementClose(); Return startTracking(); @@ -64,12 +66,13 @@ public: private: std::mutex mMutex; sp mGnssMeasurementCbIface; + sp mGnssMeasurementCbIface_1_1; bool mTracking; }; } // namespace implementation -} // namespace V1_0 +} // namespace V1_1 } // namespace gnss } // namespace hardware } // namespace android diff --git a/gps/android/service.cpp b/gps/android/service.cpp index 6b0f602..9ab6131 100644 --- a/gps/android/service.cpp +++ b/gps/android/service.cpp @@ -23,7 +23,7 @@ #include #include -using android::hardware::gnss::V1_0::IGnss; +using android::hardware::gnss::V1_1::IGnss; using android::hardware::defaultPassthroughServiceImplementation; int main() { diff --git a/gps/core/SystemStatusOsObserver.cpp b/gps/core/SystemStatusOsObserver.cpp index 8127e86..0f6d228 100644 --- a/gps/core/SystemStatusOsObserver.cpp +++ b/gps/core/SystemStatusOsObserver.cpp @@ -328,12 +328,9 @@ void SystemStatusOsObserver::notify(const list& dlist) for (auto client : clientSet) { unordered_set dataItemIdsForThisClient( mParent->mClientToDataItems.getValSet(client)); - for (auto itr = dataItemIdsForThisClient.begin(); - itr != dataItemIdsForThisClient.end(); ) { - if (dataItemIdsToBeSent.find(*itr) == dataItemIdsToBeSent.end()) { - itr = dataItemIdsForThisClient.erase(itr); - } else { - itr++; + for (auto id : dataItemIdsForThisClient) { + if (dataItemIdsToBeSent.find(id) == dataItemIdsToBeSent.end()) { + dataItemIdsForThisClient.erase(id); } } diff --git a/gps/gnss/GnssAdapter.cpp b/gps/gnss/GnssAdapter.cpp index 3ce64e9..751c148 100644 --- a/gps/gnss/GnssAdapter.cpp +++ b/gps/gnss/GnssAdapter.cpp @@ -766,9 +766,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) err = mApi.setGpsLock(mConfig.gpsLock); } if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT) { uint32_t newSuplVersion = mAdapter.convertSuplVersion(mConfig.suplVersion); @@ -780,9 +779,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) err = LOCATION_ERROR_SUCCESS; } if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_SET_ASSISTANCE_DATA_VALID_BIT) { if (GNSS_ASSISTANCE_TYPE_SUPL == mConfig.assistanceServer.type) { @@ -810,9 +808,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) err = LOCATION_ERROR_INVALID_PARAMETER; } if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) { uint32_t newLppProfile = mAdapter.convertLppProfile(mConfig.lppProfile); @@ -824,9 +821,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) err = LOCATION_ERROR_SUCCESS; } if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) { uint32_t newLppeControlPlaneMask = @@ -838,9 +834,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) err = LOCATION_ERROR_SUCCESS; } if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_LPPE_USER_PLANE_VALID_BIT) { uint32_t newLppeUserPlaneMask = @@ -852,9 +847,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) err = LOCATION_ERROR_SUCCESS; } if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_AGLONASS_POSITION_PROTOCOL_VALID_BIT) { uint32_t newAGloProtMask = @@ -867,9 +861,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) err = LOCATION_ERROR_SUCCESS; } if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_EM_PDN_FOR_EM_SUPL_VALID_BIT) { uint32_t newEP4ES = mAdapter.convertEP4ES(mConfig.emergencyPdnForEmergencySupl); @@ -878,9 +871,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) } err = LOCATION_ERROR_SUCCESS; if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_SUPL_EM_SERVICES_BIT) { uint32_t newSuplEs = mAdapter.convertSuplEs(mConfig.suplEmergencyServices); @@ -889,9 +881,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) } err = LOCATION_ERROR_SUCCESS; if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } if (mConfig.flags & GNSS_CONFIG_FLAGS_SUPL_MODE_BIT) { uint32_t newSuplMode = mAdapter.convertSuplMode(mConfig.suplModeMask); @@ -903,9 +894,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config) } err = LOCATION_ERROR_SUCCESS; if (index < mCount) { - errs[index] = err; + errs[index++] = err; } - index++; } mAdapter.reportResponse(index, errs, mIds); diff --git a/gps/utils/log_util.h b/gps/utils/log_util.h index feb4d3c..af0110a 100644 --- a/gps/utils/log_util.h +++ b/gps/utils/log_util.h @@ -160,13 +160,13 @@ extern char* get_timestamp(char* str, unsigned long buf_size); // Used for logging callflow from Android Framework -#define ENTRY_LOG_CALLFLOW() LOG_I(FROM_AFW, __FUNCTION__, %s, "") +#define ENTRY_LOG_CALLFLOW() LOG_V(FROM_AFW, __FUNCTION__, %s, "") // Used for logging callflow to Modem -#define EXIT_LOG_CALLFLOW(SPEC, VAL) LOG_I(TO_MODEM, __FUNCTION__, SPEC, VAL) +#define EXIT_LOG_CALLFLOW(SPEC, VAL) LOG_V(TO_MODEM, __FUNCTION__, SPEC, VAL) // Used for logging callflow from Modem(TO_MODEM, __FUNCTION__, %s, "") -#define MODEM_LOG_CALLFLOW(SPEC, VAL) LOG_I(FROM_MODEM, __FUNCTION__, SPEC, VAL) +#define MODEM_LOG_CALLFLOW(SPEC, VAL) LOG_V(FROM_MODEM, __FUNCTION__, SPEC, VAL) // Used for logging callflow to Android Framework -#define CALLBACK_LOG_CALLFLOW(CB, SPEC, VAL) LOG_I(TO_AFW, CB, SPEC, VAL) +#define CALLBACK_LOG_CALLFLOW(CB, SPEC, VAL) LOG_V(TO_AFW, CB, SPEC, VAL) #ifdef __cplusplus }