History log of /frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3b6214f373b693323a474325662242415090f7f7 29-Aug-2012 Matthew Xie <mattx@google.com> Turn off verbose debug message in BluetoothAdapter
Change-Id: I30245ab911b5428f7af38f195b941db02d36b18f
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
fffa86ba834d37684238c83c0dd081133324984d 09-Aug-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Implement enableNoAutoconnect()

Adding enableNoAutoconnect() API support in Bluetooth service
to let BT enable in quiet mode

Change-Id: I546f3ceb298082a9c9a698f406379470e3cc0d4f
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
10d7e8afb2297b24ad3bbccd0f5f3ded5e79fe12 03-Aug-2012 Martijn Coenen <maco@google.com> Bluetooth: fix enableNoAutoConnect() call.

For now, just do a regular connect.

Change-Id: Ibc43098d45c82177298cb17d72a32c7904924021
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
bf072a712f584ae1c01022835b0de21c40513d06 10-May-2012 fredc <fredc@broadcom.com> Moved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to BluetoothManagerService

Change-Id: I88e5f3fe050cf11eae9c5cf1b7c393a178b8f9b1
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
d6883533e4ac3f73d2fde1db9a1dddf06dac6709 26-Apr-2012 fredc <fredc@broadcom.com> Fixed socket not closing on BT off. Used RemoteCallbackList to monitor binder deaths in BluetoothManagerService.

Change-Id: I524964bd2836d8c5a4bae095b93ac9481337941d
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
903ac6f399dcd4f574bf388daa7b5f5907d448d3 24-Apr-2012 fredc <fredc@broadcom.com> Fixed issue with Settings app crashing after during on/off and unpair.

Fixed issue with BluetoothAdapter.getRemoteDevice() returning null.

Change-Id: Ie86813532530a6b57bde1c430c7b4875ecc7354c
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
116d1d4696ac8e300c83dd8a95e20e67717ef520 20-Apr-2012 fredc <fredc@broadcom.com> Fixed issue with getting Bluetooth adapter's name and airplane mode

Change-Id: I18b632223574aa41b09ba30de8e35417fad86cbe
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
4bedba49fe6989387fd04499b175af56e068da28 18-Apr-2012 Sreenidhi T <nidhit@broadcom.com> Change done in BluetoothAdapter to use the same API for interacting with the Bluetooth Service. setName was being done using mService while getName was using mManagerService. As a result, the device name was not being updated in Localadapter getname call. Modified to use mService in both cases.

Change-Id: I2e900a782df11fd511319fbb42d94324e50ae89b
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
a097f51e5fde9d00ebe99f4e1915cc6d4cd078ad 16-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> BT enable adapter API should return TRUE or FALSE.

Change-Id: Iaef14c51d3407b69505c55a0bbdaf902213402cf
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
0f42037eb7b5118015c2caca635538324ccf0ccf 12-Apr-2012 fredc <fredc@broadcom.com> Non persistent adapter service

Change-Id: Ib13d5c77416e58161df0e04d7a15ec0dddbde8b5

Conflicts:

core/java/android/bluetooth/BluetoothInputDevice.java

Conflicts:

core/java/com/android/internal/app/ShutdownThread.java
services/java/com/android/server/SystemServer.java

Conflicts:

services/java/com/android/server/SystemServer.java
services/java/com/android/server/pm/ShutdownThread.java
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
827de2d73e9f07e1545839889eaf035aea64ea12 04-Apr-2012 Srikanth Uppala <suppala@broadcom.com> Fix discoverability timeout issues. (a) implement timeout logic (b) persist 'never timeout' after reboot (c) code cleanup

Change-Id: Iacaec4a48a45935a49576c140ea11ea3d0da6361
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
3b147b770269173d5d711d6c33f142dc5e723824 04-Apr-2012 zzy <zhenye@broadcom.com> Added new rfcomm multi accept code
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
e21a4ac09d2473becaea43a73d19e9e836e7732a 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Add a new version of the disable API.

This allows for the setting to be persisted or not.
Also turn on Bluetooth in System Server if needed.
It won't work currently because the service wouldn't have
started.

Change-Id: I15fa2bff93aa32134c1b565fcbe90ba68614b6a1
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
e4caddbb7a3b39fd6a1ccf107c7dbf09bc8978e8 26-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Changes for new Bluetooth APIs.

Changes to Bluetooth Adapter, Device and IBluetooth interfaces
for new Bluetooth APIs. Delete AudioGateway.

Change-Id: Ib51b31187eafde261441b9311b5e7e13c8bff82f
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
6c614b7e596d2c7c410adec727bf787834cb258b 18-Apr-2012 Martijn Coenen <maco@google.com> Allow enabling Bluetooth without auto-connecting.

This is a feature used for NFC-to-Bluetooth handover:
we want to enable BT for file transfer, and disconnect
it when we're done. During this period we don't want
to auto-connect other devices - it should be transparent
to the user that Bluetooth is used. Also, don't allow
A2DP/HSP incoming connections.

Change-Id: I0a03e8084c439b1271b6a80f4d9da5aacfe19c45
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
2b072677538de979961b5bf527109fdab1713731 23-Dec-2011 Joe Fernandez <joefernandez@google.com> am 201469f5: am bb7f590a: Merge "docs: Add developer guide cross-references, Project ACRE, round 4" into ics-mr1

* commit '201469f54522436be79d4d6665721049bfc74320':
docs: Add developer guide cross-references, Project ACRE, round 4
3aef8e1d1b2f0b87d470bcccf37ba4ebb6560c45 20-Dec-2011 Joe Fernandez <joefernandez@google.com> docs: Add developer guide cross-references, Project ACRE, round 4

Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
75596b4545da36fa7592bd4a2ae680e5b336ee47 08-Dec-2011 Nick Pelly <npelly@google.com> Add BluetoothAdapter.getRemoteDevice(byte[])

This is useful for NFC->BT hand-over, where we are already working with bytes.

Change-Id: I2fff0b4fa0cefe9bfdf9a13f7ec6f557776a8a03
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
9bb275197df8eb999eab4cdd0a2aff83c2bb2ef6 28-Nov-2011 Jaikumar Ganesh <jaikumar@google.com> Cleanup references when turning BT off.

Bug: 5572649
Change-Id: I62f9e0620832b69995d5c6e1c24634c9a3895a4b
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
44b58ab89e59b3d8241901232c8f7dc9617b206e 16-Nov-2011 Matthew Xie <mattx@google.com> Check the bluetooth state for getUuid call

Donnot make the bluetoothservice.getUuids call if the bluetooth
is not on. Also get rid of all the necessary locks on BluetoothService
for get property call. It had a lock on BluetoothAdapterProperty.
bug5472114

Change-Id: I383472ae6006fc1f0129c960c8a44ed0df027a43
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
2d68a6ba3c1354f363e5ee77448f163664bf47d9 27-Sep-2011 Scott Main <smain@google.com> docs: mix of BT and NFC javadoc updates
Add Health profile to various discussions about profiles
Add descriptions to NFC interfaces, tweak some desciptions, and fix some broken links

Change-Id: Ib89434c78a4ad60b4358dca9a6c335451d1c4125
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
484867a8ed3d46fbb8df493c77f2e2d46a0db654 26-Aug-2011 Matthew Xie <mattx@google.com> Move Bluetooth remove service record handler to the app main thread

Move Bluetooth remove service record handler to the app main thread.
This removes the dependency of caller thread that constructs the
BluetoothAdapter singleton instance. The caller thread could stop while
BluetoothAdapter singleton exists but lose the handler context.
Make the BluetoothService.removeServiceRecord return quickly without
blocking on native call.
bug 4999443

Change-Id: I302534baa381f4aca8192e1e4a9ea21793b07ba6
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
9354790fa199a316eba1a2e52b789a3ebe28726b 23-Aug-2011 Jaikumar Ganesh <jaikumar@google.com> Make profile connection state API public.

Change-Id: I1f2810d4e820142435f7bbda051c98ec3e3cf3eb
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
cb1d354c1e9b458a0426cd08520d938012e32b34 19-Aug-2011 Jaikumar Ganesh <jaikumar@google.com> Add Api to get profile connection state.

This gets the current connection state of the profile with respect
to the local Bluetooth adapter.

Change-Id: I7cff6c9201d29a8b45413cff7384b7483f21bd5c
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
f5fb6c8ce36a98da47f32f4142d372bd5f650bfa 03-Aug-2011 Jaikumar Ganesh <jaikumar@google.com> Enforce permission for changeApplicationState function.

The ADMIN permission is for use cases where we want to manage BT connection
at a deeper level. So just the Bluetooth permission is good enough here.

Change-Id: Iddd038fe9f9a26f155b4edc9484ba1fe27b178ba
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
ef2cb7c93a99096799d415e721dda46d1bf7a005 22-Jul-2011 Jaikumar Ganesh <jaikumar@google.com> Add ability to turn BT on / off on a per application basis.

This changes adds an API for system applications
to enable bluetooth without all the side effects like
auto connection to headsets etc.

Also some tweaks to the adapter state machine

Change-Id: Ib9f22d548a26d72334b300101c8eb0d80f08a4bb
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
2ea1e85dcb57d17f5782dbafa1d25eb51c630e4b 02-Apr-2011 Jaikumar Ganesh <jaikumar@google.com> Implement APIs for Bluetooth Health profile.

This first patch implements all the APIs.
The APIs wil be made public soon. The data specification
API will be submited in another patchset.
Change-Id: I2462683b7e07380e2c42474b0036b34d03b4bed1
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
830d8c5fb397f11d7dd2be31b20a8889797eb4b1 06-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am 5aaed097: am 58ada2f3: am 94062517: Merge "Require bonding and encryption for PBAP server"

* commit '5aaed0970be451479a07b2423e709026dec6611b':
Require bonding and encryption for PBAP server
5aaed0970be451479a07b2423e709026dec6611b 06-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am 58ada2f3: am 94062517: Merge "Require bonding and encryption for PBAP server"

* commit '58ada2f3bbab749fb5a813fb8f82eee347080405':
Require bonding and encryption for PBAP server
efc1d16374955f04d713c770ab47d90d190afe83 21-Mar-2011 Albert Mojir <albert.mojir@sonyericsson.com> Bluetooth: correcting return value from cancelDiscovery

BluetoothAdapter.cancelDiscovery was previously always
returning false.

Change-Id: Ic1fd134d4b710438d95c5b8ca009104529dd1bf5
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
e3b9dc107ea10645e064581460829d262c911f1c 21-Mar-2011 Mathias Jeppsson <mathias.jeppsson@sonyericsson.com> Require bonding and encryption for PBAP server

The Phonebook Access Profile specification requires bonding and
encryption. For devices not supporting SSP (Secure Simple Pairing),
InsecureRfcomm will require neither. Adding EncryptedRfcomm to force
bonding and encryption but not requiring authenticated link key.

Change-Id: If47cca9c5ffd89358bcd61d64f7785d17e0ca7cc
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
74ef1199459629c5dd9f272f8cd706d82cdfeeb1 23-Feb-2011 Jaikumar Ganesh <jaikumar@google.com> Make BluetoothPan inherit from BluetoothProfile.

Change-Id: Ibd3e24e391be93ebe2cf975bd075efb68e10c1ff
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
4ab0e7746fe74a9e4d75d374f73b7af87420b2f6 18-Feb-2011 Jaikumar Ganesh <jaikumar@google.com> Make BluetoothInputDevice inherit from BluetoothProfile.

This makes it in sync with BluetoothHeadset and BluetoothA2dp profiles.

Change-Id: I3ddb1d18b04aacb173b7bc376bca21c277a6afe4
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
0b5b35f8a12e9f7e85df6b9b86597ebc84584d97 02-Feb-2011 Jaikumar Ganesh <jaikumar@google.com> Fix BluetoothAdapter Connection change intent doc.

Bug: 3414206
Change-Id: Icf87e28e11b0b5072fe546225bbfb1dc68487ef0
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
299ae67d031ac5b540324433c365b9f4f3811880 20-Jan-2011 Scott Main <smain@google.com> docs: small javadoc, but also make the existing getProfileProxy docs visible... had wrong comment tag

Change-Id: Ia4b2178057c0263ec8f835342815082de87b3af1
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
a3363ef2cdf27e8d652297e9b916d085c5550a28 14-Jan-2011 Jaikumar Ganesh <jaikumar@google.com> Do Not Merge: Expose insecure rfcomm Bluetooth API.

This complements the secure rfcomm API.
The link key is unauthenticated and is subject to MITM attacks.
The link key may be encrypted depending on the type of Bluetooth device.
This helps apps which don't need the extra security or
have their own security layer built on top of the rfcomm link.

Bug: 3352266

Change-Id: I633fd0372e5e23288d6fec950dd1abc2896031f1
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
6eef14a7fcf6b6338f21f760830abf369ca0137d 23-Dec-2010 Jaikumar Ganesh <jaikumar@google.com> Expose insecure rfcomm Bluetooth API.

This complements the secure rfcomm API.
The link key is unauthenticated and is subject to MITM attacks.
The link key may be encrypted depending on the type of Bluetooth device.
This helps apps which don't need the extra security or
have their own security layer built on top of the rfcomm link.

Change-Id: I71b2fa8de469ef98faa204b4dafac18a8e21d0d9
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
58b93c36409c7fb91a644605f004b6d247d9b540 24-Nov-2010 Jaikumar Ganesh <jaikumar@google.com> Update BT code for voice capability cases.

1. Disable PBAP and Headset / Handsfree records.
2. Add API to query for local adapter UUIDs.

Change-Id: Ic84ba6a49738adc89a8695d3a4890f08562e0621
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
c53cab20b225ba69057441ecb06db6478ab8ff9b 27-Oct-2010 Jaikumar Ganesh <jaikumar@google.com> Add an API call to get the ConnectionState of the Bluetooth Adapter.

Change-Id: Icd87d7720189034946aaa98e1a6c5d03ef4219e5
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
980d40b568bf976eed8de7c035c2e30ddc67fa89 01-Oct-2010 Jake Hamby <jhamby@google.com> resolved conflicts for merge of 738aadd7 to master

Change-Id: I8810cc6dbd532de002d6a623ad93e86afb48c0b4
f51eadaf1f83abfe16a609a4ded6d789494689b2 21-Sep-2010 Jake Hamby <jhamby@google.com> 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
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
62c37efc9e894809b29a004c142a8e0a6b374db7 25-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> New public APIs for BluetoothA2dp and BluetoothHeadset profiles.

Change-Id: I1cc4b109542dfd62473cb95797c8c3d0d15725f4
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
0f5843069bd419fba4fb253986645dfbca0784b7 17-Sep-2010 Jake Hamby <jhamby@google.com> 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
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
cc5494c9996f809e36539b24e8b6b67683383d29 10-Sep-2010 Jaikumar Ganesh <jaikumar@google.com> Out Of Band API for Secure Simple Pairing.

Change-Id: I54ded27ab85d46eef3d2cca84f2394b1ffe88ced
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
fec86f4aa2de9c89d6c0aea6128be77eb67417d1 10-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> 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
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
f5ff170be1f6b28758f125e50524f43f9d6ec684 07-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> 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
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
af21fa61c2158fa2a693d98bb281abd56e658b40 18-May-2010 Jaikumar Ganesh <jaikumar@google.com> Removing STOPSHIP logs.

Bug: 2694602
Change-Id: Id56e1ddcf5ea76de32238cd6761f2caf053f1fa1
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
7b0463a949b57620680b95e45c66a05f67426b74 11-Dec-2009 Scott Main <smain@google.com> am ed2a70d6: docs: add the Bluetooth developer guide, and make some revisions to the BT javadocs

Merge commit 'ed2a70d6495b3f1928e36ad2b00ee4d33b2c0379' into eclair-mr2

* commit 'ed2a70d6495b3f1928e36ad2b00ee4d33b2c0379':
docs: add the Bluetooth developer guide,
ed2a70d6495b3f1928e36ad2b00ee4d33b2c0379 10-Dec-2009 Scott Main <smain@google.com> docs: add the Bluetooth developer guide,
and make some revisions to the BT javadocs
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
cb5966426a51aeb7d02e7f859512d20e084e03ed 20-Nov-2009 Scott Main <smain@google.com> am e1611399: am 6d95fc0a: docs for ESR: add docs to bluetooth explainin that discovery should be cancelled before connecting to a device

Merge commit 'e16113998bb10f39ee1384bfc497aceeeb193440' into eclair-mr2

* commit 'e16113998bb10f39ee1384bfc497aceeeb193440':
docs for ESR: add docs to bluetooth explainin that discovery should
e16113998bb10f39ee1384bfc497aceeeb193440 20-Nov-2009 Scott Main <smain@google.com> am 6d95fc0a: docs for ESR: add docs to bluetooth explainin that discovery should be cancelled before connecting to a device

Merge commit '6d95fc0a2ca910212a43c4547c0ef000659b72dc' into eclair

* commit '6d95fc0a2ca910212a43c4547c0ef000659b72dc':
docs for ESR: add docs to bluetooth explainin that discovery should
6d95fc0a2ca910212a43c4547c0ef000659b72dc 20-Nov-2009 Scott Main <smain@google.com> docs for ESR: add docs to bluetooth explainin that discovery should
be cancelled before connecting to a device

bug: 2160782,2198463
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
b262f50af9ad22837af9e88e6c8f71b44cdefd56 10-Nov-2009 Scott Main <smain@google.com> am 13ce56bd: am 88427cff: Merge change Ibcfb7d10 into eclair-sdk

Merge commit '13ce56bdbc4872c0b12caff501e063f5a75073db' into eclair-mr2

* commit '13ce56bdbc4872c0b12caff501e063f5a75073db':
docs: add more documentation for the bluetooth apis.
13ce56bdbc4872c0b12caff501e063f5a75073db 10-Nov-2009 Scott Main <smain@google.com> am 88427cff: Merge change Ibcfb7d10 into eclair-sdk

Merge commit '88427cff609e668185010af2244500be5823595e' into eclair

* commit '88427cff609e668185010af2244500be5823595e':
docs: add more documentation for the bluetooth apis.
9fab0aef19a4633d2e4670564e5d7ae9e52fe11f 04-Nov-2009 Scott Main <smain@google.com> docs: add more documentation for the bluetooth apis.

more descriptions for some of the classes and a new
overview and pseudo-code example for using BT APIs
in the package summary.
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
811f655366461d0f21f970bcac07dd2084fd54fa 06-Nov-2009 Michael Chan <mchan@android.com> am 8d51f710: Merge change Icdd2864e into eclair

Merge commit '8d51f7101d2427953dbff9b4b8f8c9fdc0dc4a91' into eclair-mr2

* commit '8d51f7101d2427953dbff9b4b8f8c9fdc0dc4a91':
b/2234854 Fixed Bluetooth API return codes for requesting permission to enable bluetooth
cdd2864eb340fe46a97f4991f3949db1196bdde8 06-Nov-2009 Michael Chan <mchan@android.com> b/2234854 Fixed Bluetooth API return codes for requesting permission to enable bluetooth
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
bf2efbc0642d07acee1a83c17987abb380e5243a 30-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> am 3cf254d2: Merge change I4b3db907 into eclair

Merge commit '3cf254d2ba303da3354ed65fd7f3136e87a56b9f' into eclair-mr2

* commit '3cf254d2ba303da3354ed65fd7f3136e87a56b9f':
Revert the channge where channels were not selected randomly.
4b3db907f04d85cd20e0a0e35056ba44a10e8867 30-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> Revert the channge where channels were not selected randomly.

The Bluez SDP bug has been fixed.
Reverting parts of the commit: 16fb88a673c41b93c5d57ccb28c2697e7d87701a

Bug: 2173752
Dr No: Eastham
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
db7ae10d6b8e86ff5311512de45afa65a1b0a738 09-Oct-2009 Nick Pelly <npelly@google.com> Remove STOPSHIP BT logging.

Do not merge.

Change-Id: I428bc0fc67030f24112f2e9c865824dfaea4897d
DrNo: eastham
Bug: 2089423
Joke: Why was Tigger looking in the toilet? To find Pooh
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
e6ee3be1c254404dad842298f6f56c11cc6c7ac8 08-Oct-2009 Nick Pelly <npelly@google.com> BT API security audit: fix a couple of permission mistakes.

Make functions that are meant to be BLUETOOTH_ADMIN really
BLUETOOTH_ADMIN.

Add some missing javadoc for permissions.

The only functional change here is the BLUETOOTH->BLUETOOTH_ADMIN
changes. This is super safe because every system app that uses BT
has both permissions.

Change-Id: Iddc61f9fd5d81fe0171358665a0fa52f2fa02871
DrNo: eastham
Joke: How do you catch a rabbit? Hide behind a tree and make carrott noises.
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
f242b7b931898856bcbcb7ec36cacf43098ba544 08-Oct-2009 Nick Pelly <npelly@google.com> Introduce BluetoothAdapter.getDefaultAdapter().

This is the main entry point to the Bluetooth APIs, and returns the default
local Bluetooth adapter.

It replaces context.getSystemService(Context.BLUETOOTH_SERVICE). This was
never in a public SDK release.

DrNo: eastham
Bug: 2158765
Joke: Why can't you play cards in the jungle? Because there's too many cheetas!
Change-Id: Ieed8be009ee5aba621cb69090ee8c8a9c19c840d
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
16fb88a673c41b93c5d57ccb28c2697e7d87701a 07-Oct-2009 Nick Pelly <npelly@google.com> Encourage developers to connect RFCOMM by UUID instead of Channel.

Hide createRfcommSocket(int channel)
Add createRfcommSocketWithServiceRecord(UUID uuid)

Rename listenUsingRfcomm(String,UUID) -> listenUsingRfcommWithServiceRecord(..)

Now we have a complete API for developers to make peer-peer RFCOMM connections
with hard-coding the limited (30) RFCOMM channels, instead using SDP lookup
of an UUID.

This commit addresses two serious bugs:
- Do not throw IOException on accepting an incoming RFCOMM connection with
BluetoothSocket. This was a regression from commit 24bb9b8af4ff6915
- Workaround failure of bluez to update SDP cache when channel changes by
trying to use the same RFCOMM channel on the server every time, instead
of picking server channels randomly. This is a pretty ugly workaround,
and we are still trying to fix the caching issue - but with this
workaround we are at least shippable and apps will work at least until
they start colliding on the 30 RFCOMM channels.

DrNo: eastham
Bug: 2158900
Joke: What did the digital watch say to his mom? "Look mom no hands."
Change-Id: Ia4879943b83afac06b6f1a3f2391cf1628afce7d
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
24bb9b8af4ff691538fe9e517e8156016b0da6cd 03-Oct-2009 Nick Pelly <npelly@google.com> Provide an API for apps to use a dynamic RFCOMM channel and SDP record.

Hide listenUsingRfcommOn(int channel)
Add listenUsingRfcomm(String name, ParcelUuid uuid)

The new API automatically finds a free RFCOMM channel and registers an SDP
record with the given uuid and name. The SDP record is automatically
removed when the socket is closed, or if the application dies.

Apps are prevented from registering SDP records with the uuid of system
Bluetooth profiles, such as A2DP, HFP and OPP.

Apps are prevented from removing SDP records that they did not create. This is
tracked by pid.

TODO: Provide an API for the connecting app to look up an SDP record.

Bug: 2158900
DrNo: eastham
Joke: "What did the dog say to the tree? bark."
Change-Id: Ia92f51c34615a7270a403255ad2b8faa98c4a3f5
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
aef439e6f825c0cb99a2ac08c8207f48b7a9fe10 28-Sep-2009 Nick Pelly <npelly@google.com> Move android.bluetooth.ParcelUuid to android.os.ParcelUuid

Change-Id: I564429d5c5b6a5372b6ff26a53b0d7e518b53631
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
1acdcc1a508c00dc31751a2a2eef539a59cb21ce 28-Sep-2009 Nick Pelly <npelly@google.com> Add an API to request a system activity to turn on Bluetooth.

Change-Id: I2fca33ad27017ea4e2ecba37854b749682d07672
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
12835478ee687a493d1b5882e67b6725bd539c26 26-Sep-2009 Nick Pelly <npelly@google.com> Handle expiration of discovery mode in system server.

Change-Id: I58fd199b40ffdf8168a5489be8eedb5d25d56722
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
3219ab4de27cd40b2149b0dd13edd412efe40244 25-Sep-2009 Brad Fitzpatrick <bradfitz@google.com> Fix typo in Bluetooth docs.
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
18b1e79a123b979d25bfa5d0b0ee5d0382dbd64b 24-Sep-2009 Nick Pelly <npelly@google.com> Bluetooth API: Do not allow apps to programmatically make BT discoverable.

Instead add ACTION_REQUEST_DISCOVERABLE for the system to show a dialog to
adjust discoverable mode.

Also remove createBond(), removeBond() and cancelBondProcess(). The Settings
App already handles these automatically when connections require bonding.

Change-Id: I216154cd1b6de410de64ba91b07d7263ac03e8df
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
55e66f1b739097095f6b3c47f88de258898fc1c9 18-Sep-2009 Nick Pelly <npelly@google.com> Reject lowercase characters in checkBluetoothAddress().

This keeps consistency with Bluez which uses upper case string address. It's
important to keep the case the same so that .equals() in BluetoothService.java
work.

Change-Id: I6404ca137d0aec3cc2e6e7cb79763d5305a03547
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
005b228cdfb369d9b3b325884c0337ba5968bf8c 10-Sep-2009 Nick Pelly <npelly@google.com> API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.

This is a large batch, and covers:

-- Bluetooth Device Discovery --
BluetoothAdapter.ACTION_DISCOVERY_STARTED
BluetoothAdapter.ACTION_DISCOVERY_FINISHED
BluetoothAdapter.startDiscovery()
BluetoothAdapter.cancelDiscovery()
BluetoothAdapter.isDiscovering()

-- Bluetooth bonding (pairing) --
BluetoothAdapter.getBondedDevices()
BluetoothDevice.ACTION_BOND_STATE_CHANGED
BluetoothDevice.EXTRA_BOND_STATE
BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE
BluetoothDevice.BOND_NONE
BluetoothDevice.BOND_BONDING
BluetoothDevice.BOND_BONDED
BluetoothDevice.getBondState()
BluetoothDevice.createBond()
BluetoothDevice.cancelBondProcess()
BluetoothDevice.removeBond()

-- BluetoothClass --
BluetoothDevice.ACTION_CLASS_CHANGED
BluetoothDevice.EXTRA_CLASS
BluetoothDevice.getBluetoothClass()
BluetoothClass.Service.*
BluetoothClass.Device.Major.*
BluetoothClass.Device.*
BluetoothClass.getDeviceClass()
BluetoothClass.getMajorDeviceClass()
BluetoothClass.hasService()

-- Misc BluetoothDevice --
BluetoothDevice.ACTION_ACL_CONNECTED
BluetoothDevice.ACTION_ACL_DISCONNECTED_REQUESTED
BluetoothDevice.ACTION_ACL_DISCONNECTED
BluetoothDevice.ACTION_DISCOVERED
BluetoothDevice.ACTION_NAME_CHANGED
BluetoothDevice.EXTRA_DEVICE
BluetoothDevice.EXTRA_NAME
BluetoothDevice.EXTRA_RSSI

-- Misc BluetoothAdapter --
BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED
BluetoothAdapter.EXTRA_LOCAL_NAME
BluetoothAdapter.checkBluetoothAddress()

I deprecated BluetoothIntent and moved each intent into the class it relates
to.

Change-Id: I877b1280428ab46278b2bc25668bb44cda22dc36
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
b24e11baac589fe16426f2d243b460ab84991c7b 09-Sep-2009 Nick Pelly <npelly@google.com> API_CHANGE

Deprecate BluetoothError.java.

I spent a lot of time experimenting with a class BluetoothError to enumerate
the many error codes returned by the Bluetooth API. But at the end of the day
they were never used. The vast majority of method calls only really need a
true/false error value, and often not even that.

Methods which do need more detailed error enumeration (for example, bonding
failures) can have there own enumerated error codes. But there is no need
for a common set of error codes.

Also change the IPC failed warnings in BluetoothA2dp to Log.e. These indicate
a very serious error.

Introduce BluetoothAdapter.ERROR and BluetoothDevice.ERROR as helper sentinel
values.
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
de893f550301a60274e87aa8168225e7a7a42184 08-Sep-2009 Nick Pelly <npelly@google.com> API_CHANGE

Another round of Bluetooth API clean up, javadoc'ing and unhide'ing.

-- Symbols for getting/setting bluetooth state --
BluetoothAdapter.ACTION_STATE_CHANGED
BluetoothAdapter.EXTRA_STATE
BluetoothAdapter.EXTRA_PREVIOUS_STATE
BluetoothAdapter.STATE_OFF
BluetoothAdapter.STATE_TURNING_ON
BluetoothAdapter.STATE_ON
BluetoothAdapter.STATE_TURNING_OFF
BluetoothAdapter.isEnabled()
BluetoothAdapter.getState()
BluetoothAdapter.enable()
BluetoothAdapter.disable()

-- Symbols for getting/setting scan mode --
BluetoothAdapter.ACTION_SCAN_MODE_CHANGED
BluetoothAdapter.EXTRA_SCAN_MODE
BluetoothAdapter.EXTRA_PREVIOUS_SCAN_MODE
BluetoothAdapter.SCAN_MODE_NONE
BluetoothAdapter.SCAN_MODE_CONNECTABLE
BluetoothAdapter.SCAN_MODE_DISCOVERABLE
BluetoothAdapter.getScanMode()
BluetoothAdapter.setScanMode()

-- Symbols for getting address/names --
BluetoothAdapter.getAddress()
BluetoothAdapter.getName()
BluetoothAdapter.setName()
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
cf44059813539bf7f36dabd278cef93ba3122c56 08-Sep-2009 Nick Pelly <npelly@google.com> Add javadoc to explain which permissions are required for Public BT API's.
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
71c3c7806acb2b2b7b8441817c26a2101d447bbe 02-Sep-2009 Nick Pelly <npelly@google.com> Immediately destroy BluetoothSocket's on close().

Unfortunatley, shutdown() on the underlying fd does not actually stop a
listening socket from listening. You need to call close() on the fd to
do this. There is no way around it.

So this means the Java BluetoothSocket code has to call destroyNative() during
BluetoothSocket.close().

Since native methods cannot be called after destroyNative(), add a ReadWrite
lock and mClosed field to protect access to native methods.

This fixes the "resource busy" error when Bluetooth OPP and Bluetooth PBAP
tried to resume listening after turning BT off and then on.
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
45e2704ff512d41e22af2801d76e96955469ce8d 19-Aug-2009 Nick Pelly <npelly@google.com> API CHANGE

Javadoc, and unhide the first pieces of the Bluetooth API.

With this commit there is enough public API to connect and use an RFCOMM
connection between Bluetooth devices.
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java
bd022f423a33f0794bb53e5b0720da2d67e4631c 15-Aug-2009 Nick Pelly <npelly@google.com> Bluetooth: API change.

Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
(pair, connect, etc).

IBluetoothDevice.aidl -> Bluetooth.aidl
BluetoothDeviceService.java -> BluetoothDeviceService.java

TODO:
Javadoc
/frameworks/base/core/java/android/bluetooth/BluetoothAdapter.java