From c78d71e16c4413180f79182c8e246d70928c2442 Mon Sep 17 00:00:00 2001 From: Kausik Sinnaswamy Date: Tue, 22 May 2012 03:45:55 -0700 Subject: [PATCH] Revert "Changes done to update UI with appropriate checkbox state, when AVRC Connect is initiated from the headset. Earlier, the checkbox state was not being updated when the connection state changed for media audio, when connected from headset" This reverts commit 2f9d962940cb92c7f70576a29f263258f6abc478 --- src/com/android/settings/bluetooth/A2dpProfile.java | 8 ++------ .../settings/bluetooth/DeviceProfilesSettings.java | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/com/android/settings/bluetooth/A2dpProfile.java b/src/com/android/settings/bluetooth/A2dpProfile.java index 1a7a2d9edf4..e7fd6c03e12 100755 --- a/src/com/android/settings/bluetooth/A2dpProfile.java +++ b/src/com/android/settings/bluetooth/A2dpProfile.java @@ -178,15 +178,11 @@ final class A2dpProfile implements LocalBluetoothProfile { int state = getConnectionStatus(device); switch (state) { case BluetoothProfile.STATE_DISCONNECTED: - { - setPreferred(device, false); return R.string.bluetooth_a2dp_profile_summary_use_for; - } + case BluetoothProfile.STATE_CONNECTED: - { - setPreferred(device, true); return R.string.bluetooth_a2dp_profile_summary_connected; - } + default: return Utils.getConnectionStateSummary(state); } diff --git a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java index c4853cf2304..67d2258573b 100755 --- a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java +++ b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java @@ -332,8 +332,8 @@ public final class DeviceProfilesSettings extends SettingsPreferenceFragment * Gray out checkbox while connecting and disconnecting */ profilePref.setEnabled(!mCachedDevice.isBusy()); - profilePref.setSummary(profile.getSummaryResourceForDevice(device)); profilePref.setChecked(profile.isPreferred(device)); + profilePref.setSummary(profile.getSummaryResourceForDevice(device)); } private LocalBluetoothProfile getProfileOf(Preference pref) {