Revoke the location permission properly after the emergency calls
There is a 2 second delay to unbind the in-call services after all the calls are removed. If customize the delay to a longer value(eg:5s), and make more than one emergency calls within the delay, then the location permission won't be revoked. When the delay of the first emergency call expires, it doesn't revoke the permission because permission flag mHadFineLocation was wrongly updated to true. When the delay of the second emergency call expires, it also doesn't revoke the permission because permission flag mLocationPermissionGrantedToUser was wrongly updated to null. The change is to update the permission flags properly, and only keep the latest delay timer to revoke the permission after all the calls end. Bug: 345386002 Test: manual Test: atest InCallControllerTests Test: atest EmergencyCallHelperTest Change-Id: I1a451ea9a752f83f27ff1e65d05fc0fb52f75b84
Loading
Please register or sign in to comment