Merge "Update BluetoothProfileConnector to invoke service disconnections with correct profile ID" am: d8b457545a

am: 8b3ceb7640

Change-Id: Ia12feb3f9d86c71634bda442e07eccd092972f0e
This commit is contained in:
Sal Savage
2019-05-28 18:40:12 -07:00
committed by android-build-merger

View File

@@ -32,12 +32,12 @@ import android.util.Log;
* @hide * @hide
*/ */
public abstract class BluetoothProfileConnector<T> { public abstract class BluetoothProfileConnector<T> {
private int mProfileId; private final int mProfileId;
private BluetoothProfile.ServiceListener mServiceListener; private BluetoothProfile.ServiceListener mServiceListener;
private BluetoothProfile mProfileProxy; private final BluetoothProfile mProfileProxy;
private Context mContext; private Context mContext;
private String mProfileName; private final String mProfileName;
private String mServiceName; private final String mServiceName;
private volatile T mService; private volatile T mService;
private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback = private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
@@ -65,7 +65,7 @@ public abstract class BluetoothProfileConnector<T> {
logDebug("Proxy object disconnected"); logDebug("Proxy object disconnected");
doUnbind(); doUnbind();
if (mServiceListener != null) { if (mServiceListener != null) {
mServiceListener.onServiceDisconnected(BluetoothProfile.A2DP); mServiceListener.onServiceDisconnected(mProfileId);
} }
} }
}; };