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

Commit bc76b268 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "unlink IResourcesReclaimListener when remove client" into udc-dev

parents 836d8eda 961d1e46
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) {