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

Commit d882c6a0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix validation logic in TvInputAidlTest" into main

parents 7801c0bc 3b85a4e5
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -137,15 +137,17 @@ int32_t TvInputAidlTest::getNumNotIn(vector<int32_t>& nums) {
}

bool TvInputAidlTest::isValidHandle(NativeHandle& handle) {
    if (handle.fds.empty()) {
    if (handle.fds.empty() && handle.ints.empty()) {
        return false;
    }
    if (!(handle.fds.empty())) {
        for (size_t i = 0; i < handle.fds.size(); i++) {
            int fd = handle.fds[i].get();
            if (fcntl(fd, F_GETFL) < 0) {
                return false;
            }
        }
    }
    return true;
}