aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothDevice.java
Commit message (Collapse)AuthorAgeFilesLines
...
* Change BluetoothGattCallback methods argument from BluetoothDevice to ↵Matthew Xie2013-04-031-2/+42
| | | | | | | | | | | | | BluetoothGatt Change name of BluetoothDevice#connectGattServer to BluetoothDevice#connectGatt Add BluetoothGatt#getDevice to retrieve device from BluetoothGatt Add BluetoothGatt#connect() to reconnect back to the server. Make BluetoothGatt#close() public to clean up/unregister callback Add BluetoothDevice.getType() to return int of bug 8529188 Change-Id: Iebd9ac68cc7a64c43972e617dd3068f66c8ea0b2
* Merge "Unhide Bluetooth Low Energy public APIs" into jb-mr2-devMatthew Xie2013-03-281-0/+27
|\
| * Unhide Bluetooth Low Energy public APIsMatthew Xie2013-03-281-0/+27
| | | | | | | | | | | | | | | | | | | | Updated API headers. Add BluetoothManager to be retrieved by context.getSystemService(Context.BLUETOOTH_SERVICE). LE scan functions are placed in BluetoothAdapter The GATT API are device driven instead of a profile-driver. bug 8450158 Change-Id: I424a4cedaac3ef8120a05996500008dd210d2553
* | Correct executable bit for source files [Take 2]Chirayu Desai2013-03-271-0/+0
|/ | | | | | | Change Ieb51bafb46c895a21d2e83696f5a901ba752b2c5 left out some files, this fixes them. Change-Id: Ia949a8581668836ea0251602e048f09c852f5169
* handle NullPointerException in cases where a proxySyed Ibrahim M2012-07-261-0/+6
| | | | | | | call to AdapterService is called after Adapter Service is stopped. Change-Id: I009787f03f9a013b9b06fcb7e3f6241c850f8cd2
* Fixed issue with Settings app crashing after during on/off and unpair.fredc2012-07-161-1/+17
| | | | | | Fixed issue with BluetoothAdapter.getRemoteDevice() returning null. Change-Id: Ie86813532530a6b57bde1c430c7b4875ecc7354c
* Disable debug logs in BluetoothDevice, that was turned on accidentally ↵Ravi Nagarajan2012-07-161-1/+1
| | | | Change-Id: I8a0a3f5775c2b9f5a928e4840851e687f25b57ab
* Non persistent adapter servicefredc2012-07-161-5/+52
| | | | | | | | | | | | | | | | | | 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
* Handle cancel bond for both legacy and ssp pairingRavi Nagarajan2012-07-161-1/+1
| | | | Change-Id: I7a6db3cd7b5b8e72dca988e753dcba9a8df614c8
* Added support to get a remote device's service UUIDsfredc2012-07-161-5/+3
| | | | Change-Id: I9aa47ac2bb7377aca268e95fec31c518358b3065
* Added support to cancel pairing from UI while doing SSP.Priti Aghera2012-07-161-4/+2
| | | | | The new code sends SSPReply with one of the arguments as false. Signed-off-by: Priti Aghera <paghera@broadcom.com>
* Changes for new Bluetooth APIs.Jaikumar Ganesh2012-07-131-31/+51
| | | | | | | Changes to Bluetooth Adapter, Device and IBluetooth interfaces for new Bluetooth APIs. Delete AudioGateway. Change-Id: Ib51b31187eafde261441b9311b5e7e13c8bff82f
* Get alias for Bluetooth devices.Jeff Brown2012-04-201-0/+12
| | | | | | | | | | | Bluetooth devices can be renamed by the user. Make the input system aware of the user-specified name and transparently pass it down to applications. This enables the keyboard layout picker Settings UI to use device names that are consistent with what the user set in the Bluetooth UI. Bug: 6363157 Change-Id: I8eea26ce2c69c2a3f09c8de02e9e847610e0419c
* Fix obvious typos under frameworks/base/coreKen Wakasa2012-03-091-1/+1
| | | | Change-Id: Ia5fc3db1bb51824e7523885553be926bcc42d736
* docs: Add developer guide cross-references, Project ACRE, round 4Joe Fernandez2011-12-221-0/+6
| | | | Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
* Make public APIs of ACTION_UUID, EXTRA_UUID, getUuids, and fetchUuidsWithSdpMatthew Xie2011-11-081-14/+24
| | | | | | | Give APP a way to find out if a service is supported by a remote device bug 5487202 Change-Id: I5a2d050cf24d945e1c9875963c34177ed1ce773a
* Fix build break; Revert "Make public APIs of ACTION_UUID, getUuids, and ↵Ed Heyl2011-11-081-23/+12
| | | | | | fetchUuidsWithSdp" This reverts commit 6e9f6f07aed500ecbfe7e5d7f311c402d60909b0.
* Make public APIs of ACTION_UUID, getUuids, and fetchUuidsWithSdpMatthew Xie2011-10-271-12/+23
| | | | | | | Give APP a way to find out if a service is supported by a remote device bug 5487202 Change-Id: Ie778b3227f29a24cdf61fa0365b82f9a45d439dc
* Provide an API to set the friendly name of a remote device.Matthew Xie2011-07-281-0/+48
| | | | | | | | BluetoothDevice setName overwrite the locally cached remote name. The changed name is saved in the local storage so that the change is preserved over power cycle. bug 5081605 Change-Id: I486966033828d153bfb1076a99e274c8a7f41636
* Incoming Bluetooth Connection requests - dialog.Matthew Xie2011-07-071-0/+64
| | | | | | | | This sends the intents to the Settings app to show the dialogs for the incoming connection requests. Includes down merged contributions from Jaikumar Ganesh. Change-Id: Ic8b857aad3554315aae39a0e871eb94d0ac98a91
* Improve readability of java docs for the public APIs.Jaikumar Ganesh2011-01-251-0/+18
| | | | Change-Id: I0a0f1be04ed2ea2c14498a1a2ed4b050191ec95b
* Follow the spec recommendation for keyboard pairing.Jaikumar Ganesh2011-01-061-35/+90
| | | | | | Generate a variable pin and show it to the user. Change-Id: Id4aae7a16f25c67d6c6ead6fd936cb14087f3c7a
* Expose insecure rfcomm Bluetooth API.Jaikumar Ganesh2010-12-231-0/+33
| | | | | | | | | | 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
* Typo fixes in comments and minor code cleanups.Jake Hamby2010-09-301-14/+14
| | | | | | | | | * 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
* Out Of Band API for Secure Simple Pairing.Jaikumar Ganesh2010-09-131-1/+57
| | | | Change-Id: I54ded27ab85d46eef3d2cca84f2394b1ffe88ced
* Add documentation to help developers make an RFCOMM conection to a BluetoothNick Pelly2010-02-241-0/+4
| | | | | | | serial board. They all use a well-known UUID that is not really explained anywhere official, and this always trips developers up. Change-Id: I53bda44b580f472b1ff1ad196b25485b68f4b5d5
* Add support for Car Dock.Jaikumar Ganesh2009-12-031-0/+8
| | | | | Dr No: Eastham Bug: 2133530
* docs: add more documentation for the bluetooth apis.Scott Main2009-11-091-4/+19
| | | | | | more descriptions for some of the classes and a new overview and pseudo-code example for using BT APIs in the package summary.
* BT API security audit: fix a couple of permission mistakes.Nick Pelly2009-10-091-0/+6
| | | | | | | | | | | | | | | 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.
* Set the Bond State to NONE when we receive a Agent Cancel.Jaikumar Ganesh2009-10-081-1/+5
| | | | | | | | | Sometimes during OPP, we can get stuck in Pairing state when the remote end, cancels the Pairing process - we will just get onAgentCancel and thus not set the Pairing state properly. DrNo: Eastham Bug:2174874
* Introduce BluetoothAdapter.getDefaultAdapter().Nick Pelly2009-10-081-2/+1
| | | | | | | | | | | | | 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
* Encourage developers to connect RFCOMM by UUID instead of Channel.Nick Pelly2009-10-071-17/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 ee1402d8d697be3a - 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
* Move android.bluetooth.ParcelUuid to android.os.ParcelUuidNick Pelly2009-09-281-5/+6
| | | | Change-Id: I564429d5c5b6a5372b6ff26a53b0d7e518b53631
* Bluetooth API: Do not allow apps to programmatically make BT discoverable.Nick Pelly2009-09-241-0/+3
| | | | | | | | | | 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
* Add new API for fetching UUIDs using SDP.Jaikumar Ganesh2009-09-191-0/+45
| | | | | | | | | Add new API which clients can use to force an SDP query. The result is broadcast using an intent having the UUIDs. The intent is broadcast after a timeout, in case of an error. This timeout is greater than the page timeout. Change-Id: I61e6db4c05b34c42f679a66987e37e2063a793b6
* Do not @hide Parcelable implementations in BluetoothClass and BluetoothDevice.Nick Pelly2009-09-171-3/+0
| | | | Change-Id: I92389c53a9b99c9507f78898329ff87b631c7aa3
* Change handling of remoteUuids.Jaikumar Ganesh2009-09-161-2/+2
| | | | | | Use the ParcelUuid instead of UUID Change-Id:Ie05d65a62e8a4df8182a4c737d46c14142bfec43
* Changes for BT 2.1Jaikumar Ganesh2009-09-111-3/+15
| | | | | | | | | | 1) Handle incoming 2.1 pairing requests 2) Modify displaying error messages on bond failures. 3) Add delay while accepting incoming pairing for certain 2.1 devices. When MITM is on, the link key request might come more than once. Auto accept with a delay. 4) Handle DisplayPasskey callback for pairing a 2.1 keyboard with a 2.1 device
* API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.Nick Pelly2009-09-101-87/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* API_CHANGENick Pelly2009-09-091-5/+16
| | | | | | | | | | | | | | | | | | | 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.
* API_CHANGENick Pelly2009-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()
* Add javadoc to explain which permissions are required for Public BT API's.Nick Pelly2009-09-081-0/+1
|
* Add Bluetooth Device trustLixin Yue2009-09-011-0/+27
|
* Add Bluetooth device picker supportYue Lixin2009-08-191-0/+10
| | | | | - add Intent and Extra definition - move profile filter into BluetoothClass
* API CHANGENick Pelly2009-08-191-27/+84
| | | | | | | 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.
* Bluetooth: API change.Nick Pelly2009-08-181-222/+135
| | | | | | | | | | | | | | | 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
* Initial support of 2.1 pairing.Jaikumar Ganesh2009-07-171-2/+25
| | | | | Note: Some cases have not been tested yet, as we would need to get proper UI support.
* Revert "Initial support of 2.1 pairing."Jaikumar Ganesh2009-07-171-25/+2
| | | | This reverts commit d1a0bd8fd2e21d0cceb55872571edd3b6cc332ad.
* Initial support of 2.1 pairing.Jaikumar Ganesh2009-07-171-2/+25
| | | | | Note: Some cases have not been tested yet, as we would need to get proper UI support.
* Framework changes for bluez4.Jaikumar Ganesh2009-06-091-177/+15
| | | | | Changes in the Bluetooth JNI calls and framework functions for Bluez4.