Merge "Tapping a connected Bluetooth device now presents its settings dialog." into lmp-dev
diff --git a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
index eca0cca..4b16ff4 100644
--- a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
+++ b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
@@ -56,6 +56,8 @@
private AlertDialog mDisconnectDialog;
+ private View mView;
+
public BluetoothDevicePreference(Context context, CachedBluetoothDevice cachedDevice) {
super(context);
@@ -140,6 +142,7 @@
}
}
+ mView = view;
super.onBindView(view);
}
@@ -179,7 +182,10 @@
int bondState = mCachedDevice.getBondState();
if (mCachedDevice.isConnected()) {
- askDisconnect();
+ if (mOnSettingsClickListener != null) {
+ mView.setTag(mCachedDevice);
+ mOnSettingsClickListener.onClick(mView);
+ }
} else if (bondState == BluetoothDevice.BOND_BONDED) {
mCachedDevice.connect(true);
} else if (bondState == BluetoothDevice.BOND_NONE) {