summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth
diff options
context:
space:
mode:
authorMichael Chan <mchan@android.com>2010-01-12 11:39:15 -0800
committerMichael Chan <mchan@android.com>2010-01-12 12:54:51 -0800
commitc5aa68f3f2201227e85e52ee33937e70e7741c3c (patch)
tree58bf1d309091dc1457574282e888a48d52848e26 /src/com/android/settings/bluetooth
parentd9d8ef264d3a66e7be84908cf0f9d78713c42722 (diff)
downloadpackages_apps_settings-c5aa68f3f2201227e85e52ee33937e70e7741c3c.zip
packages_apps_settings-c5aa68f3f2201227e85e52ee33937e70e7741c3c.tar.gz
packages_apps_settings-c5aa68f3f2201227e85e52ee33937e70e7741c3c.tar.bz2
b/2367020 Enable bt profiles by default for car dock.
Change-Id: I95b1330ab432d38fb509321d843d04a41185d331
Diffstat (limited to 'src/com/android/settings/bluetooth')
-rw-r--r--src/com/android/settings/bluetooth/DockService.java28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/com/android/settings/bluetooth/DockService.java b/src/com/android/settings/bluetooth/DockService.java
index 46e3d08..4545b4e 100644
--- a/src/com/android/settings/bluetooth/DockService.java
+++ b/src/com/android/settings/bluetooth/DockService.java
@@ -374,26 +374,32 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
mCheckedItems = new boolean[numOfProfiles];
CharSequence[] items = new CharSequence[numOfProfiles];
- int i = 0;
switch (state) {
case Intent.EXTRA_DOCK_STATE_CAR:
- items[i] = service.getString(R.string.bluetooth_dock_settings_headset);
- mProfiles[i] = Profile.HEADSET;
+ items[0] = service.getString(R.string.bluetooth_dock_settings_headset);
+ items[1] = service.getString(R.string.bluetooth_dock_settings_a2dp);
+ mProfiles[0] = Profile.HEADSET;
+ mProfiles[1] = Profile.A2DP;
if (firstTime) {
- mCheckedItems[i] = false;
+ // Enable by default for car dock
+ mCheckedItems[0] = true;
+ mCheckedItems[1] = true;
} else {
- mCheckedItems[i] = LocalBluetoothProfileManager.getProfileManager(mBtManager,
+ mCheckedItems[0] = LocalBluetoothProfileManager.getProfileManager(mBtManager,
Profile.HEADSET).isPreferred(device);
+ mCheckedItems[1] = LocalBluetoothProfileManager.getProfileManager(mBtManager,
+ Profile.A2DP).isPreferred(device);
}
- ++i;
- // fall through
+ break;
+
case Intent.EXTRA_DOCK_STATE_DESK:
- items[i] = service.getString(R.string.bluetooth_dock_settings_a2dp);
- mProfiles[i] = Profile.A2DP;
+ items[0] = service.getString(R.string.bluetooth_dock_settings_a2dp);
+ mProfiles[0] = Profile.A2DP;
if (firstTime) {
- mCheckedItems[i] = false;
+ // Disable by default for desk dock
+ mCheckedItems[0] = false;
} else {
- mCheckedItems[i] = LocalBluetoothProfileManager.getProfileManager(mBtManager,
+ mCheckedItems[0] = LocalBluetoothProfileManager.getProfileManager(mBtManager,
Profile.A2DP).isPreferred(device);
}
break;