Merge "Allow LNB to be opened before Frontend" into tm-dev

This commit is contained in:
Henry Fang
2022-05-28 18:43:29 +00:00
committed by Android (Google) Code Review

View File

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