Fix NoSuchElementException is threw when unlinkToDeath is called
Parameter flags in Binder::linkToDeath must be matched as a pair with the recipient in unlinkToDeath to be removed from mObituaries and deleted. Since each service's cookie list meaningfully starts from 1, setting the flag to 0 in unlinkToDeath is equivalent to not to find an existing recipient in mObituaries. Therefore, for truly unlinking, use the flag set in the linkToDeath again to unlink it and remove it from the binder. Bug: 340156301 Test: Basic telephony funcationlity tests Test: atest FrameworksTelephonyTests Change-Id: Ib1172bc8cdbfc8d6f42474c8e2adffe3f92af3b3
Loading
Please register or sign in to comment