am 79ad7235
: am 1c649f7f
: am 7560e22d
: Merge "Tapping a connected Bluetooth device now presents its settings dialog." into lmp-dev
* commit '79ad7235257bf6e6f04cc4f8f594176c938dc3a0': Tapping a connected Bluetooth device now presents its settings dialog.
This commit is contained in:
@@ -56,6 +56,8 @@ public final class BluetoothDevicePreference extends Preference implements
|
||||
|
||||
private AlertDialog mDisconnectDialog;
|
||||
|
||||
private View mView;
|
||||
|
||||
public BluetoothDevicePreference(Context context, CachedBluetoothDevice cachedDevice) {
|
||||
super(context);
|
||||
|
||||
@@ -140,6 +142,7 @@ public final class BluetoothDevicePreference extends Preference implements
|
||||
}
|
||||
}
|
||||
|
||||
mView = view;
|
||||
super.onBindView(view);
|
||||
}
|
||||
|
||||
@@ -179,7 +182,10 @@ public final class BluetoothDevicePreference extends Preference implements
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user