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

Commit c847a3cf authored by Chris Weir's avatar Chris Weir
Browse files

Add warning about AIDL CAN HAL

Have the HIDL versions of libcanhaltools and canhalconfigurator provide
a warning message directing the viewer to use the AIDL version.

Bug: 170405615
Test: Build seahawk with AIDL CAN HAL and HIDL canhalconfigurator,
observe warning message.

Change-Id: I83a3dcedbdc5eafd3804e60950d0d8788cd6eddb
parent 25014749
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ static bool processPbCfg(const config::CanBusConfig& pb_cfg) {
static bool configuratorStart(const std::string& filepath) {
    base::SetDefaultTag("CanConfigurator");

    LOG(WARNING) << "The HIDL version of CAN HAL has been deprecated, if this tool fails with "
                 << "SIGABRT, you may need canhalconfigurator-aidl instead.";

    auto pb_cfg = config::parseConfigFile(filepath);
    if (!pb_cfg.has_value()) {
        return false;
+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@ hidl_vec<hidl_string> getControlServices() {
    auto manager = hidl::manager::V1_2::IServiceManager::getService();
    hidl_vec<hidl_string> services;
    manager->listManifestByInterface(ICanController::descriptor, hidl_utils::fill(&services));
    CHECK(services.size() > 0) << "No ICanController services registered (missing privileges?)"
                               << std::endl;
    CHECK(services.size() > 0) << "No ICanController services registered (missing privileges?). "
                               << "are you using the AIDL CanController?" << std::endl;
    return services;
}