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

Commit c189c59d authored by Amy Zhang's avatar Amy Zhang
Browse files

Assign cicamId to local mFrontendCicamId when ciCam resource is granted

Test: atest TunerTest#testFrontendToCiCam
Bug: 158818696
Change-Id: I8e6a17115df06b473bf7e24d6819ff5855771a5d
parent a7e5dab6
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;
    }