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

Commit e005b50e authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by android-build-merger
Browse files

Merge "Check PBAP Server before disconnecting" am: 87d1cdd4

am: 7128032d

Change-Id: I4cebaf6741c2f1a6ee567ee8fc0afa5ae5ddc43e
parents c36e36b8 7128032d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.settingslib.bluetooth;

import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHearingAid;
@@ -28,7 +29,7 @@ import android.os.ParcelUuid;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import android.bluetooth.BluetoothAdapter;

import androidx.annotation.VisibleForTesting;

import com.android.settingslib.R;
@@ -201,7 +202,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
        // This is to ensure all the profiles are disconnected as some CK/Hs do not
        // disconnect  PBAP connection when HF connection is brought down
        PbapServerProfile PbapProfile = mProfileManager.getPbapProfile();
        if (PbapProfile.getConnectionStatus(mDevice) == BluetoothProfile.STATE_CONNECTED)
        if (PbapProfile != null && isConnectedProfile(PbapProfile))
        {
            PbapProfile.disconnect(mDevice);
        }