SAP : Prevent crash during turn on Airplane mode
Use Case: 1. Initiate SAP connection from Remote Device. 2. Turn on Airplane mode to disable BT when SAP Client is connected on DUT. 3. Repeat steps 1 and 2. Error log : Line 16: 03-13 13:57:31.559 3368 3569 V SapServer: in sendDisconnectInd() Line 17: 03-13 13:57:31.559 3368 3569 D SapServer: Cleaning up before force disconnecting rfcomm Line 19: 03-13 13:57:31.559 3368 3569 D SapServer: Waiting for deinit to complete Line 20: 03-13 13:57:31.563 3368 3386 W BluetoothAdapterService: setProfileServiceState() - Stopping service com.android.bluetooth.sap.SapService Line 33: 03-13 13:57:31.936 3368 3368 W BluetoothAdapterService: onProfileServiceStateChange() - Profile still running: com.android.bluetooth.sap.SapService Line 34: 03-13 13:57:31.937 3368 3368 W BluetoothAdapterService: onProfileServiceStateChange() serviceName=com.android.bluetooth.sap.SapService, state=10, doUpdate=true Line 42: 03-13 13:57:32.310 3368 3569 E AndroidRuntime: java.lang.IllegalArgumentException: Receiver not registered: com.android.bluetooth.sap.SapServer$1@dbf974b Line 46: 03-13 13:57:32.310 3368 3569 E AndroidRuntime: at com.android.bluetooth.sap. SapServer.run(SapServer.java:463) Line 46: 03-13 13:57:32.310 3368 3569 E AndroidRuntime: at com.android.bluetooth.sap. SapServer.run(SapServer.java:463) Line 46: 03-13 13:57:32.310 3368 3569 E AndroidRuntime: at com.android.bluetooth.sap. SapServer.run(SapServer.java:463) Failure: "Unfortunately, Bluetooth share has stopped" error comes. Root cause : RIL Deinit is not completed because of un-expected turn of BT. Fix: Decrement the count of the latch, to release all waiting threads when BT is turned off during active sap connection. Test: Checked manually if no crash in BT as per above usecase. Bug: 62411305 Change-Id: Ib36430c56935efa9de5ce7f8b18eddc9cea47662
Loading
Please register or sign in to comment