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

Commit 91622504 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "Add missing lock on getSupportedProfile"

parents 6089760e 6e179238
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3095,6 +3095,7 @@ public final class BluetoothAdapter {
    public @NonNull List<Integer> getSupportedProfiles() {
        final ArrayList<Integer> supportedProfiles = new ArrayList<Integer>();

        mServiceLock.readLock().lock();
        try {
            synchronized (mManagerCallback) {
                if (mService != null) {
@@ -3117,6 +3118,8 @@ public final class BluetoothAdapter {
            }
        } catch (RemoteException | TimeoutException e) {
            Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
        } finally {
            mServiceLock.readLock().unlock();
        }
        return supportedProfiles;
    }