Allow LNB to be opened before Frontend

Change-Id: If7e82db95dda80a90767d7808b140ebcb175ab97
bug: 233830709
Test: atest TunerTest.java
This commit is contained in:
Henry Fang
2022-05-27 17:45:32 +00:00
parent d7df1b2804
commit e6983c1f66

View File

@@ -2163,7 +2163,9 @@ public class Tuner implements AutoCloseable {
if (checkResource(TunerResourceManager.TUNER_RESOURCE_TYPE_LNB, mLnbLock)
&& mLnb != null) {
mLnb.setCallbackAndOwner(this, executor, cb);
setLnb(mLnb);
if (mFrontendHandle != null && mFrontend != null) {
setLnb(mLnb);
}
return mLnb;
}
return null;
@@ -2197,7 +2199,9 @@ public class Tuner implements AutoCloseable {
}
mLnb = newLnb;
mLnb.setCallbackAndOwner(this, executor, cb);
setLnb(mLnb);
if (mFrontendHandle != null && mFrontend != null) {
setLnb(mLnb);
}
}
return mLnb;
} finally {