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

Commit 99e2f8c9 authored by Sal Savage's avatar Sal Savage Committed by Myles Watson
Browse files

BluetoothProfileConnector: Invoke service disconnections with the correct profile ID

Bug: b/133517229
Test: Build + Manual on automotive hardware
Change-Id: Id8dbeaf844a65020f610505f81eea20b96ec002a
Merged-In: Id8dbeaf844a65020f610505f81eea20b96ec002a
parent 8b55c83b
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -32,12 +32,12 @@ import android.util.Log;
 * @hide
 */
public abstract class BluetoothProfileConnector<T> {
    private int mProfileId;
    private final int mProfileId;
    private BluetoothProfile.ServiceListener mServiceListener;
    private BluetoothProfile mProfileProxy;
    private final BluetoothProfile mProfileProxy;
    private Context mContext;
    private String mProfileName;
    private String mServiceName;
    private final String mProfileName;
    private final String mServiceName;
    private volatile T mService;

    private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
@@ -65,7 +65,7 @@ public abstract class BluetoothProfileConnector<T> {
            logDebug("Proxy object disconnected");
            doUnbind();
            if (mServiceListener != null) {
                mServiceListener.onServiceDisconnected(BluetoothProfile.A2DP);
                mServiceListener.onServiceDisconnected(mProfileId);
            }
        }
    };