2020-09-10 02:25:02 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define LOG_TAG "GnssAidl"
|
|
|
|
|
|
|
|
#include "Gnss.h"
|
2021-11-25 01:39:13 +01:00
|
|
|
#include <inttypes.h>
|
2020-09-10 02:25:02 +02:00
|
|
|
#include <log/log.h>
|
2022-04-27 18:57:01 +02:00
|
|
|
#include <utils/Timers.h>
|
2021-11-05 04:56:40 +01:00
|
|
|
#include "AGnss.h"
|
2021-12-14 05:06:02 +01:00
|
|
|
#include "AGnssRil.h"
|
2022-01-12 05:39:37 +01:00
|
|
|
#include "DeviceFileReader.h"
|
2022-01-20 23:57:09 +01:00
|
|
|
#include "FixLocationParser.h"
|
2021-12-30 06:14:29 +01:00
|
|
|
#include "GnssAntennaInfo.h"
|
2021-09-27 10:01:06 +02:00
|
|
|
#include "GnssBatching.h"
|
2020-10-01 02:01:53 +02:00
|
|
|
#include "GnssConfiguration.h"
|
2021-11-16 16:09:11 +01:00
|
|
|
#include "GnssDebug.h"
|
2021-09-30 06:31:23 +02:00
|
|
|
#include "GnssGeofence.h"
|
2021-10-04 07:32:04 +02:00
|
|
|
#include "GnssNavigationMessageInterface.h"
|
2020-09-10 02:25:02 +02:00
|
|
|
#include "GnssPsds.h"
|
2021-12-08 06:27:51 +01:00
|
|
|
#include "GnssVisibilityControl.h"
|
2021-12-27 05:13:02 +01:00
|
|
|
#include "MeasurementCorrectionsInterface.h"
|
2021-11-25 01:39:13 +01:00
|
|
|
#include "Utils.h"
|
2020-09-10 02:25:02 +02:00
|
|
|
|
|
|
|
namespace aidl::android::hardware::gnss {
|
2021-11-25 01:39:13 +01:00
|
|
|
using ::android::hardware::gnss::common::Utils;
|
2022-01-12 05:39:37 +01:00
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
using ndk::ScopedAStatus;
|
|
|
|
using GnssSvInfo = IGnssCallback::GnssSvInfo;
|
|
|
|
|
|
|
|
constexpr int TTFF_MILLIS = 2200;
|
2020-09-10 02:25:02 +02:00
|
|
|
|
2020-10-01 02:01:53 +02:00
|
|
|
std::shared_ptr<IGnssCallback> Gnss::sGnssCallback = nullptr;
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
Gnss::Gnss() : mMinIntervalMs(1000), mFirstFixReceived(false) {}
|
|
|
|
|
|
|
|
ScopedAStatus Gnss::setCallback(const std::shared_ptr<IGnssCallback>& callback) {
|
|
|
|
ALOGD("setCallback");
|
2020-10-01 02:01:53 +02:00
|
|
|
if (callback == nullptr) {
|
|
|
|
ALOGE("%s: Null callback ignored", __func__);
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::fromExceptionCode(STATUS_INVALID_OPERATION);
|
2020-10-01 02:01:53 +02:00
|
|
|
}
|
|
|
|
sGnssCallback = callback;
|
|
|
|
|
2022-02-09 23:47:50 +01:00
|
|
|
int capabilities =
|
|
|
|
(int)(IGnssCallback::CAPABILITY_MEASUREMENTS | IGnssCallback::CAPABILITY_SCHEDULING |
|
|
|
|
IGnssCallback::CAPABILITY_SATELLITE_BLOCKLIST |
|
|
|
|
IGnssCallback::CAPABILITY_SATELLITE_PVT |
|
|
|
|
IGnssCallback::CAPABILITY_CORRELATION_VECTOR |
|
2022-11-17 22:51:25 +01:00
|
|
|
IGnssCallback::CAPABILITY_ANTENNA_INFO |
|
|
|
|
IGnssCallback::CAPABILITY_ACCUMULATED_DELTA_RANGE);
|
2020-10-01 02:01:53 +02:00
|
|
|
auto status = sGnssCallback->gnssSetCapabilitiesCb(capabilities);
|
|
|
|
if (!status.isOk()) {
|
2022-02-09 23:47:50 +01:00
|
|
|
ALOGE("%s: Unable to invoke callback.gnssSetCapabilitiesCb", __func__);
|
|
|
|
}
|
|
|
|
|
|
|
|
IGnssCallback::GnssSystemInfo systemInfo = {
|
|
|
|
.yearOfHw = 2022,
|
2022-11-15 06:29:46 +01:00
|
|
|
.name = "Google, Cuttlefish, AIDL v3",
|
2022-02-09 23:47:50 +01:00
|
|
|
};
|
|
|
|
status = sGnssCallback->gnssSetSystemInfoCb(systemInfo);
|
|
|
|
if (!status.isOk()) {
|
|
|
|
ALOGE("%s: Unable to invoke callback.gnssSetSystemInfoCb", __func__);
|
2020-10-01 02:01:53 +02:00
|
|
|
}
|
2022-10-13 01:54:51 +02:00
|
|
|
GnssSignalType signalType1 = {
|
|
|
|
.constellation = GnssConstellationType::GPS,
|
2022-11-04 23:55:32 +01:00
|
|
|
.carrierFrequencyHz = 1.57542e+09,
|
2022-10-13 01:54:51 +02:00
|
|
|
.codeType = GnssSignalType::CODE_TYPE_C,
|
|
|
|
};
|
|
|
|
GnssSignalType signalType2 = {
|
|
|
|
.constellation = GnssConstellationType::GLONASS,
|
2022-11-04 23:55:32 +01:00
|
|
|
.carrierFrequencyHz = 1.5980625e+09,
|
2022-10-13 01:54:51 +02:00
|
|
|
.codeType = GnssSignalType::CODE_TYPE_C,
|
|
|
|
};
|
|
|
|
status = sGnssCallback->gnssSetSignalTypeCapabilitiesCb(
|
|
|
|
std::vector<GnssSignalType>({signalType1, signalType2}));
|
|
|
|
if (!status.isOk()) {
|
|
|
|
ALOGE("%s: Unable to invoke callback.gnssSetSignalTypeCapabilitiesCb", __func__);
|
|
|
|
}
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2022-01-12 05:39:37 +01:00
|
|
|
std::unique_ptr<GnssLocation> Gnss::getLocationFromHW() {
|
2022-01-20 23:57:09 +01:00
|
|
|
if (!::android::hardware::gnss::common::ReplayUtils::hasFixedLocationDeviceFile()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2022-01-12 05:39:37 +01:00
|
|
|
std::string inputStr =
|
|
|
|
::android::hardware::gnss::common::DeviceFileReader::Instance().getLocationData();
|
2022-01-20 23:57:09 +01:00
|
|
|
return ::android::hardware::gnss::common::FixLocationParser::getLocationFromInputStr(inputStr);
|
2022-01-12 05:39:37 +01:00
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::start() {
|
|
|
|
ALOGD("start()");
|
|
|
|
if (mIsActive) {
|
|
|
|
ALOGW("Gnss has started. Restarting...");
|
|
|
|
stop();
|
|
|
|
}
|
|
|
|
|
|
|
|
mIsActive = true;
|
2022-04-27 18:57:01 +02:00
|
|
|
mThreadBlocker.reset();
|
|
|
|
// notify measurement engine to update measurement interval
|
|
|
|
mGnssMeasurementInterface->setLocationEnabled(true);
|
2021-11-25 01:39:13 +01:00
|
|
|
this->reportGnssStatusValue(IGnssCallback::GnssStatusValue::SESSION_BEGIN);
|
|
|
|
mThread = std::thread([this]() {
|
2022-01-21 22:03:32 +01:00
|
|
|
this->reportSvStatus();
|
2021-11-25 01:39:13 +01:00
|
|
|
if (!mFirstFixReceived) {
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(TTFF_MILLIS));
|
|
|
|
mFirstFixReceived = true;
|
|
|
|
}
|
2022-04-27 18:57:01 +02:00
|
|
|
do {
|
|
|
|
if (!mIsActive) {
|
|
|
|
break;
|
|
|
|
}
|
2022-01-21 22:03:32 +01:00
|
|
|
this->reportSvStatus();
|
2022-04-27 18:57:01 +02:00
|
|
|
this->reportNmea();
|
2021-11-25 01:39:13 +01:00
|
|
|
|
2022-01-12 05:39:37 +01:00
|
|
|
auto currentLocation = getLocationFromHW();
|
2021-11-25 01:39:13 +01:00
|
|
|
mGnssPowerIndication->notePowerConsumption();
|
2022-01-12 05:39:37 +01:00
|
|
|
if (currentLocation != nullptr) {
|
|
|
|
this->reportLocation(*currentLocation);
|
|
|
|
} else {
|
|
|
|
const auto location = Utils::getMockLocation();
|
|
|
|
this->reportLocation(location);
|
|
|
|
}
|
2022-04-27 18:57:01 +02:00
|
|
|
} while (mIsActive && mThreadBlocker.wait_for(std::chrono::milliseconds(mMinIntervalMs)));
|
2021-11-25 01:39:13 +01:00
|
|
|
});
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2022-04-27 18:57:01 +02:00
|
|
|
ScopedAStatus Gnss::stop() {
|
|
|
|
ALOGD("stop");
|
|
|
|
mIsActive = false;
|
|
|
|
mGnssMeasurementInterface->setLocationEnabled(false);
|
|
|
|
this->reportGnssStatusValue(IGnssCallback::GnssStatusValue::SESSION_END);
|
|
|
|
mThreadBlocker.notify();
|
|
|
|
if (mThread.joinable()) {
|
|
|
|
mThread.join();
|
|
|
|
}
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
|
|
|
ScopedAStatus Gnss::close() {
|
|
|
|
ALOGD("close");
|
|
|
|
sGnssCallback = nullptr;
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
void Gnss::reportLocation(const GnssLocation& location) const {
|
|
|
|
std::unique_lock<std::mutex> lock(mMutex);
|
|
|
|
if (sGnssCallback == nullptr) {
|
|
|
|
ALOGE("%s: GnssCallback is null.", __func__);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
auto status = sGnssCallback->gnssLocationCb(location);
|
|
|
|
if (!status.isOk()) {
|
|
|
|
ALOGE("%s: Unable to invoke gnssLocationCb", __func__);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-01-21 22:03:32 +01:00
|
|
|
void Gnss::reportSvStatus() const {
|
|
|
|
if (mIsSvStatusActive) {
|
|
|
|
auto svStatus = filterBlocklistedSatellites(Utils::getMockSvInfoList());
|
|
|
|
reportSvStatus(svStatus);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
void Gnss::reportSvStatus(const std::vector<GnssSvInfo>& svInfoList) const {
|
|
|
|
std::unique_lock<std::mutex> lock(mMutex);
|
|
|
|
if (sGnssCallback == nullptr) {
|
|
|
|
ALOGE("%s: sGnssCallback is null.", __func__);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
auto status = sGnssCallback->gnssSvStatusCb(svInfoList);
|
|
|
|
if (!status.isOk()) {
|
|
|
|
ALOGE("%s: Unable to invoke callback", __func__);
|
|
|
|
}
|
2020-10-01 02:01:53 +02:00
|
|
|
}
|
|
|
|
|
2022-01-21 22:03:32 +01:00
|
|
|
std::vector<GnssSvInfo> Gnss::filterBlocklistedSatellites(
|
|
|
|
std::vector<GnssSvInfo> gnssSvInfoList) const {
|
2021-11-25 01:39:13 +01:00
|
|
|
for (uint32_t i = 0; i < gnssSvInfoList.size(); i++) {
|
|
|
|
if (mGnssConfiguration->isBlocklisted(gnssSvInfoList[i])) {
|
|
|
|
gnssSvInfoList[i].svFlag &= ~(uint32_t)IGnssCallback::GnssSvFlags::USED_IN_FIX;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return gnssSvInfoList;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Gnss::reportGnssStatusValue(const IGnssCallback::GnssStatusValue gnssStatusValue) const {
|
|
|
|
std::unique_lock<std::mutex> lock(mMutex);
|
|
|
|
if (sGnssCallback == nullptr) {
|
|
|
|
ALOGE("%s: sGnssCallback is null.", __func__);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
auto status = sGnssCallback->gnssStatusCb(gnssStatusValue);
|
|
|
|
if (!status.isOk()) {
|
|
|
|
ALOGE("%s: Unable to invoke gnssStatusCb", __func__);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-27 18:57:01 +02:00
|
|
|
void Gnss::reportNmea() const {
|
|
|
|
if (mIsNmeaActive) {
|
|
|
|
std::unique_lock<std::mutex> lock(mMutex);
|
|
|
|
if (sGnssCallback == nullptr) {
|
|
|
|
ALOGE("%s: sGnssCallback is null.", __func__);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
|
|
|
|
auto status = sGnssCallback->gnssNmeaCb(now, "$TEST,0,1,2,3,4,5");
|
|
|
|
if (!status.isOk()) {
|
|
|
|
ALOGE("%s: Unable to invoke callback", __func__);
|
|
|
|
}
|
2021-11-25 01:39:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-21 22:03:32 +01:00
|
|
|
ScopedAStatus Gnss::startSvStatus() {
|
|
|
|
ALOGD("startSvStatus");
|
|
|
|
mIsSvStatusActive = true;
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
|
|
|
ScopedAStatus Gnss::stopSvStatus() {
|
|
|
|
ALOGD("stopSvStatus");
|
|
|
|
mIsSvStatusActive = false;
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
ScopedAStatus Gnss::startNmea() {
|
|
|
|
ALOGD("startNmea");
|
2022-04-27 18:57:01 +02:00
|
|
|
mIsNmeaActive = true;
|
2022-01-21 22:03:32 +01:00
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
ScopedAStatus Gnss::stopNmea() {
|
|
|
|
ALOGD("stopNmea");
|
2022-04-27 18:57:01 +02:00
|
|
|
mIsNmeaActive = false;
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2020-10-01 02:01:53 +02:00
|
|
|
}
|
|
|
|
|
2021-12-14 05:06:02 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionAGnss(std::shared_ptr<IAGnss>* iAGnss) {
|
2021-11-05 04:56:40 +01:00
|
|
|
ALOGD("Gnss::getExtensionAGnss");
|
|
|
|
*iAGnss = SharedRefBase::make<AGnss>();
|
|
|
|
return ndk::ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::injectTime(int64_t timeMs, int64_t timeReferenceMs, int uncertaintyMs) {
|
|
|
|
ALOGD("injectTime. timeMs:%" PRId64 ", timeReferenceMs:%" PRId64 ", uncertaintyMs:%d", timeMs,
|
|
|
|
timeReferenceMs, uncertaintyMs);
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2021-12-14 05:06:02 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionAGnssRil(std::shared_ptr<IAGnssRil>* iAGnssRil) {
|
|
|
|
ALOGD("Gnss::getExtensionAGnssRil");
|
|
|
|
*iAGnssRil = SharedRefBase::make<AGnssRil>();
|
|
|
|
return ndk::ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::injectLocation(const GnssLocation& location) {
|
|
|
|
ALOGD("injectLocation. lat:%lf, lng:%lf, acc:%f", location.latitudeDegrees,
|
|
|
|
location.longitudeDegrees, location.horizontalAccuracyMeters);
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
|
|
|
ScopedAStatus Gnss::injectBestLocation(const GnssLocation& location) {
|
|
|
|
ALOGD("injectBestLocation. lat:%lf, lng:%lf, acc:%f", location.latitudeDegrees,
|
|
|
|
location.longitudeDegrees, location.horizontalAccuracyMeters);
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
|
|
|
ScopedAStatus Gnss::deleteAidingData(GnssAidingData aidingDataFlags) {
|
|
|
|
ALOGD("deleteAidingData. flags:%d", (int)aidingDataFlags);
|
|
|
|
mFirstFixReceived = false;
|
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2022-01-25 00:35:25 +01:00
|
|
|
ScopedAStatus Gnss::setPositionMode(const PositionModeOptions& options) {
|
|
|
|
ALOGD("setPositionMode. minIntervalMs:%d, lowPowerMode:%d", options.minIntervalMs,
|
|
|
|
(int)options.lowPowerMode);
|
2022-04-27 18:57:01 +02:00
|
|
|
mMinIntervalMs = std::max(1000, options.minIntervalMs);
|
|
|
|
mGnssMeasurementInterface->setLocationInterval(mMinIntervalMs);
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
|
|
|
ScopedAStatus Gnss::getExtensionPsds(std::shared_ptr<IGnssPsds>* iGnssPsds) {
|
|
|
|
ALOGD("getExtensionPsds");
|
2020-09-10 02:25:02 +02:00
|
|
|
*iGnssPsds = SharedRefBase::make<GnssPsds>();
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2020-09-10 02:25:02 +02:00
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionGnssConfiguration(
|
2020-10-01 02:01:53 +02:00
|
|
|
std::shared_ptr<IGnssConfiguration>* iGnssConfiguration) {
|
2021-11-25 01:39:13 +01:00
|
|
|
ALOGD("getExtensionGnssConfiguration");
|
2020-10-01 02:01:53 +02:00
|
|
|
if (mGnssConfiguration == nullptr) {
|
|
|
|
mGnssConfiguration = SharedRefBase::make<GnssConfiguration>();
|
|
|
|
}
|
|
|
|
*iGnssConfiguration = mGnssConfiguration;
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2020-10-01 02:01:53 +02:00
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionGnssPowerIndication(
|
2020-10-27 22:42:14 +01:00
|
|
|
std::shared_ptr<IGnssPowerIndication>* iGnssPowerIndication) {
|
2021-11-25 01:39:13 +01:00
|
|
|
ALOGD("getExtensionGnssPowerIndication");
|
2021-04-27 05:17:53 +02:00
|
|
|
if (mGnssPowerIndication == nullptr) {
|
|
|
|
mGnssPowerIndication = SharedRefBase::make<GnssPowerIndication>();
|
|
|
|
}
|
2020-10-27 22:42:14 +01:00
|
|
|
|
2021-04-27 05:17:53 +02:00
|
|
|
*iGnssPowerIndication = mGnssPowerIndication;
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2020-10-27 22:42:14 +01:00
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionGnssMeasurement(
|
2020-11-20 18:51:18 +01:00
|
|
|
std::shared_ptr<IGnssMeasurementInterface>* iGnssMeasurement) {
|
2021-11-25 01:39:13 +01:00
|
|
|
ALOGD("getExtensionGnssMeasurement");
|
2022-04-27 18:57:01 +02:00
|
|
|
if (mGnssMeasurementInterface == nullptr) {
|
|
|
|
mGnssMeasurementInterface = SharedRefBase::make<GnssMeasurementInterface>();
|
2023-03-21 06:41:55 +01:00
|
|
|
mGnssMeasurementInterface->setGnssInterface(static_cast<std::shared_ptr<Gnss>>(this));
|
2022-04-27 18:57:01 +02:00
|
|
|
}
|
|
|
|
*iGnssMeasurement = mGnssMeasurementInterface;
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2020-11-20 18:51:18 +01:00
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionGnssBatching(std::shared_ptr<IGnssBatching>* iGnssBatching) {
|
|
|
|
ALOGD("getExtensionGnssBatching");
|
2021-09-27 10:01:06 +02:00
|
|
|
|
|
|
|
*iGnssBatching = SharedRefBase::make<GnssBatching>();
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2021-09-27 10:01:06 +02:00
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionGnssGeofence(std::shared_ptr<IGnssGeofence>* iGnssGeofence) {
|
|
|
|
ALOGD("getExtensionGnssGeofence");
|
2021-09-30 06:31:23 +02:00
|
|
|
|
|
|
|
*iGnssGeofence = SharedRefBase::make<GnssGeofence>();
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2021-09-30 06:31:23 +02:00
|
|
|
}
|
|
|
|
|
2021-11-25 01:39:13 +01:00
|
|
|
ScopedAStatus Gnss::getExtensionGnssNavigationMessage(
|
2021-10-04 07:32:04 +02:00
|
|
|
std::shared_ptr<IGnssNavigationMessageInterface>* iGnssNavigationMessage) {
|
2021-11-25 01:39:13 +01:00
|
|
|
ALOGD("getExtensionGnssNavigationMessage");
|
2021-10-04 07:32:04 +02:00
|
|
|
|
|
|
|
*iGnssNavigationMessage = SharedRefBase::make<GnssNavigationMessageInterface>();
|
2021-11-25 01:39:13 +01:00
|
|
|
return ScopedAStatus::ok();
|
2021-10-04 07:32:04 +02:00
|
|
|
}
|
|
|
|
|
2021-11-16 16:09:11 +01:00
|
|
|
ndk::ScopedAStatus Gnss::getExtensionGnssDebug(std::shared_ptr<IGnssDebug>* iGnssDebug) {
|
|
|
|
ALOGD("Gnss::getExtensionGnssDebug");
|
|
|
|
|
|
|
|
*iGnssDebug = SharedRefBase::make<GnssDebug>();
|
|
|
|
return ndk::ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2021-12-08 06:27:51 +01:00
|
|
|
ndk::ScopedAStatus Gnss::getExtensionGnssVisibilityControl(
|
|
|
|
std::shared_ptr<visibility_control::IGnssVisibilityControl>* iGnssVisibilityControl) {
|
|
|
|
ALOGD("Gnss::getExtensionGnssVisibilityControl");
|
|
|
|
|
|
|
|
*iGnssVisibilityControl = SharedRefBase::make<visibility_control::GnssVisibilityControl>();
|
|
|
|
return ndk::ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2021-12-30 06:14:29 +01:00
|
|
|
ndk::ScopedAStatus Gnss::getExtensionGnssAntennaInfo(
|
|
|
|
std::shared_ptr<IGnssAntennaInfo>* iGnssAntennaInfo) {
|
|
|
|
ALOGD("Gnss::getExtensionGnssAntennaInfo");
|
|
|
|
|
|
|
|
*iGnssAntennaInfo = SharedRefBase::make<GnssAntennaInfo>();
|
|
|
|
return ndk::ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2021-12-27 05:13:02 +01:00
|
|
|
ndk::ScopedAStatus Gnss::getExtensionMeasurementCorrections(
|
|
|
|
std::shared_ptr<measurement_corrections::IMeasurementCorrectionsInterface>*
|
|
|
|
iMeasurementCorrections) {
|
|
|
|
ALOGD("Gnss::getExtensionMeasurementCorrections");
|
|
|
|
|
|
|
|
*iMeasurementCorrections =
|
|
|
|
SharedRefBase::make<measurement_corrections::MeasurementCorrectionsInterface>();
|
|
|
|
return ndk::ScopedAStatus::ok();
|
|
|
|
}
|
|
|
|
|
2020-09-10 02:25:02 +02:00
|
|
|
} // namespace aidl::android::hardware::gnss
|