Skip to content
Snippets Groups Projects
Commit 4e73b33c authored by Myles Watson's avatar Myles Watson Committed by Cherrypicker Worker
Browse files

SAP: Catch SecurityException creating Socket

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

Bug: 234340159
Test: switch users rapidly
(cherry picked from https://android-review.googlesource.com/q/commit:8ec31c7732b93f40b89a8977d692c1b8eec21e8e)
Merged-In: I3e67f14cc9a95097941c51705ed54957b0f1448f
Change-Id: I3e67f14cc9a95097941c51705ed54957b0f1448f
parent 9c4880ac
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment