Implement individual Bluetooth profile connect/disconnect.

Allow individual Bluetooth profiles to be connected/disconnected from
the device's settings pane.

Bug: 3137982
Change-Id: I21512c5bf965fc523f3dc1e83d029b16b5e22440
This commit is contained in:
Jake Hamby
2010-11-03 12:47:51 -07:00
parent b14e1e0493
commit e79f990490
9 changed files with 96 additions and 41 deletions

View File

@@ -496,7 +496,7 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
private CharSequence[] initBtSettings(DockService service, BluetoothDevice device, int state,
boolean firstTime) {
// TODO Avoid hardcoding dock and profiles. Read from system properties
int numOfProfiles = 0;
int numOfProfiles;
switch (state) {
case Intent.EXTRA_DOCK_STATE_DESK:
numOfProfiles = 1;
@@ -729,7 +729,7 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
profileManager.setPreferred(device, mCheckedItems[i]);
if (DEBUG) {
if (mCheckedItems[i] != profileManager.isPreferred(device)) {
Log.e(TAG, "Can't save prefered value");
Log.e(TAG, "Can't save preferred value");
}
}
}