Correct issue with BT ICS onCallRemoved not being called.
When chaining on to the disconnectedToneFuture, thenRunAsync was originally used. This means when the future is completed after the disconnect tone plays, the "update call" CompletionStage would be posted to the main thread handler to be completed later, which means it would happen after the unbind. Also, in updateCall, there was a bug which would cause subsequent update call requests after disconnect (in this case changes to the conferenceable calls) to still update the BT ICS; we now skip that. Finally, after we trigger the BT ICS update to inform is that the call is disconnected, we need to delay the unbind a couple seconds (just like we do for other ICS). If we do not, the onCallRemoved raised in the ICS does not get a chance to complete before the ICS is unbound. Flag: com.android.server.telecom.flags.separately_bind_to_bt_incall_service Fixes: 358249447 Test: Manually reproduce issue and verify that the ordering is now synchronous and the BT ICS gets informed of the call removal. Change-Id: Ifa02ead8b8288b318248de3bd0ef0074e9f95e5b
Loading
Please register or sign in to comment