Commit Graph

521 Commits

Author SHA1 Message Date
Michael Chan
537bdb0bb8 b/2335780 Fixed race conditions which causes BT to not be in the correct state in respect to the dock state.
Change-Id: I4428708e02e7dcbb26795b0982cfe4389df60a46
2010-01-08 17:17:08 -08:00
Jeff Sharkey
1c4e96864f Allow bluetooth in airplane mode when in "toggleable" list.
Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS is a list of
radios that can be toggled while in airplane mode.  This CL
changes BluetoothEnabler to respect this.

It parallels the logic in WifiEnabler, which enables OEMs
to allow Wifi changes when in airplane mode.

Most existing devices don't include "bluetooth" in the
toggleable list, which means bluetooth will continue to be
disabled when in airplane mode for those devices.

Fixes http://b/2297314
2009-12-22 14:35:44 -08:00
Michael Chan
fc34079510 am f4ec356d: am d8eec52a: b/2318290 connect should be called instead of connect(profile) if device is unpaired.
Merge commit 'f4ec356df960245889da6f7518ec28c862ebf5e6'

* commit 'f4ec356df960245889da6f7518ec28c862ebf5e6':
  b/2318290 connect should be called instead of connect(profile) if device is unpaired.
2009-12-21 14:39:06 -08:00
Michael Chan
d8eec52a37 b/2318290 connect should be called instead of connect(profile) if device is unpaired.
Change-Id: I5d665d1c3149ffc77387f96c3822e80b84c78de1
2009-12-17 14:30:05 -08:00
Michael Chan
51f99283c6 am fcea8c0d: am 29d70e44: b/2334482 Disable Music and audio by default for the docks
Merge commit 'fcea8c0d131e019e4441fa239720a5e4ecf9ed7d'

* commit 'fcea8c0d131e019e4441fa239720a5e4ecf9ed7d':
  b/2334482 Disable Music and audio by default for the docks
2009-12-17 11:14:29 -08:00
Michael Chan
29d70e44e4 b/2334482 Disable Music and audio by default for the docks
Change-Id: I1d84cd1dfe54dd3ae4e9183a291cb8f3e0d5da5a
2009-12-17 10:49:14 -08:00
Michael Chan
2321e1dca0 am 052ad242: b/2323277 Fixed race condition where the user clicks on the dialog before dismiss() is processed.
Merge commit '052ad24219bbb170d9d028a460741524a768915a' into eclair-mr2

* commit '052ad24219bbb170d9d028a460741524a768915a':
  b/2323277 Fixed race condition where the user clicks on the dialog before dismiss() is processed.
2009-12-14 11:49:24 -08:00
Michael Chan
052ad24219 b/2323277 Fixed race condition where the user clicks on the dialog before dismiss() is processed.
Change-Id: Iae98c45e4c1c5d36f33d6519ee2adba515f6b9aa
2009-12-14 10:42:27 -08:00
Michael Chan
38badc8ba0 am 9463c2f8: b/2320107 NPE when receiving a Undock event without a device
Merge commit '9463c2f8d5f09ef9cc015405640bbf845f0f7a8a' into eclair-mr2

* commit '9463c2f8d5f09ef9cc015405640bbf845f0f7a8a':
  b/2320107 NPE when receiving a Undock event without a device
2009-12-10 23:08:40 -08:00
Michael Chan
9463c2f8d5 b/2320107 NPE when receiving a Undock event without a device
Change-Id: Ic3c964f2d58462a1b7c82f2de2dd997679f90ba7
2009-12-10 22:53:14 -08:00
Michael Chan
bd0b2542a8 am a87f2fd7: b/2320107 Fixed NPE for class bits. Docks do not have class bits.
Merge commit 'a87f2fd7d82e5055e0f9ea2c93704ed0b58f27ef' into eclair-mr2

* commit 'a87f2fd7d82e5055e0f9ea2c93704ed0b58f27ef':
  b/2320107 Fixed NPE for class bits. Docks do not have class bits.
2009-12-10 19:48:21 -08:00
Jaikumar Ganesh
3681cfb83b am 613549a6: Merge change I2c3621d1 into eclair
Merge commit '613549a622eac8278c9f81a1df83484c256652bf' into eclair-mr2

* commit '613549a622eac8278c9f81a1df83484c256652bf':
  Fix desk dock getting stuck after unpairing.
2009-12-10 17:59:14 -08:00
Michael Chan
175821f978 am d1469da1: Merge change I10036c49 into eclair
Merge commit 'd1469da150f44415135d657d57592f066670b317' into eclair-mr2

* commit 'd1469da150f44415135d657d57592f066670b317':
  b/2296110 Disable debugging/logging code before shipping.
2009-12-10 17:59:10 -08:00
Jaikumar Ganesh
41fccf2cb3 am 6e3ee10a: Fix auto connection of A2DP profile.
Merge commit '6e3ee10a99b4d71ffe8f2473dcb8c6dbf4da0ed5' into eclair-mr2

* commit '6e3ee10a99b4d71ffe8f2473dcb8c6dbf4da0ed5':
  Fix auto connection of A2DP profile.
2009-12-10 17:56:44 -08:00
Michael Chan
c8559a526c am d70e205b: Merge change I724fc8fd into eclair
Merge commit 'd70e205b4c6dbf9661b972aa208d5a42927bdd88' into eclair-mr2

* commit 'd70e205b4c6dbf9661b972aa208d5a42927bdd88':
  b/2317194 Synchronize command queue to prevent ConcurrentModificationException from happening
2009-12-10 17:41:34 -08:00
Michael Chan
5217a122d7 am 1d5f14bd: Merge change I92124d28 into eclair
Merge commit '1d5f14bd54490ccd4c93dfe350aa5abfbfe9ceda' into eclair-mr2

* commit '1d5f14bd54490ccd4c93dfe350aa5abfbfe9ceda':
  b/2296110 Car Dock - Stop service when done processing each command. Clean up logs.
2009-12-10 17:41:29 -08:00
Michael Chan
20b0ae927e am 488a80a7: Merge change Id587a517 into eclair
Merge commit '488a80a7b111f5906bf51101785a95a6c640d265' into eclair-mr2

* commit '488a80a7b111f5906bf51101785a95a6c640d265':
  b/2314560 Prevent PIN dialog from showing up on undocked docks
2009-12-10 17:41:23 -08:00
Michael Chan
a87f2fd7d8 b/2320107 Fixed NPE for class bits. Docks do not have class bits.
Change-Id: Ibe4f697a906010f8f3ee270b891db286a4976f8a
2009-12-10 16:07:11 -08:00
Android (Google) Code Review
613549a622 Merge change I2c3621d1 into eclair
* changes:
  Fix desk dock getting stuck after unpairing.
2009-12-10 02:44:12 -08:00
Android (Google) Code Review
d1469da150 Merge change I10036c49 into eclair
* changes:
  b/2296110 Disable debugging/logging code before shipping.
2009-12-10 02:41:41 -08:00
Jaikumar Ganesh
b172cd5d23 Fix desk dock getting stuck after unpairing.
Note: This is a workaround. The read problem is that
we are making a call to Bluez when it is not ready yet.
The interface has not been registered, so dbus call should fail.
We need to fix this properly.

Dr No: Eastham
Bug: 2317784
2009-12-10 02:02:47 -08:00
Jaikumar Ganesh
6e3ee10a99 Fix auto connection of A2DP profile.
When the user selects profiles from the UI, set priority to ON.

Dr No: Eastham
Bug: 2317323
2009-12-09 19:15:30 -08:00
Michael Chan
6fd5bc935e b/2296110 Disable debugging/logging code before shipping.
Change-Id: I10036c49e3c3d61d0fa1af74f1f0cd9d03502103
2009-12-09 18:00:48 -08:00
Android (Google) Code Review
d70e205b4c Merge change I724fc8fd into eclair
* changes:
  b/2317194 Synchronize command queue to prevent ConcurrentModificationException from happening
2009-12-09 17:45:07 -08:00
Michael Chan
792edfcf12 b/2317194 Synchronize command queue to prevent ConcurrentModificationException from happening
Change-Id: I724fc8fd07d33cfa6e68221a766754dcb1f6aeba
2009-12-09 17:34:54 -08:00
Michael Chan
503c236db5 b/2296110 Car Dock - Stop service when done processing each command. Clean up logs.
Change-Id: I92124d2856e6c825a2b4148473431789a1f5b156
2009-12-09 17:27:56 -08:00
Michael Chan
d617a0781c b/2314560 Prevent PIN dialog from showing up on undocked docks
If unpaired while undocked, device will be removed from the BT device list.
If unpaired while docked, the user can do pair and connect. No PIN dialog will pop up.
If undocked after unpaired, device will be removed from the BT device list.

Change-Id: Id587a517999e08641451f78dec8696a06028cf16
2009-12-09 17:16:46 -08:00
Michael Chan
a20da808f0 am 14638566: b/2296110 Car Dock - Enable BT if not already enabled.
Merge commit '146385663bb55d9f55ad179d3c35ccf5cac13fc8' into eclair-mr2

* commit '146385663bb55d9f55ad179d3c35ccf5cac13fc8':
  b/2296110 Car Dock - Enable BT if not already enabled.
2009-12-08 14:22:17 -08:00
Michael Chan
146385663b b/2296110 Car Dock - Enable BT if not already enabled.
Change-Id: If1798f62c9438e58c342869176437067f941c8cb
2009-12-08 14:18:13 -08:00
Michael Chan
41eb38412a am 0c75b2d2: Merge change I80790bdb into eclair
Merge commit '0c75b2d2dc35b88d5cb9db96afc72ed074ca5350' into eclair-mr2

* commit '0c75b2d2dc35b88d5cb9db96afc72ed074ca5350':
  b/2296110 Dialog for setting up dock audio.
2009-12-07 20:50:32 -08:00
Android (Google) Code Review
0c75b2d2dc Merge change I80790bdb into eclair
* changes:
  b/2296110 Dialog for setting up dock audio.
2009-12-07 20:48:16 -08:00
Michael Chan
df9504ef58 b/2296110 Dialog for setting up dock audio.
Reimplemented as a Foreground Service just so it can get on top of the Car Dock App.
Added debounce mechanism to not disconnect immediately after getting a undock event.
Each dock now has its own "Remember setting".
Remember Settings is on by default

Change-Id: I80790bdb7c831e2a642365b92433012191aa70c1
2009-12-07 16:57:26 -08:00
Jaikumar Ganesh
e509c36f1e am 55dc6cb9: Disconnect even Sinks in Connecting state while connecting another sink.
Merge commit '55dc6cb99db1f9f6677dfec5a25a34e933807be5' into eclair-mr2

* commit '55dc6cb99db1f9f6677dfec5a25a34e933807be5':
  Disconnect even Sinks in Connecting state while connecting another sink.
2009-12-07 15:52:53 -08:00
Jaikumar Ganesh
55dc6cb99d Disconnect even Sinks in Connecting state while connecting another sink.
We can hit this more when using a Car Dock

Bug: 2133530
Dr No: Eastham
2009-12-07 15:22:50 -08:00
Michael Chan
2ffa95fd59 am 0bd445b9: b/2296110 New Dialog which appears when phone is place on dock.
Merge commit '0bd445b974292dc3910b6bb85dcee7e7c378968f' into eclair-mr2

* commit '0bd445b974292dc3910b6bb85dcee7e7c378968f':
  b/2296110 New Dialog which appears when phone is place on dock.
2009-12-03 20:44:45 -08:00
Michael Chan
0bd445b974 b/2296110 New Dialog which appears when phone is place on dock.
Change-Id: I58b216ee9b4ca9ce16210309358c0512271e128e
2009-12-03 20:32:38 -08:00
Michael Chan
87985ae6de am 3327f788: b/2293042 Fixed the problem where A2DP connections may fail if there\'s an existing connection to another device.
Merge commit '3327f7887328c55ef2d837a8e2a07cea2070c744' into eclair-mr2

* commit '3327f7887328c55ef2d837a8e2a07cea2070c744':
  b/2293042 Fixed the problem where A2DP connections may fail if there's an existing connection to another device.
2009-12-03 12:23:17 -08:00
Michael Chan
3327f78873 b/2293042 Fixed the problem where A2DP connections may fail if there's an existing connection to another device.
Change-Id: I1b4963a167b633c0905e2719ab3f651ff8be9f2c
2009-12-03 11:45:59 -08:00
Jaikumar Ganesh
9a1ed7e4e6 Update to reflect new priorities for A2DP profile. DO NOT MERGE.
1. PRIORITY_OFF is when it is unchecked.
2. PRIORITY_ON is when it is checked.
3. PRIORITY_AUTO_CONNECT is when we want to auto connect.

When the box is checked, we want to auto connect,
so set the priority to AUTO_CONNECT.
When the user disconnects, we set the priority back
to PRIORITY_ON.

Change priority for Headset profile on the same lines as A2DP profile.

AUTO_CONNECT => we auto_connect.
ON => Settings app box is checked and we allow incoming connections.
OFF => Settings app check box is unchecked.

Dr no: Eastham
Bug: 2133530
2009-12-02 15:38:52 -08:00
Jaikumar Ganesh
42499a85e8 Change priority for Headset profile on the same lines as A2DP profile.
AUTO_CONNECT => we auto_connect.
ON => Settings app box is checked and we allow incoming connections.
OFF => Settings app check box is unchecked.
2009-11-30 10:32:27 -08:00
Jaikumar Ganesh
210667f353 Update to reflect new priorities for A2DP profile.
1. PRIORITY_OFF is when it is unchecked.
2. PRIORITY_ON is when it is checked.
3. PRIORITY_AUTO_CONNECT is when we want to auto connect.

When the box is checked, we want to auto connect,
so set the priority to AUTO_CONNECT.
When the user disconnects, we set the priority back
to PRIORITY_ON.
2009-11-24 14:43:45 -08:00
Michael Chan
4fcf94c47b am 5469ff8b: b/2226832 Showing Pairing Dialog in the foreground
Merge commit '5469ff8b3f9966c6f141078b37da5f178b7825e4' into eclair-mr2

* commit '5469ff8b3f9966c6f141078b37da5f178b7825e4':
  b/2226832 Showing Pairing Dialog in the foreground
2009-11-10 11:06:36 -08:00
Michael Chan
5469ff8b3f b/2226832 Showing Pairing Dialog in the foreground
Pairing Dialogs notifications (in the window shade) were not visible in full
screen apps e.g. gallery.  Showing Pairing Dialog in the foreground:
1) if the remote device was picked in the device picker in the last minute or
2) if the device was in discoverable mode in the last minute.
2009-11-10 10:37:54 -08:00
Michael Chan
51dfd4b035 am 834e5993: b/2234854 Fixed Bluetooth API return codes for requesting permission to enable bluetooth
Merge commit '834e5993e4f2f34d5aceb3196601b30231d00b07' into eclair-mr2

* commit '834e5993e4f2f34d5aceb3196601b30231d00b07':
  b/2234854 Fixed Bluetooth API return codes for requesting permission to enable bluetooth
2009-11-06 13:32:53 -08:00
Michael Chan
834e5993e4 b/2234854 Fixed Bluetooth API return codes for requesting permission to enable bluetooth
Also added test app.
2009-11-05 18:32:09 -08:00
Michael Chan
d55c31ead6 am 4d004e91: b/2238546 Fixed NPE in Settings when Bluetooth "class" is null
Merge commit '4d004e910732565ddd449c7c525f7d6cbd353392' into eclair-mr2

* commit '4d004e910732565ddd449c7c525f7d6cbd353392':
  b/2238546 Fixed NPE in Settings when Bluetooth "class" is null
2009-11-05 10:32:57 -08:00
Michael Chan
4d004e9107 b/2238546 Fixed NPE in Settings when Bluetooth "class" is null 2009-11-04 17:19:48 -08:00
Jaikumar Ganesh
db99bb3644 am c065348e: Show an error message when the remote side cancels the authentication and show OPP device list correctly.
Merge commit 'c065348ebaf1ea9301d7b96633bea4de8c78c2aa' into eclair-mr2

* commit 'c065348ebaf1ea9301d7b96633bea4de8c78c2aa':
  Show an error message when the remote side cancels the authentication
2009-10-08 17:30:28 -07:00
Michael Chan
81cdaff7b5 b/2173596 Cancel Bluetooth scanning when the user leaves Bluetooth Settings.
Change-Id: Ib4dd6254c90da619e853b1be22fba3ff1365258e
2009-10-08 11:55:47 -07:00
Jaikumar Ganesh
c065348eba Show an error message when the remote side cancels the authentication
and show OPP device list correctly.

Dr No: Eastham
Bug: 2174874
2009-10-08 08:06:27 -07:00