OSDN Git Service

Fix UI issue with Bluetooth Settings.
authorJaikumar Ganesh <jaikumar@google.com>
Thu, 27 Oct 2011 23:23:30 +0000 (16:23 -0700)
committerJaikumar Ganesh <jaikumar@google.com>
Thu, 27 Oct 2011 23:39:50 +0000 (16:39 -0700)
When a profile fails to connect, the preference was getting unset.

Patch generated in conversation with Jake Hamby.

Bug: 5526404
Change-Id: I27ab8d337b6d121f8d369841d3f9a691293ef922

src/com/android/settings/bluetooth/DeviceProfilesSettings.java

index a840982..67d2258 100755 (executable)
@@ -332,7 +332,7 @@ public final class DeviceProfilesSettings extends SettingsPreferenceFragment
          * Gray out checkbox while connecting and disconnecting
          */
         profilePref.setEnabled(!mCachedDevice.isBusy());
-        profilePref.setChecked(mCachedDevice.isConnectedProfile(profile));
+        profilePref.setChecked(profile.isPreferred(device));
         profilePref.setSummary(profile.getSummaryResourceForDevice(device));
     }