aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothDevice.java
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge changes from topics "merge BT bond", "parameterize BT enable", "remove ↵Zach Johnson2019-12-061-32/+3
|\| | | | | | | | | | | | | | | | | | | | | | | BT isEnabled" am: e21e52f29d am: 78674f58e1 am: 0c977d9e85 Change-Id: Ie90be956ab6e52602ee72fa224ef471bb7bade38
| * | Merge changes from topics "merge BT bond", "parameterize BT enable", "remove ↵Zach Johnson2019-12-061-32/+3
| |\| | | | | | | | | | | | | | | | | | | | | | BT isEnabled" am: e21e52f29d am: 78674f58e1 Change-Id: Id6f1c11c447ff1896b5df81a7625a643ecebce46
| | * Collapse the implementations of BluetoothDevice.createBondZach Johnson2019-11-261-32/+3
| |/ |/| | | | | | | | | | | | | The backend is now a single function. Remove duplicate code/ Bug: 145171640 Test: compile, and try pairing Change-Id: I04e8f95430d0de245926e849ea71eff030294bc1
| * DO NOT MERGE Revert "Merge "Revert "Re-add getAliasName to fix build ↵Rahul Sabnis2019-11-191-0/+18
|/ | | | | | | | | | | breakage"" am: 2ad71dd2fc" This reverts commit 99734c8977ce1128e431cf75907575fab9a68c1a, reversing changes made to d26ea8807f7337a7e540944921932db9277b46a7. Bug: 144619932 Test: Manual Change-Id: Ie9a46c9527004759a250dc71d2a1065ff3bb7328
* Revert "Re-add getAliasName to fix build breakage"Rahul Sabnis2019-11-181-18/+0
| | | | | | | | This reverts commit 4d42daa9c2f6303729e55a97179c4ebce16dc9ee. Reason for revert: Removing method again and will make changes on internal to prevent breakage Change-Id: I41cb918df90a203fd6a03f4b51464300de9428f8
* Re-add getAliasName to fix build breakageRahul Sabnis2019-11-161-0/+18
| | | | | | Bug: 144619887 Test: Manual Change-Id: Ib4f3582a1c9cb8cbcb14fece6a3ab463b3400cea
* Refactor methods to access/modify BluetoothDevice alias and nameRahul Sabnis2019-11-141-28/+13
| | | | | | Bug: 142352567 Test: Manual Change-Id: I86bb69faed1c6d46ac668816e6081bd1673fbf85
* Merge "Document public alternatives to greylisted APIs" am: 39977db7ffAndrei-Valentin Onea2019-06-191-3/+4
|\ | | | | | | | | | | am: 3641066567 Change-Id: Ia21d1ce57a2cbffe8b417d6f1d5535924c7ea162
| * Document public alternatives to greylisted APIsAndrei Onea2019-06-171-3/+4
| | | | | | | | | | | | | | | | | | Add known public alternatives or recommendations for greylisted APIs in Bluetooth. Bug: 135171386 Test: m Change-Id: I86e708be37eb7d1b0fafa2d64283b7f81bc02e51
* | Merge "Add more documentation for LE CoC" am: cb43dd0c10Stanley Tng2019-04-211-1/+2
|\| | | | | | | | | | | am: da2026bbf4 Change-Id: I0bfadf9c0d1ad3bade5ea2cf5d606c616cf8d4a0
| * Merge "Add more documentation for LE CoC"Treehugger Robot2019-04-221-1/+2
| |\
| | * Add more documentation for LE CoCStanley Tng2019-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added more information into Android SDK for LE Connection-oriented Channels (CoC) so that it matches the corresponding RFComm documentation. Bug: 70683224 Test: Compile Change-Id: I40abde70a7ca6bcd194ee75bd8367c0ed9e97d05
| * | Refine Bluetooth Metadata APIUgo Yu2019-04-011-24/+43
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Modify MetadataListener to as an interface and rename it to OnMetadataChangedListener - Fix typo UNTHETHERED -> UNTETHERED - Add NonNull annotation for metadata API parameters - Re-design metadata unregister API - Change metadata type to byte array Bug: 124448651 Bug: 126701203 Bug: 126699213 Test: build pass Change-Id: I79460071c7693f648e92cf849738c24f8bc269d9 Merged-In: I79460071c7693f648e92cf849738c24f8bc269d9
* | Refine Bluetooth Metadata APIUgo Yu2019-04-081-24/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Modify MetadataListener to as an interface and rename it to OnMetadataChangedListener - Fix typo UNTHETHERED -> UNTETHERED - Add NonNull annotation for metadata API parameters - Re-design metadata unregister API - Change metadata type to byte array Bug: 124448651 Bug: 126701203 Bug: 126699213 Test: build pass Change-Id: I79460071c7693f648e92cf849738c24f8bc269d9
* | Merge "Refine Bluetooth silence mode API" am: c650674397 am: 980c5df77fUgo Yu2019-03-311-20/+9
|\| | | | | | | | | | | am: bd5c7f40ca Change-Id: Ie5dfde6a063209acf61846438b6f507ef24f9716
| * Refine Bluetooth silence mode APIUgo Yu2019-03-221-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | - Remove silence state extra data from ACTION_SILENCE_MODE_CHANGED intent - Rename getSilenceMode -> isInSilenceMode - Throw IllegalStateException if Bluetooth is not enabled Bug: 124448652 Test: runtest bluetooth Change-Id: I6a8d8d848249faaac34e87408dcf750073b03584
* | Merge "Add @NonNull annotations to LE CoC APIs" am: 410693250e am: 76fb1286b7Stanley Tng2019-03-121-2/+3
|\| | | | | | | | | | | am: 75ac433021 Change-Id: I674f926ff2822d311fd6f6a0cbf061a2e815b093
| * Add @NonNull annotations to LE CoC APIsStanley Tng2019-03-131-2/+3
| | | | | | | | | | | | | | | | | | | | Added NonNull annotations to the 4 LE Connection-oriented channel API in BluetoothDevice and BluetoothAdapter. Bug: 126701988 Bug: 126701989 Test: Compile only Change-Id: I2d4dc8fbd06e30c782123e01f8481d249e40ee02
| * Fix the incorrect javadoc linksNan Zhang2019-02-151-3/+1
| | | | | | | | | | | | | | | | A lot of unresolved link errors showing up after go/ag/5172152. Test: m -j docs with -lerror enabled Bug: b/116163454 Change-Id: I74d1f75e0f00015410a63e13103c28a9c84b4fe0
| * DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) intoXin Li2019-02-141-5/+5
| |\ | | | | | | | | | | | | | | | | | | stage-aosp-master Bug: 124234733 Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
* | | All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* | | Merge "Introduce system APIs for Bluetooth silence mode." am: ec8d4cb387Ugo Yu2019-01-241-0/+86
|\| | | | | | | | | | | | | | | | | am: a3ca55f81a Change-Id: Icdc5720da633f3cba7e1acb730b4ca21475d6f4b
| * | Introduce system APIs for Bluetooth silence mode.Ugo Yu2019-01-241-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Policies of silence mode: 1) If an active device (for A2DP or HFP) enters silence mode, the active device for that profile will be set to null. 2) If a device exits silence mode while the A2DP or HFP active device is null, the device will be set as the active device for that profile. 3) If a device is disconnected, it exits silence mode. 4) If a device is set as the active device for A2DP or HFP, while silence mode is enabled, then the device will exit silence mode. 5) If a device is in silence mode, AVRCP position change event and HFP AG indicators will be disabled. 6) If a device is not connected with A2DP or HFP, it cannot enter silence mode. Bug: 112323989 Test: Manual, runtest bluetooth Change-Id: If7f340de38c350f17c37f00a3a2e871876baa20d
* | | Merge "Skeleton implementation of Bluetooth metadata APIs" am: 625a1f4461Ugo Yu2019-01-231-0/+188
|\| | | | | | | | | | | | | | | | | am: 4aceaeee7d Change-Id: If532d6e87a7d863f0802084f945b12406152d666
| * | Skeleton implementation of Bluetooth metadata APIsUgo Yu2019-01-231-0/+188
| | | | | | | | | | | | | | | | | | Bug: 121051445 Test: Build pass Change-Id: I5e80210205b37294b1eb8356502ebf242e627ce4
* | | Merge "BluetoothDevice.ACTION_UUID requires BLUETOOTH_ADMIN" am: 1a80595b97Hansong Zhang2018-11-201-1/+1
|\| | | | | | | | | | | | | | | | | am: e366b162b3 Change-Id: I7ea71f54d211bf4656472b9a40cd6996507eaa18
| * | BluetoothDevice.ACTION_UUID requires BLUETOOTH_ADMINHansong Zhang2018-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the doc - intent BluetoothDevice.ACTION_UUID requries android.Manifest.permission#BLUETOOTH_ADMIN instead of #BLUETOOTH to receive. This is already enforced by Bluetooth service. Bug: 113160320 Test: manual Change-Id: I977d58e6d534f512da80bd6b13bebb515765626f
* | | Merge "Remove BluetoothDevice.ACTION_DISAPPEARED" am: 2ac8c8a3e2Jack He2018-10-121-14/+0
|\| | | | | | | | | | | | | | | | | am: 3a5ae2d7a8 Change-Id: Idc687ad7ea25b793f5ef12612e161e197d87679d
| * | Remove BluetoothDevice.ACTION_DISAPPEAREDJack He2018-10-111-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | This intent was never sent by the Bluetooth stack Fixes: 112115770 Test: make Change-Id: Iaf71aeafa21f44ec9b59c1b766c936ab7dde39f1
* | | Fix the incorrect javadoc linksNan Zhang2018-10-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | A lot of unresolved link errors showing up after go/ag/5172152. Test: m -j docs with -lerror enabled Bug: b/116163454 Change-Id: I74d1f75e0f00015410a63e13103c28a9c84b4fe0
* | | docs: fixing errors found with lint checkerkopriva2018-10-091-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | am: 985ec79824 Change-Id: Id38a4b2e21285d5d5e2a2124d76885febd3441c6
| * | docs: fixing errors found with lint checkerkopriva2018-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | through /bluetooth directory amending through /content directory Test: make ds-docs Bug: 117494359 Change-Id: I751e15d60f0b9cc441998b27560050bf62994fef Exempt-From-Owner-Approval: Docs-only change
* | | resolve merge conflicts of a3e34fe9fe4e2a8d0932e574721e5a8b94396c5e to ↵Andrew Solovay2018-10-041-4/+4
|\| | | |/ |/| | | | | | | | | | | | | | | pi-dev-plus-aosp Bug: None Test: Eyeballed (comment-only change). Change-Id: Ia644cde66376b2bddeb27bb2a147b3266037aa2c Exempt-From-Owner-Approval: Docs-only change Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
| * docs: Replacing {#link with {@linkAndrew Solovay2018-10-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several java files had the typo {#link (for cross-references to other Javadocs) instead of the proper {@link format. This was confusing the new doc publish tool (Mivi) since that's the format used for {# Django comments #}. Fixed a couple of links that had other errors (which prevented building once the {# -> {@ was done) and other typos. Replaced throughout the frameworks/base project; I'll need a separate CL for the AndroidX fixes. Staged to: go/dac-stage/reference/android/app/Instrumentation.html go/dac-stage/reference/android/bluetooth/BluetoothAdapter.html go/dac-stage/reference/android/bluetooth/BluetoothDevice.html go/dac-stage/reference/android/bluetooth/BluetoothServerSocket.html go/dac-stage/reference/android/inputmethodservice/InputMethodService.html go/dac-stage/reference/android/view/KeyCharacterMap.html go/dac-stage/reference/android/view/KeyEvent.html go/dac-stage/reference/android/media/AudioManager.html go/dac-stage/reference/android/net/wifi/WifiConfiguration.html (Other files were not in the public Javadocs.) Bug: 111925950 Test: make ds-docs Exempt-From-Owner-Approval: Docs-only change Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7 Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
* | Unhide the LE CoC APIsStanley Tng2018-09-131-22/+34
| | | | | | | | | | | | | | | | Expose the LE Connection-oriented Channels APIs for applications to use. Test: Run the SL4A ACTS test: BleCocTest Bug: 70683224 Change-Id: I68128bc7154966ec065091c973351f8892da9b4d
* | Merge "Add @UnsupportedAppUsage annotations"Mathew Inwood2018-08-061-0/+34
|\ \ | |/ |/| | | | | | | am: b40b37910d Change-Id: Ic3de9e4c6d17687d4a1f64c02026e5c0711e8fd1
| * Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-011-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.bluetooth.le android.bluetooth This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ifcf24c0617acd7facc0e03f30a95c3a6b09b205c Merged-In: I88a1311e27c5f9a5f9d1035db76034f86f650efc
* | Truncate newline and tab characters in BluetoothDevice nameHansong Zhang2018-04-261-1/+5
|/ | | | | | Test: manual Bug: 73173182 Change-Id: I7f2201cab36adf7f01d1a794d783cb78a536811f
* Merge "Added APIs for Connection-oriented channels"Treehugger Robot2018-01-181-0/+71
|\
| * Added APIs for Connection-oriented channelsStanley Tng2018-01-121-0/+71
| | | | | | | | | | | | | | | | | | Experimental and hidden APIs are defined for the Connection-oriented Channel (CoC) features. The APIs using PSM are implemented. Test: Can compile Bug: 70683224 Change-Id: Icdb5fa190b0e21881a60437fa48cd575371ee1e4
* | Make Bluetooth constants used by gmscore a system apiSelim Gurun2018-01-091-0/+3
| | | | | | | | | | | | | | | | | | These constants are used by GMSCore car module via reflection. Make them system API. Bug: 67052734 Test: Manual - and using make update-api Change-Id: I0709c0e0eb9fcb9fb29d575e9b74927a70b2a924
* | Add SystemApis annotationsSelim Gurun2018-01-051-0/+8
|/ | | | | | | | | | There are some number of places where bluetooth APIs are used via reflection from GMSCore. Add proper annotations. Bug: 67052734 Test: Manual - and using make update-api Change-Id: Ib6e3aa1ff5b6f9cdc78367f9be13ed00542d6f65 (cherry picked from commit d9bf8fb5edc93a9f8154943af8ac36e9447df9ca)
* Bluetooth: Thread-safe binder invocationJack He2017-09-061-57/+86
| | | | | | | | | | | | | | | | | | | | * Binder object may become null between null check and actual invocation if using a instance private variable assignable by service connection callbacks * The solution to this problem without locking is to assign existing binder variable to a local final variable before the null check * Any further invocation to a disconnected binder object will result in RemoteException that is caught by the try-catch block * Read and write to volatile variable is always atomic and hence thread-safe * Removed unnecessary synchronization in BluetoothAdapter constructor * Private mConnection objects should be final * Simplfied several return statements where booleans can be returned directly * Removed unnecessary catches for NPE since there won't be any Bug: 64724692 Test: make, pair and use devices, no functional change Change-Id: Ifc9d6337c0d451a01484b61243230725d5314f8e
* Fix checkstyle errors (2/2)Jack He2017-08-241-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | * Manual style corrections with IDE assistance * Variable name refactors are done through IDE * Corrected general style errors such as: - "final private var" -> "private final var" - "&&", "+", "||" should not be at the end of line - Non-static private variable should be like "mVar" - Private static variable should be like "sVar" - Code file should always end with newline - Inherited methods should be annotated with @Override and no @hide tags - Public methods should always have a JavaDoc entry - "int[] array" is preferred over "int array[]" - private methods should be accessed without "this." when there is no name collisions. - "boolean ? true : false" -> boolean - "boolean ? false : true" -> !boolean - "boolean == true" OR "boolean != false" -> boolean - "boolean != true" OR "boolean == false" -> !boolean Bug: 63596319 Test: make checkbuild, no functional changes Change-Id: Iabdc2be912a32dd63a53213d175cf1bfef268ccd
* Fix checkstyle errors (1/2)Jack He2017-08-241-217/+289
| | | | | | | | * Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
* Merge "GATT: Expose opportunistic client API to Java"Jack He2017-07-111-1/+33
|\ | | | | | | | | | | am: 13bfc36766 Change-Id: If29bc145c1947f2e10472565ae753696e8057dd1
| * GATT: Expose opportunistic client API to JavaJack He2017-07-111-1/+33
| | | | | | | | | | | | | | | | | | | | | | * Allow Java based programs to create an opportunistic GATT client * Such client does not hold a GATT connection. It automatically disconnects when no other GATT connections are active for the remote device. Bug: 63347806 Test: make, run battery service Change-Id: Ib9333817d7f17a1fa3ddacfa51c680890bac19ec
* | Merge "Add APIs to get remote device's battery level (1/2)"Jack He2017-06-281-0/+49
|\| | | | | | | | | | | am: 02b46c13ad Change-Id: Ic3253ef666632aaaffe8e1547dc563cd3bca9e37
| * Add APIs to get remote device's battery level (1/2)Jack He2017-06-271-0/+49
| | | | | | | | | | | | | | | | | | | | | | * Add BluetoothDevice.getBatteryLevel() API to retreive battery level information of remote device * Add BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED intent to notify user that remote device's battery level has changed Bug: 35874078 Test: make, pair with devices and use them Change-Id: I41051ee25383f5f3a1e505aef6f8c526385f58bd
* | Merge "Bluetooth: fix connectGatt overload invocations" am: c9f690e307Jakub Pawlowski2017-06-081-2/+2
|\| | | | | | | | | | | am: c0fed83b84 Change-Id: I871bc30dcd7aeb5c4a6f6c15d84b43dee84994f2