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

Commit 961d1e46 authored by Henry Fang's avatar Henry Fang
Browse files

unlink IResourcesReclaimListener when remove client

Change-Id: I5ff86d6a9a8c02f669ac689eb00ab65da61b0d59
bug: 277876277
Test: manaul
parent 728b80a3
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2237,7 +2237,14 @@ public class TunerResourceManagerService extends SystemService implements IBinde
        }
        clearAllResourcesAndClientMapping(getClientProfile(clientId));
        mClientProfiles.remove(clientId);
        mListeners.remove(clientId);

        // it may be called by unregisterClientProfileInternal under test
        synchronized (mLock) {
            ResourcesReclaimListenerRecord record = mListeners.remove(clientId);
            if (record != null) {
                record.getListener().asBinder().unlinkToDeath(record, 0);
            }            
        }
    }

    private void clearFrontendAndClientMapping(ClientProfile profile) {