diff options
author | Sal Savage <salsavage@google.com> | 2019-05-24 14:35:13 -0700 |
---|---|---|
committer | Sal Savage <salsavage@google.com> | 2019-05-28 16:56:23 +0000 |
commit | eef5c81a33a1fdf7a133329852d03e32d35d9b75 (patch) | |
tree | 40deb55409eabee050a91b975948f97b8f64f00c /framework/java/android/bluetooth/BluetoothProfileConnector.java | |
parent | 1fd7ddfb8581f383c9bb45e510bedd2b5e397113 (diff) |
Update BluetoothProfileConnector to invoke service disconnections with correct profile ID
Bug: b/133517229
Test: Build + Manual on automotive hardware
Change-Id: Id8dbeaf844a65020f610505f81eea20b96ec002a
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothProfileConnector.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothProfileConnector.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/java/android/bluetooth/BluetoothProfileConnector.java b/framework/java/android/bluetooth/BluetoothProfileConnector.java index d9987249a6..863fd3698c 100644 --- a/framework/java/android/bluetooth/BluetoothProfileConnector.java +++ b/framework/java/android/bluetooth/BluetoothProfileConnector.java @@ -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); } } }; |