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

Commit 318641ee authored by Amy Zhang's avatar Amy Zhang Committed by Android (Google) Code Review
Browse files

Merge "Assign cicamId to local mFrontendCicamId when ciCam resource is granted" into sc-dev

parents baf2fe34 c189c59d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -978,7 +978,8 @@ public class Tuner implements AutoCloseable {
    public int disconnectFrontendToCiCam(int ciCamId) {
        if (TunerVersionChecker.checkHigherOrEqualVersionTo(TunerVersionChecker.TUNER_VERSION_1_1,
                "unlinkFrontendToCiCam")) {
            if (mFrontendCiCamHandle != null && mFrontendCiCamId == ciCamId) {
            if (mFrontendCiCamHandle != null && mFrontendCiCamId != null
                    && mFrontendCiCamId == ciCamId) {
                int result = nativeUnlinkCiCam(ciCamId);
                if (result == RESULT_SUCCESS) {
                    mTunerResourceManager.releaseCiCam(mFrontendCiCamHandle, mClientId);
@@ -1409,6 +1410,7 @@ public class Tuner implements AutoCloseable {
        boolean granted = mTunerResourceManager.requestCiCam(request, ciCamHandle);
        if (granted) {
            mFrontendCiCamHandle = ciCamHandle[0];
            mFrontendCiCamId = ciCamId;
        }
        return granted;
    }