Floss: handle unbonding device doesn't report disconnection to CRAS
In aosp/2685489 we tried to be aggressive to disconnect audio profile connection attempt from an unbonded device. However, the function confuses this state with user forgetting the device via BT menu, since both involves unbonded device and empty task queue. In case of the latter, we would still try to invoke DisconnectDevice, but at the risk of not informing CRAS, depending on the order of profile disconnection. This CL also checks for the media state when determining the two cases above. To be precise, when the state is FullyConnected, it could only mean the latter case. On the other hand, if the state is Disconnecting, it could mean both cases, but when it's the latter case, we can be sure that CRAS has been informed of the disconnection. Bug: 358525472 Test: m -j Test: Using the latest pixel buds, do this multiple times. (1) Pair using fast pair (2) Verify the device doesn't immediately disconnect (3) Forget the device (skipping decive disconnection) (4) Sign out and sign in again Flag: EXEMPT, floss only changes Change-Id: I80ebb475743e9f902b5a8ecd2bd8021d7793584d
Loading
Please register or sign in to comment