Commit Graph

152 Commits

Author SHA1 Message Date
Jaikumar Ganesh
db3694d030 am a905d955: am a31cbd61: Merge "Remove STOPSHIP and reduce log spam." into gingerbread
Merge commit 'a905d9551103c5be465429ffeb0352b78058457e'

* commit 'a905d9551103c5be465429ffeb0352b78058457e':
  Remove STOPSHIP and reduce log spam.
2010-10-15 12:44:39 -07:00
Jaikumar Ganesh
72cd64b20e resolved conflicts for merge of bbb90d13 to master
Change-Id: I85de73f6e11e7547a006d41ca49021bca19af14b
2010-10-15 10:02:57 -07:00
Jaikumar Ganesh
c8e87e3ce6 am 373a6961: am 64f42803: Merge "Bluez doesn\'t handle disconnect while connecting well. Defer the message." into gingerbread
Merge commit '373a69614e534ae04dddd79c92933b6d8969fad7'

* commit '373a69614e534ae04dddd79c92933b6d8969fad7':
  Bluez doesn't handle disconnect while connecting well.
2010-10-14 21:19:04 -07:00
Jaikumar Ganesh
5b9895c016 Merge "Disconnect PBAP while disconnecting HFP profile." 2010-10-14 16:18:22 -07:00
Jaikumar Ganesh
2beaf7316f Disconnect PBAP while disconnecting HFP profile.
PBAP profile is associated with HFP profile. Disconnect PBAP
profile while disconnecting HFP profile. We ever never doing this
and were expecting the remote end to do it. So when the user
disconnects a headset, we will end up with the ACL link still up
because PBAP has not been disconnected.

This is little bit of a hack till PBAP profile is converted to
use the new profile APIs.

Change-Id: I04821daae6588955fbfea01472e6a1b6f9212608
2010-10-14 16:14:38 -07:00
Jaikumar Ganesh
0b9ba91fa5 Merge "Add function to check for AVRCP target to send volume keys." 2010-10-14 11:03:42 -07:00
Jaikumar Ganesh
41d5c805d9 Add function to check for AVRCP target to send volume keys.
Currently, when A2DP is connected and the user changes volume
keys on the device, we just change the volume on the device.
We are not supposed to do that. The white paper recommendation
is to keep the volume stream at max and just send the volume
keys over. But then not all A2DP headsets act as AVRCP targets,
hence check for that.

So now the media code should use the API and not change the volume
at the device but just send the keys.

Bug: 3071356
Change-Id: I03a8b6f7619cf860c4e63979bf4903ded9ecd314
2010-10-13 19:25:33 -07:00
Jaikumar Ganesh
a905d95511 am a31cbd61: Merge "Remove STOPSHIP and reduce log spam." into gingerbread
Merge commit 'a31cbd61bc53730d756464b0c273475c4f738066' into gingerbread-plus-aosp

* commit 'a31cbd61bc53730d756464b0c273475c4f738066':
  Remove STOPSHIP and reduce log spam.
2010-10-13 16:56:27 -07:00
Jaikumar Ganesh
bbb90d134a am c008ca96: Merge "Work around for errant headsets." into gingerbread
Merge commit 'c008ca96bb32289958010dcf8f247c35ab9b1f18' into gingerbread-plus-aosp

* commit 'c008ca96bb32289958010dcf8f247c35ab9b1f18':
  Work around for errant headsets.
2010-10-13 16:48:41 -07:00
Jaikumar Ganesh
bdb1d9320b Remove STOPSHIP and reduce log spam.
We still need some logs, as it helped me fix the errant headset bug.

Bug: 3095000
Change-Id: If12601430e6dc30490df1ff86fc3f9d4d455e6d5
2010-10-13 16:48:02 -07:00
Jaikumar Ganesh
70a053bf1b Work around for errant headsets.
1. Some headsets send an AVCTP connection before an AVDTP connection
When that AVCTP connection fails, we get stuck in IncomingA2DP state
because we don't handle AVCTP signals for now.
We need to handle the signals and fix it better.

2. Also when ACL gets disconnected, reset state i.e
when the low level connection disconnected reset our state.
This is like a fail safe in case we get stuck.

Bug: 3051490
Change-Id: Ibcf188103999ffb1e08c36c2554504c639fb7f50
2010-10-13 16:38:28 -07:00
Jaikumar Ganesh
373a69614e am 64f42803: Merge "Bluez doesn\'t handle disconnect while connecting well. Defer the message." into gingerbread
Merge commit '64f4280313c5b498a3238d174c4d14ca2187604b' into gingerbread-plus-aosp

* commit '64f4280313c5b498a3238d174c4d14ca2187604b':
  Bluez doesn't handle disconnect while connecting well.
2010-10-12 19:06:13 -07:00
Jaikumar Ganesh
adbda6f094 Bluez doesn't handle disconnect while connecting well.
Defer the message.

Bug: 3076404
Change-Id: Id62e1008346f492a85e714240a832a061def1786
2010-10-12 16:58:06 -07:00
Jaikumar Ganesh
f5cae7d1c5 am 38702d5f: Merge "DO NOT MERGE: Disconnect PBAP while disconnecting HFP profile." into gingerbread
Merge commit '38702d5f1c42e2dfcc8fa5472c8fe842b4056914' into gingerbread-plus-aosp

* commit '38702d5f1c42e2dfcc8fa5472c8fe842b4056914':
  DO NOT MERGE: Disconnect PBAP while disconnecting HFP profile.
2010-10-07 16:58:13 -07:00
Jaikumar Ganesh
59453c947a DO NOT MERGE: Disconnect PBAP while disconnecting HFP profile.
PBAP profile is associated with HFP profile. Disconnect PBAP
profile while disconnecting HFP profile. We ever never doing this
and were expecting the remote end to do it. So when the user
disconnects a headset, we will end up with the ACL link still up
because PBAP has not been disconnected.

This is little bit of a hack till PBAP profile is converted to
use the new profile APIs.

Change-Id: I5f68b228fd5e607605928a52343ad4b86c58ac0b
2010-10-06 19:23:38 +02:00
Jake Hamby
980d40b568 resolved conflicts for merge of 738aadd7 to master
Change-Id: I8810cc6dbd532de002d6a623ad93e86afb48c0b4
2010-09-30 19:33:43 -07:00
Jake Hamby
738aadd70f resolved conflicts for merge of 0a972acf to gingerbread-plus-aosp
Change-Id: Id8dc5038edc214b4433bdf690243f2f5fe5b4812
2010-09-30 16:29:13 -07:00
Jake Hamby
f51eadaf1f Typo fixes in comments and minor code cleanups.
* Fix some typos in Javadoc and log messages.
* Remove redundant initializer in BluetoothAdapter.readOutOfBandData()
* Use canonical "UTF-8" charset name instead of "UTF8" in
    BluetoothDevice.convertPinToBytes()

Change-Id: I58cd5dc48a7ad0053d204c5f590b4b3d438d8672
2010-09-30 15:43:34 -07:00
Jaikumar Ganesh
96a79830ea Update code for new BT public APIs.
Change-Id: Id730fb6226db59f3a0416111c4790653c2fccb0b
2010-09-28 20:00:53 -07:00
Jaikumar Ganesh
62c37efc9e New public APIs for BluetoothA2dp and BluetoothHeadset profiles.
Change-Id: I1cc4b109542dfd62473cb95797c8c3d0d15725f4
2010-09-28 19:53:53 -07:00
Jake Hamby
14769a8690 am eb3b40af: am 0f584306: Fix Bluetooth Javadoc to clarify the maximum device name length.
Merge commit 'eb3b40af974d818cab66bf0a728c8bdec4f6f715'

* commit 'eb3b40af974d818cab66bf0a728c8bdec4f6f715':
  Fix Bluetooth Javadoc to clarify the maximum device name length.
2010-09-16 23:25:59 -07:00
Jake Hamby
eb3b40af97 am 0f584306: Fix Bluetooth Javadoc to clarify the maximum device name length.
Merge commit '0f5843069bd419fba4fb253986645dfbca0784b7' into gingerbread-plus-aosp

* commit '0f5843069bd419fba4fb253986645dfbca0784b7':
  Fix Bluetooth Javadoc to clarify the maximum device name length.
2010-09-16 22:15:55 -07:00
Jake Hamby
0f5843069b Fix Bluetooth Javadoc to clarify the maximum device name length.
The maximum length of a Bluetooth device name is 248 bytes using
UTF-8 encoding. Updated the Javadoc to clarify that the length is
limited by the number of UTF-8 bytes and not the number of characters.

Change-Id: I135671f5ee6c5eb6372f3fbbc5fccb02de65e6c4
2010-09-16 18:21:07 -07:00
Jaikumar Ganesh
20c8f47330 resolved conflicts for merge of 0522f5e9 to master
Change-Id: Ie0a7ece33dced1042948087053e49665f6235fc2
2010-09-13 14:57:59 -07:00
Jaikumar Ganesh
0522f5e9b7 am cc5494c9: Out Of Band API for Secure Simple Pairing.
Merge commit 'cc5494c9996f809e36539b24e8b6b67683383d29' into gingerbread-plus-aosp

* commit 'cc5494c9996f809e36539b24e8b6b67683383d29':
  Out Of Band API for Secure Simple Pairing.
2010-09-13 11:52:19 -07:00
Jaikumar Ganesh
cc5494c999 Out Of Band API for Secure Simple Pairing.
Change-Id: I54ded27ab85d46eef3d2cca84f2394b1ffe88ced
2010-09-13 11:40:21 -07:00
Jaikumar Ganesh
b70765cc27 Decouple Tethering UI with registering of SDP records.
This can lead to usability issues, since the SDP record
will get registered later on.

Change-Id: Ifda78a3831572f1b9955bf06da9a8b0e949942aa
2010-09-02 14:34:40 -07:00
Jaikumar Ganesh
4e25533945 Add @hide for the VENDOR_SPECIFIC_HEADSET_INTENT
Change-Id: I5405b57f5815fa91ffce829dec6da3e4b7f1245f
2010-08-26 16:03:40 -07:00
Jean-Baptiste Queru
0fc1b793b6 am b13c9bc5: manual merge
Merge commit 'b13c9bc5219ca85c36507fb3a8d5923e3de974b6'

* commit 'b13c9bc5219ca85c36507fb3a8d5923e3de974b6':
  BluetoothHeadset.java:
2010-08-24 10:16:28 -07:00
Jaikumar Ganesh
34536183f4 Add BNEP_SVC UUID for incoming tethering connections.
Change-Id: I90c24edfd133ac9fa89c3467383cd61fa23954c6
2010-08-23 18:32:03 -07:00
Jaikumar Ganesh
332058050a Add Tethering class bit check.
Change-Id: Iaa87c91c4b3db3b77c2e6c4f559fa2e438c9c247
2010-08-23 11:50:32 -07:00
Jean-Baptiste Queru
b13c9bc521 manual merge
Change-Id: Ib92a75958b857277e17f4bd0bee75744c653c942
2010-08-20 15:58:49 -07:00
Danica Chang
6fdd0c6274 bluetooth tethering
Change-Id: Id6d5fb1922facc7013abc29214d3e1141995b767
2010-08-18 15:07:50 -07:00
Herb Jellinek
a473394183 BluetoothHeadset.java:
Added ACTION_VENDOR_SPECIFIC_HEADSET_EVENT,
EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD,  EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS.

BluetoothAssignedNumbers.java (new file):
A home for BT assigned numbers, beginning with the company IDs.

HeadsetBase.java:
Reformatted some code.

AtCommandHandler.java:
Fixed comment typos.

Change-Id: I34d6f248166305d72be66632779fc963b894379c

Added EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID.
Fixed a minor comment typo.

Change-Id: I8550692c13510a853c894b2d108bef4520d931c2
2010-08-13 15:23:00 -07:00
Jaikumar Ganesh
feb1a4e5e0 am 4a671a74: am 745d1e90: Merge "Update javadoc for the API and change return of getBondedDevices()." into gingerbread
Merge commit '4a671a745202cb15cc668d46400731a03b068558'

* commit '4a671a745202cb15cc668d46400731a03b068558':
  Update javadoc for the API and change return of getBondedDevices().
2010-08-09 20:00:53 -07:00
Jaikumar Ganesh
39e8a8a04d am 4e25db6a: am cbaef518: Merge "Check whether Bluetooth is enabled before making any API calls." into gingerbread
Merge commit '4e25db6a51c4182139b85e3b01317d161f944bbb'

* commit '4e25db6a51c4182139b85e3b01317d161f944bbb':
  Check whether Bluetooth is enabled before making any API calls.
2010-08-09 20:00:36 -07:00
Jaikumar Ganesh
fec86f4aa2 Update javadoc for the API and change return of getBondedDevices().
getBondedDevices() *might* work if called before the Bluetooth
State intent is broadcasted. However, this can cause ANRs and problems.
This API was updated to return null, if called before the intent
is received. However, this might cause existing apps to crash. Return
an empty set instead.

Change-Id: Ibc484d3394aa0bbebd651221efde6a7015ce7110
2010-08-09 17:01:21 -07:00
Jaikumar Ganesh
f5ff170be1 Check whether Bluetooth is enabled before making any API calls.
For example, Settings app makes calls to get Bonded Devices
before Bluetooth is on. This leads to ANRs and will
prevent autoconnection.

Change-Id: I56748a9bd1d603b5782c17775c6b20b831bf6572
2010-08-09 13:49:40 -07:00
Jaikumar Ganesh
de07503a38 Add HID to the state machine and add native call backs.
Change-Id: Ib9f3e476d4176bc04e23e7674dc54aa5a6417308
2010-07-21 10:43:02 -07:00
Danica Chang
eaeffac5fc Merge "deleted ScoSocket.java and android_bluetooth_ScoSocket.cpp" 2010-07-20 12:47:45 -07:00
Adam Powell
df7627db71 Changes for bluetooth keyboard support.
Add device class constant for PROFILE_HID and check for
Device.Major.PERIPHERAL when checking for class matches.

Change UUID for HID support.

Fix bug in BluetoothService.

Change-Id: Ie5361257d90fd749249e915824564bc3d79fb95d
2010-06-21 16:23:42 -07:00
Jaikumar Ganesh
545e6708ad HID profile.
Change-Id: I52e965a6537bce02c751ba26fe7b44dd03832510
2010-06-17 13:49:25 -07:00
Danica Chang
672e04b5d2 deleted ScoSocket.java and android_bluetooth_ScoSocket.cpp
Change-Id: I2bc63979bada9e18bcfeb9e740fab8b37c6868b9
2010-06-15 15:54:21 -07:00
Jaikumar Ganesh
f1048cdb68 Serialize all commands for a particular profile.
Change-Id: I843ea9ab0bb2372c8316e99e8c083a9939ad774a
2010-06-07 14:08:38 -07:00
Jaikumar Ganesh
740e39be6a Pass BluetoothDevice to the Bluetooth Headset calls.
This is to support multiple headsets at the same time, atleast
at the framework level.

Change-Id: I91d05c6c2828c9a09d00806d5e79f1e9c9c7cf84
2010-06-02 16:03:51 -07:00
Jaikumar Ganesh
9b637e5985 Add a new state machine for handling the incoming / outgoing profile
connections.

Change-Id: I5fc9170b5e24c4a52a6f2ef4ca7a8bac65271941
2010-06-02 16:03:45 -07:00
Jaikumar Ganesh
af21fa61c2 Removing STOPSHIP logs.
Bug: 2694602
Change-Id: Id56e1ddcf5ea76de32238cd6761f2caf053f1fa1
2010-05-18 14:36:48 -07:00
Jaikumar Ganesh
c24dbdb57b Add an extra for the Disconnect Headset State.
This extra tells as to who initiated the disconnection.

Bug:2568119
Change-Id: Iea706ad69f79ae0257604dfa84d49126fb851cca
2010-04-05 14:43:59 -07:00
Eric Olsen
5e12aec163 Add the blacklist for the SCO connections
Change-Id: Ibfdfb21fb2f27d01d2b8bff48041398aa4308353
Signed-off-by: Eric Olsen <eolsen@android.com>
2010-03-18 18:08:02 -07:00
Eric Laurent
d726b35ebd Added a configuration option indicating if the platform supports use of
bluetooth SCO for off call use cases.
Added method to BluetoothHeadset API to check if voice dialer over
bluetooth is supported. Replaces direct use of DISABLE_BT_VOICE_DIALING
and takes platform capabilities into account.

Needed for issue 2416481: Support Voice Dialer over BT SCO.

Change-Id: I237d5a984dbc4cbc88e98b85d710a6c87ba1b315
2010-03-17 19:11:59 -07:00