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

Commit 8ec31c77 authored by Myles Watson's avatar Myles Watson
Browse files

SAP: Catch SecurityException creating Socket

Follow the example of OBEX to not crash when switching users.

Bug: 234340159
Test: switch users rapidly
Change-Id: I3e67f14cc9a95097941c51705ed54957b0f1448f
parent a009a668
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -173,6 +173,9 @@ public class SapService extends ProfileService {
            } catch (IOException e) {
                Log.e(TAG, "Error create RfcommServerSocket ", e);
                initSocketOK = false;
            } catch (SecurityException e) {
                Log.e(TAG, "Error creating RfcommServerSocket ", e);
                initSocketOK = false;
            }

            if (!initSocketOK) {