Fixed multiple Bluetooth Settings crashes.

+ Fixed a crash when selecting On/Off multiple times on an input device.
+ Fixed a crash when visiting different Bluetooth Settings after
disabling an input device.

Bug: 17402421
Change-Id: I23efa3a36ba8cf0df02cf41397586a10dae9e08c
This commit is contained in:
PauloftheWest
2014-09-10 06:45:00 -07:00
parent 1fb5198732
commit 8d6991348b
2 changed files with 21 additions and 8 deletions

View File

@@ -232,7 +232,7 @@ public final class DeviceProfilesSettings extends SettingsPreferenceFragment
status == BluetoothProfile.STATE_CONNECTED;
if (isConnected) {
askDisconnect(getActivity(), profile);
askDisconnect(mManager.getForegroundActivity(), profile);
} else {
if (profile.isPreferred(device)) {
// profile is preferred but not connected: disable auto-connect