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

Commit abd5758e authored by Henry Fang's avatar Henry Fang Committed by Gerrit Code Review
Browse files

Merge "Tuner: Clean up frontend sharee resource before sharing another resource" into main

parents 24c9102d 9296d15b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -443,6 +443,12 @@ public class Tuner implements AutoCloseable {
        acquireTRMSLock("shareFrontendFromTuner()");
        mFrontendLock.lock();
        try {
            if (mFeOwnerTuner != null) {
                // unregister self from the Frontend callback
                mFeOwnerTuner.unregisterFrontendCallbackListener(this);
                mFeOwnerTuner = null;
                nativeUnshareFrontend();
            }
            mTunerResourceManager.shareFrontend(mClientId, tuner.mClientId);
            mFeOwnerTuner = tuner;
            mFeOwnerTuner.registerFrontendCallbackListener(this);