sanders: gps: update to LA.UM.7.6.r1-02000-89xx.0 tag

This commit is contained in:
therootlord
2018-09-12 13:45:48 -03:00
parent 8a6b5c05e7
commit 0a41b9dc1a
150 changed files with 4794 additions and 4130 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
* Not a Contribution
*/
/*
@@ -27,15 +27,26 @@
namespace android {
namespace hardware {
namespace gnss {
namespace V1_0 {
namespace V1_1 {
namespace implementation {
sp<IAGnssCallback> AGnss::sAGnssCbIface = nullptr;
static AGnss* spAGnss = nullptr;
AGnss::AGnss(Gnss* gnss) : mGnss(gnss) {
spAGnss = this;
}
AGnss::~AGnss() {
spAGnss = nullptr;
}
void AGnss::agnssStatusIpV4Cb(AGnssExtStatusIpV4 status){
if (nullptr != spAGnss) {
spAGnss->statusIpV4Cb(status);
}
}
void AGnss::statusIpV4Cb(AGnssExtStatusIpV4 status) {
IAGnssCallback::AGnssStatusIpV4 st = {};
switch (status.type) {
@@ -72,9 +83,13 @@ void AGnss::agnssStatusIpV4Cb(AGnssExtStatusIpV4 status){
}
st.ipV4Addr = status.ipV4Addr;
auto r = sAGnssCbIface->agnssStatusIpV4Cb(st);
if (!r.isOk()) {
LOC_LOGE("Error invoking AGNSS status cb %s", r.description().c_str());
if (mAGnssCbIface != nullptr) {
auto r = mAGnssCbIface->agnssStatusIpV4Cb(st);
if (!r.isOk()) {
LOC_LOGw("Error invoking AGNSS status cb %s", r.description().c_str());
}
} else {
LOC_LOGw("setCallback has not been called yet");
}
}
@@ -86,7 +101,7 @@ Return<void> AGnss::setCallback(const sp<IAGnssCallback>& callback) {
}
// Save the interface
sAGnssCbIface = callback;
mAGnssCbIface = callback;
AgpsCbInfo cbInfo = {};
cbInfo.statusV4Cb = (void*)agnssStatusIpV4Cb;
@@ -182,7 +197,7 @@ Return<bool> AGnss::setServer(IAGnssCallback::AGnssType type,
}
} // namespace implementation
} // namespace V1_0
} // namespace V1_1
} // namespace gnss
} // namespace hardware
} // namespace android