summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth
diff options
context:
space:
mode:
authorSreenidhi T <nidhit@broadcom.com>2012-05-16 04:25:31 -0700
committerMatthew Xie <mattx@google.com>2012-07-16 15:38:38 -0700
commitc7b490c7a03dff00faf859d6aba3440b6a3921d5 (patch)
treee77767b00043a3c9abbf880333554cc1264bb0a9 /src/com/android/settings/bluetooth
parent737a30f593300a9731adfe899144af64b1d71057 (diff)
downloadpackages_apps_settings-c7b490c7a03dff00faf859d6aba3440b6a3921d5.zip
packages_apps_settings-c7b490c7a03dff00faf859d6aba3440b6a3921d5.tar.gz
packages_apps_settings-c7b490c7a03dff00faf859d6aba3440b6a3921d5.tar.bz2
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 Change-Id: Ic46a8a87b74cbe76f0e8b62428516af5594526ec
Diffstat (limited to 'src/com/android/settings/bluetooth')
-rwxr-xr-xsrc/com/android/settings/bluetooth/A2dpProfile.java8
-rwxr-xr-xsrc/com/android/settings/bluetooth/DeviceProfilesSettings.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/settings/bluetooth/A2dpProfile.java b/src/com/android/settings/bluetooth/A2dpProfile.java
index fbb71ec..fdf3325 100755
--- a/src/com/android/settings/bluetooth/A2dpProfile.java
+++ b/src/com/android/settings/bluetooth/A2dpProfile.java
@@ -167,11 +167,15 @@ final class A2dpProfile implements LocalBluetoothProfile {
int state = mService.getConnectionState(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 67d2258..c4853cf 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.setChecked(profile.isPreferred(device));
profilePref.setSummary(profile.getSummaryResourceForDevice(device));
+ profilePref.setChecked(profile.isPreferred(device));
}
private LocalBluetoothProfile getProfileOf(Preference pref) {