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

Commit b84158f0 authored by Devin Moore's avatar Devin Moore
Browse files

Don't throw an error when token is 0

The HIDL implementation uses the 0 as an "OK" value in the Result type,
so we shouldn't be throwing an exception in this case for AIDL.

Test: na
Bug: 268129769
Change-Id: I2c8d37f289a7006cdd8d7be5ac87911e691517dd
parent 8afd97ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ ndk::ScopedAStatus DirectReportChannel::configure(
        int32_t sensorHandle, ::aidl::android::hardware::sensors::ISensors::RateLevel rate,
        int32_t* _aidl_return) {
    int token = mManager.configureDirectChannel(mId, sensorHandle, static_cast<int>(rate));
    if (token <= 0) {
    if (token < 0) {
        return ndk::ScopedAStatus::fromServiceSpecificError(token);
    }
    *_aidl_return = token;