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

Commit 09dc1b3f authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Inclusive language for CAN bus HAL

Bug: 162745675
Test: it builds
Change-Id: I0f9461cd866ccb51743549d978c9f7367499399e
parent b428f77f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ static bool match(const hidl_vec<CanMessageFilter>& filter, CanMessageId id, boo
                               satisfiesFilterFlag(rule.extendedFormat, isExtendedId);

        if (rule.exclude) {
            // Any excluded (blacklist) rule not being satisfied invalidates the whole filter set.
            // Any exclude rule being satisfied invalidates the whole filter set.
            if (satisfied) return false;
        } else {
            anyNonExcludeRulePresent = true;
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ struct Bus {
        EXPECT_EQ(ICanController::Result::OK, result);

        /* Not using ICanBus::getService here, since it ignores interfaces not in the manifest
         * file -- this is a test, so we don't want to add dummy services to a device manifest. */
         * file -- this is a test, so we don't want to add fake services to a device manifest. */
        auto manager = hidl::manager::V1_2::IServiceManager::getService();
        auto service = manager->get(ICanBus::descriptor, config.name);
        mBus = ICanBus::castFrom(service);
+2 −2
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ bool CanControllerHalTest::up(InterfaceType iftype, std::string srvname, std::st

void CanControllerHalTest::assertRegistered(std::string srvname, bool expectRegistered) {
    /* Not using ICanBus::tryGetService here, since it ignores interfaces not in the manifest
     * file -- this is a test, so we don't want to add dummy services to a device manifest. */
     * file -- this is a test, so we don't want to add fake services to a device manifest. */
    auto manager = hidl::manager::V1_2::IServiceManager::getService();
    auto busService = manager->get(ICanBus::descriptor, srvname);
    ASSERT_EQ(expectRegistered, busService.withDefault(nullptr) != nullptr)
@@ -145,7 +145,7 @@ TEST_P(CanControllerHalTest, BringUpDown) {
    assertRegistered(name, false);
}

TEST_P(CanControllerHalTest, DownDummy) {
TEST_P(CanControllerHalTest, DownFake) {
    const auto result = mCanController->downInterface("imnotup");
    ASSERT_FALSE(result);
}