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

Commit 85e2b2ea authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "gnss HAL uses "default" service name"

parents 4c13f2da ab5c1e19
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -676,7 +676,7 @@ Return<sp<IGnssBatching>> Gnss::getExtensionGnssBatching() {
    return mGnssBatching;
}

IGnss* HIDL_FETCH_IGnss(const char* hal) {
IGnss* HIDL_FETCH_IGnss(const char* /* hal */) {
    hw_module_t* module;
    IGnss* iface = nullptr;
    int err = hw_get_module(GPS_HARDWARE_MODULE_ID, (hw_module_t const**)&module);
@@ -687,10 +687,10 @@ IGnss* HIDL_FETCH_IGnss(const char* hal) {
        if (err == 0) {
            iface = new Gnss(reinterpret_cast<gps_device_t*>(device));
        } else {
            ALOGE("gnssDevice open %s failed: %d", hal, err);
            ALOGE("gnssDevice open %s failed: %d", GPS_HARDWARE_MODULE_ID, err);
        }
    } else {
      ALOGE("gnss hw_get_module %s failed: %d", hal, err);
      ALOGE("gnss hw_get_module %s failed: %d", GPS_HARDWARE_MODULE_ID, err);
    }
    return iface;
}
+1 −1
Original line number Diff line number Diff line
@@ -8,5 +8,5 @@ using android::hardware::gnss::V1_0::IGnss;
using android::hardware::defaultPassthroughServiceImplementation;

int main() {
    return defaultPassthroughServiceImplementation<IGnss>("gnss");
    return defaultPassthroughServiceImplementation<IGnss>();
}
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ class GnssHalTest : public ::testing::Test {
     * callbacks trigger.
     */

    gnss_hal_ = IGnss::getService("gnss");
    gnss_hal_ = IGnss::getService();
    ASSERT_NE(gnss_hal_, nullptr);

    gnss_cb_ = new GnssCallback(*this);