Loading framework/java/android/bluetooth/BluetoothAdapter.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2952,6 +2952,7 @@ public final class BluetoothAdapter { public @NonNull List<Integer> getSupportedProfiles() { public @NonNull List<Integer> getSupportedProfiles() { final ArrayList<Integer> supportedProfiles = new ArrayList<Integer>(); final ArrayList<Integer> supportedProfiles = new ArrayList<Integer>(); mServiceLock.readLock().lock(); try { try { synchronized (mManagerCallback) { synchronized (mManagerCallback) { if (mService != null) { if (mService != null) { Loading @@ -2974,6 +2975,8 @@ public final class BluetoothAdapter { } } } catch (RemoteException | TimeoutException e) { } catch (RemoteException | TimeoutException e) { Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } finally { mServiceLock.readLock().unlock(); } } return supportedProfiles; return supportedProfiles; } } Loading Loading
framework/java/android/bluetooth/BluetoothAdapter.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2952,6 +2952,7 @@ public final class BluetoothAdapter { public @NonNull List<Integer> getSupportedProfiles() { public @NonNull List<Integer> getSupportedProfiles() { final ArrayList<Integer> supportedProfiles = new ArrayList<Integer>(); final ArrayList<Integer> supportedProfiles = new ArrayList<Integer>(); mServiceLock.readLock().lock(); try { try { synchronized (mManagerCallback) { synchronized (mManagerCallback) { if (mService != null) { if (mService != null) { Loading @@ -2974,6 +2975,8 @@ public final class BluetoothAdapter { } } } catch (RemoteException | TimeoutException e) { } catch (RemoteException | TimeoutException e) { Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } finally { mServiceLock.readLock().unlock(); } } return supportedProfiles; return supportedProfiles; } } Loading