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

Commit 4501ae23 authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

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

am: 05fc8afc

Change-Id: I79b7c4d2132693750ad7522eacd059e1d1dd0a15
parents 89e88053 05fc8afc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -32,8 +32,9 @@ DirectReportChannel::~DirectReportChannel() {

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