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

Commit ae8a4622 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix validation logic in TvInputAidlTest" into main am: d882c6a0

parents 38f1b4d5 d882c6a0
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;
}