Merge "Address ANAPIC review comments"

This commit is contained in:
Yu-Han Yang
2020-02-15 01:59:42 +00:00
committed by Android (Google) Code Review
6 changed files with 24 additions and 34 deletions

View File

@@ -651,10 +651,10 @@ f18695dd36ee205640b8326a17453858a7b4596653aaa6ef0016b0aef1bd4dac android.hardwar
626db710bf917ecf551a0b0b1f25be10bf52758f43e0fc808b148b6aae2ef73e android.hardware.gnss@2.1::IGnss
ba5ac712b2a656dc07c83ab4a7a2c2f3bee1bbcb752e8b8ffa9b672f3b5b0728 android.hardware.gnss@2.1::IGnssAntennaInfo
0bc3ed97cbc3f6abc89c68f4e9f4d124f9f723431997dc88c2186cf4d2ad47ee android.hardware.gnss@2.1::IGnssAntennaInfoCallback
50c5d009af76d65b3023a9d94ee519545e72cb7c59bc7166d768d6f00923774d android.hardware.gnss@2.1::IGnssCallback
3541d83adfeac16ee3e45d183a58dffe06012ccb5aa5bcd2e4f6eeae269f69cd android.hardware.gnss@2.1::IGnssCallback
737d750017738f0753d13ba01a3310e0161f294b8ae80b3fd63eaa227e9d9c66 android.hardware.gnss@2.1::IGnssConfiguration
7913a11206a577b12ade86a7cf3f95c2639cb514d086673f279bf99238c9917e android.hardware.gnss@2.1::IGnssMeasurement
9999f2484f35ebfacdd433dfeae459f2a582334315959653ec8efde7699ec556 android.hardware.gnss@2.1::IGnssMeasurementCallback
0a16e5913e94d995cfcf959a1c6f10b0b8e9dfdb5f45ac6e7244711ddd740272 android.hardware.gnss@2.1::IGnssMeasurementCallback
6670e7780803a8c696c6391fda5589a334b1b37dc7be9393792ed35035413633 android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections
a28d6c29a7e36976acffb018208e65b3496d9152d57d864038556cdd83b35744 android.hardware.gnss.measurement_corrections@1.1::types
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth

View File

@@ -35,6 +35,13 @@ interface IGnssCallback extends @2.0::IGnssCallback {
ANTENNA_INFO = 1 << 11,
};
/**
* Callback to inform framework of the GNSS HAL implementation's capabilities.
*
* @param capabilities Capability parameter is a bit field of the Capabilities enum.
*/
gnssSetCapabilitiesCb_2_1(bitfield<Capabilities> capabilities);
/**
* Extends a GnssSvInfo, adding a basebandCN0DbHz.
*/

View File

@@ -28,31 +28,7 @@ interface IGnssMeasurementCallback extends @2.0::IGnssMeasurementCallback {
/**
* Flags to indicate what fields in GnssMeasurement are valid.
*/
enum GnssMeasurementFlags : uint32_t {
/**
* A valid 'snr' is stored in the data structure.
*/
HAS_SNR = 1 << 0,
/**
* A valid 'carrier frequency' is stored in the data structure.
*/
HAS_CARRIER_FREQUENCY = 1 << 9,
/**
* A valid 'carrier cycles' is stored in the data structure.
*/
HAS_CARRIER_CYCLES = 1 << 10,
/**
* A valid 'carrier phase' is stored in the data structure.
*/
HAS_CARRIER_PHASE = 1 << 11,
/**
* A valid 'carrier phase uncertainty' is stored in the data structure.
*/
HAS_CARRIER_PHASE_UNCERTAINTY = 1 << 12,
/**
* A valid automatic gain control is stored in the data structure.
*/
HAS_AUTOMATIC_GAIN_CONTROL = 1 << 13,
enum GnssMeasurementFlags : @1.0::IGnssMeasurementCallback.GnssMeasurementFlags {
/**
* A valid receiver inter-signal bias is stored in the data structure.
*/
@@ -104,8 +80,8 @@ interface IGnssMeasurementCallback extends @2.0::IGnssMeasurementCallback {
* The receiver inter-signal bias (ISB) in nanoseconds.
*
* This value is the estimated receiver-side inter-system (different from the constellation
* in GnssClock.referenceSignalForIsb) bias and inter-frequency (different from the carrier
* frequency in GnssClock.referenceSignalForIsb) bias. The reported receiver ISB
* in GnssClock.referenceSignalTypeForIsb) bias and inter-frequency (different from the
* carrier frequency in GnssClock.referenceSignalTypeForIsb) bias. The reported receiver ISB
* must include signal delays caused by
*
* - Receiver inter-constellation bias
@@ -114,7 +90,7 @@ interface IGnssMeasurementCallback extends @2.0::IGnssMeasurementCallback {
*
* The value does not include the inter-frequency Ionospheric bias.
*
* The receiver ISB of GnssClock.referenceSignalForIsb is defined to be 0.0 nanoseconds.
* The receiver ISB of GnssClock.referenceSignalTypeForIsb is defined to be 0.0 nanoseconds.
*/
double receiverInterSignalBiasNs;
@@ -127,8 +103,8 @@ interface IGnssMeasurementCallback extends @2.0::IGnssMeasurementCallback {
* The satellite inter-signal bias in nanoseconds.
*
* This value is the satellite-and-control-segment-side inter-system (different from the
* constellation in GnssClock.referenceSignalForIsb) bias and inter-frequency (different
* from the carrier frequency in GnssClock.referenceSignalForIsb) bias, including:
* constellation in GnssClock.referenceSignalTypeForIsb) bias and inter-frequency (different
* from the carrier frequency in GnssClock.referenceSignalTypeForIsb) bias, including:
*
* - Master clock bias (e.g., GPS-GAL Time Offset (GGTO), GPT-UTC Time Offset (TauGps),
* BDS-GLO Time Offset (BGTO))
@@ -136,7 +112,7 @@ interface IGnssMeasurementCallback extends @2.0::IGnssMeasurementCallback {
* - Satellite inter-signal bias, which includes satellite inter-frequency bias (GLO only),
* and satellite inter-code bias (e.g., Differential Code Bias (DCB)).
*
* The receiver ISB of GnssClock.referenceSignalForIsb is defined to be 0.0 nanoseconds.
* The receiver ISB of GnssClock.referenceSignalTypeForIsb is defined to be 0.0 nanoseconds.
*/
double satelliteInterSignalBiasNs;

View File

@@ -339,7 +339,7 @@ Return<bool> Gnss::setCallback_2_1(const sp<V2_1::IGnssCallback>& callback) {
const auto capabilities = Capabilities::MEASUREMENTS | Capabilities::MEASUREMENT_CORRECTIONS |
Capabilities::LOW_POWER_MODE | Capabilities::SATELLITE_BLACKLIST |
Capabilities::ANTENNA_INFO;
auto ret = sGnssCallback_2_1->gnssSetCapabilitiesCb_2_0(capabilities);
auto ret = sGnssCallback_2_1->gnssSetCapabilitiesCb_2_1(capabilities);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
}

View File

@@ -215,6 +215,12 @@ Return<void> GnssHalTest::GnssCallback::gnssSetCapabilitiesCb_2_0(uint32_t capab
return Void();
}
Return<void> GnssHalTest::GnssCallback::gnssSetCapabilitiesCb_2_1(uint32_t capabilities) {
ALOGI("Capabilities (v2.1) received %d", capabilities);
capabilities_cbq_.store(capabilities);
return Void();
}
Return<void> GnssHalTest::GnssCallback::gnssNameCb(const android::hardware::hidl_string& name) {
ALOGI("Name received: %s", name.c_str());
name_cbq_.store(name);

View File

@@ -109,6 +109,7 @@ class GnssHalTest : public testing::TestWithParam<std::string> {
// New in v2.1
Return<void> gnssSvStatusCb_2_1(
const hidl_vec<IGnssCallback_2_1::GnssSvInfo>& svInfoList) override;
Return<void> gnssSetCapabilitiesCb_2_1(uint32_t capabilities) override;
private:
Return<void> gnssLocationCbImpl(const GnssLocation_2_0& location);