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

Commit 05fc8afc authored by Yifan Hong's avatar Yifan Hong
Browse files

android.frameworks.sensorservice@1.0: fix configureDirectChannel return positive integer.

SensorManager::configureDirectChannel can return a positive integer
as the token to indicate success. android.frameworks.sensorservice@1.0
doesn't care about the token.

Test: VtsHalSensorManagerV1_0TargetTest
Change-Id: I6bcbbe5dc747a0d93d2a0fd37f0b7187cb681101
parent 95c7a063
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -32,8 +32,9 @@ DirectReportChannel::~DirectReportChannel() {


// Methods from ::android::frameworks::sensorservice::V1_0::IDirectReportChannel follow.
// Methods from ::android::frameworks::sensorservice::V1_0::IDirectReportChannel follow.
Return<Result> DirectReportChannel::configure(int32_t sensorHandle, RateLevel rate) {
Return<Result> DirectReportChannel::configure(int32_t sensorHandle, RateLevel rate) {
    return convertResult(mManager.configureDirectChannel(mId,
    int token = mManager.configureDirectChannel(mId,
            static_cast<int>(sensorHandle), static_cast<int>(rate)));
            static_cast<int>(sensorHandle), static_cast<int>(rate));
    return token <= 0 ? convertResult(token) : Result::OK;
}
}