Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47bb76e9 authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "SAP: Fix issue of socket listener not getting re-started"

am: 8731128a

* commit '8731128a':
  SAP: Fix issue of socket listener not getting re-started
parents 497613a1 8731128a
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -745,13 +745,15 @@ public class SapService extends ProfileService {

                if (DEBUG) Log.d(TAG,"ACL disconnected for " + device);

                if (mRemoteDevice.equals(device) && mRemoveTimeoutMsg) {
                if (mRemoteDevice.equals(device)) {
                    if (mRemoveTimeoutMsg) {
                        // Send any pending timeout now, as ACL got disconnected.
                        cancelUserTimeoutAlarm();
                        mSessionStatusHandler.removeMessages(USER_TIMEOUT);
                        sendCancelUserConfirmationIntent(mRemoteDevice);
                    }
                    mIsWaitingAuthorization = false;
                    mRemoveTimeoutMsg = false;
                    setState(BluetoothSap.STATE_DISCONNECTED);
                    // Ensure proper cleanup, and prepare for new connect.
                    mSessionStatusHandler.sendEmptyMessage(MSG_SERVERSESSION_CLOSE);
                }