Bluetooth: Fix bt restart during receive onConnect.
Use case:
1) Receive PBAP connect request from remote.
2) Restart Bluetooth
3) Perform above steps multiple times.
Expectation:
BT should be switched off and on without issues.
Observed Result:
BT Off failed in some iteration due to NPE in Obex Server.
Root cause:
In some rare cases accept thread ending because of profile restart
or BT restart, and reception of new onConnect leading to force close in BT.
Fix:
Add extra check with instance of Obex connection handler
before initiate onConnect to prevent force close.
CRs-Fixed: 2283123
Change-Id: I09c4519e34739640ab0a965f367f31a932cb3efb
1 file changed