Assign cicamId to local mFrontendCicamId when ciCam resource is granted
Test: atest TunerTest#testFrontendToCiCam Bug: 158818696 Change-Id: I8e6a17115df06b473bf7e24d6819ff5855771a5d
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user