Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c06b5366 authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

Add GNSS HAL 2.1

Bug: 136136192
Bug: 141758837

Test: atest VtsHalGnssV2_1TargetTest
Change-Id: I8e6d52695c8ab0aeacacb0107a6c0c8271983ed3
parent db21c8e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@
         - test DeviceManifestTest#GnssHalVersionCompatibility.
        -->
        <version>1.1</version>
        <version>2.0</version>
        <version>2.0-1</version>
        <interface>
            <name>IGnss</name>
            <instance>default</instance>
+4 −0
Original line number Diff line number Diff line
@@ -595,6 +595,10 @@ f18695dd36ee205640b8326a17453858a7b4596653aaa6ef0016b0aef1bd4dac android.hardwar
4d85e814f94949dae4dc6cb82bbd7d6bb24ffafda6ddb2eac928d2a4fc2e21ce android.hardware.cas@1.2::types
66931c2506fbb5af61f20138cb05e0a09e7bf67d6964c231d27c648933bb33ec android.hardware.drm@1.3::ICryptoFactory
994d08ab27d613022c258a9ec48cece7adf2a305e92df5d76ef923e2c6665f64 android.hardware.drm@1.3::IDrmFactory
1bd8028b974bf1d65cfa102196a2b008afc5d42fe73fed2cb94fa7533d07f581 android.hardware.gnss@2.1::IGnss
ba62e1e8993bfb9f27fa04816fa0f2241ae2d01edfa3d0c04182e2e5de80045c android.hardware.gnss@2.1::IGnssCallback
5a125c49ca83629e22afc8c39e865509343bfa2c38f0baea9a186bbac103492d android.hardware.gnss@2.1::IGnssMeasurement
0bfb291708dd4a7c6ec6b9883e2b8592357edde8d7e962ef83918e4a2154ce69 android.hardware.gnss@2.1::IGnssMeasurementCallback
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth
26f04510a0b57aba5167c5c0a7c2f077c2acbb98b81902a072517829fd9fd67f android.hardware.health@2.1::IHealthInfoCallback
db47f4ceceb1f06c656f39caa70c557b0f8471ef59fd58611bea667ffca20101 android.hardware.health@2.1::types
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ cc_binary {
        "libhidlbase",
        "libutils",
        "liblog",
        "android.hardware.gnss@2.1",
        "android.hardware.gnss@2.0",
        "android.hardware.gnss@1.1",
        "android.hardware.gnss@1.0",
    ],
+9 −9
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ Return<bool> Gnss::start() {
            auto svStatus = this->getMockSvStatus();
            this->reportSvStatus(svStatus);

            auto location = Utils::getMockLocation();
            auto location = Utils::getMockLocationV1_0();
            this->reportLocation(location);

            std::this_thread::sleep_for(std::chrono::milliseconds(mMinIntervalMs));
@@ -197,14 +197,14 @@ Return<bool> Gnss::injectBestLocation(const GnssLocation&) {
Return<GnssSvStatus> Gnss::getMockSvStatus() const {
    std::unique_lock<std::recursive_mutex> lock(mGnssConfiguration->getMutex());
    GnssSvInfo mockGnssSvInfoList[] = {
            Utils::getSvInfo(3, GnssConstellationType::GPS, 32.5, 59.1, 166.5),
            Utils::getSvInfo(5, GnssConstellationType::GPS, 27.0, 29.0, 56.5),
            Utils::getSvInfo(17, GnssConstellationType::GPS, 30.5, 71.0, 77.0),
            Utils::getSvInfo(26, GnssConstellationType::GPS, 24.1, 28.0, 253.0),
            Utils::getSvInfo(5, GnssConstellationType::GLONASS, 20.5, 11.5, 116.0),
            Utils::getSvInfo(17, GnssConstellationType::GLONASS, 21.5, 28.5, 186.0),
            Utils::getSvInfo(18, GnssConstellationType::GLONASS, 28.3, 38.8, 69.0),
            Utils::getSvInfo(10, GnssConstellationType::GLONASS, 25.0, 66.0, 247.0)};
            Utils::getMockSvInfoV1_0(3, GnssConstellationType::GPS, 32.5, 59.1, 166.5),
            Utils::getMockSvInfoV1_0(5, GnssConstellationType::GPS, 27.0, 29.0, 56.5),
            Utils::getMockSvInfoV1_0(17, GnssConstellationType::GPS, 30.5, 71.0, 77.0),
            Utils::getMockSvInfoV1_0(26, GnssConstellationType::GPS, 24.1, 28.0, 253.0),
            Utils::getMockSvInfoV1_0(5, GnssConstellationType::GLONASS, 20.5, 11.5, 116.0),
            Utils::getMockSvInfoV1_0(17, GnssConstellationType::GLONASS, 21.5, 28.5, 186.0),
            Utils::getMockSvInfoV1_0(18, GnssConstellationType::GLONASS, 28.3, 38.8, 69.0),
            Utils::getMockSvInfoV1_0(10, GnssConstellationType::GLONASS, 25.0, 66.0, 247.0)};

    GnssSvStatus svStatus = {.numSvs = sizeof(mockGnssSvInfoList) / sizeof(GnssSvInfo)};
    for (uint32_t i = 0; i < svStatus.numSvs; i++) {
+3 −2
Original line number Diff line number Diff line
@@ -35,9 +35,10 @@ cc_binary {
        "libhidlbase",
        "libutils",
        "liblog",
        "android.hardware.gnss@2.0",
        "android.hardware.gnss.measurement_corrections@1.0",
        "android.hardware.gnss.visibility_control@1.0",
        "android.hardware.gnss@2.1",
        "android.hardware.gnss@2.0",
        "android.hardware.gnss@1.0",
        "android.hardware.gnss@1.1",
    ],
Loading