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

Commit 452f4c49 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SAP: Close RFCOMM connection immediately if access is denied."

parents 276ba1a7 c1d0d69c
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -369,8 +369,12 @@ public class SapService extends ProfileService {
                                + sRemoteDeviceName);

                    } else {
                        // Assuming reject is the stored state - continue to accept new connection.
                        continue;
                        // Close RFCOMM socket for current connection and start listening
                        // again for new connections.
                        Log.w(TAG, "Can't connect with " + sRemoteDeviceName +
                            " as access is rejected");
                        if (mSessionStatusHandler != null)
                            mSessionStatusHandler.sendEmptyMessage(MSG_SERVERSESSION_CLOSE);
                    }
                    stopped = true; // job done ,close this thread;
                } catch (IOException ex) {
@@ -711,7 +715,8 @@ public class SapService extends ProfileService {
                                BluetoothDevice.ACCESS_ALLOWED);
                        if (VERBOSE) {
                            Log.v(TAG, "setSimAccessPermission(ACCESS_ALLOWED) result=" + result);
                        }                    }
                        }
                    }
                    try {
                        if (mConnSocket != null) {
                            // start obex server and rfcomm connection