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

Commit debe485e authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge "Add missing lock on getSupportedProfile" am: 91622504

parents 8d21e77b 91622504
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;
    }