aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothAdapter.java
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Change Bluetooth HID Profile Name (1/11)Hansong Zhang2017-10-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the Bluetooth HID profile name consistent with the Bluetooth HID service name. BluetoothInputHost → BluetoothHidDevice BluetoothInputDevice → BluetoothHidHost IBluetoothInputHost → IBluetoothHidDevice IBluetoothInputDevice → IBluetoothHidHost BluetoothProfile.INPUT_HOST → BluetoothProfile.HID_DEVICE BluetoothProfile.INPUT_DEVICE → BluetoothProfile.HID_HOST Bug: 68055651 Test: make Change-Id: Iadb890a54dd3d6868b87514472bbac6bb0c6179f
* | | Add SystemApis annotationsSelim Gurun2017-10-171-0/+2
|/ / | | | | | | | | | | | | | | | | 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
* | Modify Bluetooth Class of Device from Android stackPulkit Bhuwalka2017-09-201-0/+23
| | | | | | | | | | | | | | | | Bug: 36015415 Test: Modified Class of Device using sample app and verified device icon change when discovering from a remote device. Change-Id: Ie25f10be5560f9c090ebe489d5f3bb00cbca81ef
* | Fix checkstyle errors (2/2)Jack He2017-08-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-224/+274
|/ | | | | | | | * Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
* Merge "Bluetooth: minor documentation fix to de-confuse" am: 5a56873612Marie Janssen2017-06-231-7/+8
|\ | | | | | | | | | | am: 3205ff1331 Change-Id: I0cd44ad8d22da154d0bf666b9075a3fcbc655439
| * Bluetooth: minor documentation fix to de-confuseMarie Janssen2017-06-221-7/+8
| | | | | | | | | | | | | | | | | | | | | | It was somewhat unclear which is the preferred method of retrieving a BluetoothAdapter. Make it clear that using BluetoothManager is preferred, and remove references to the old method in BluetoothManager docs since it is only avaialable in API 18 or higher. Test: recompile, check that documentation is updated Fix: 33355430 Change-Id: Ia20b4e45dca03bc2f13c2ab477799b89c5e14f45
| * Limit btsnoop file size (3/8)Ajay Panicker2017-04-271-22/+0
| | | | | | | | | | | | | | | | | | | | | | Limit btsnoop file size by rotating between snoop files. The rotation occurrs when a fixed number of packets have been logged and will start overwriting the older file. Bug: 35998031 Test: Enable snoop logs from developer options and let logs get large Merged-In: I40d5da4c1b1c9b45908e5790d130f1c5e804c773 Change-Id: I40d5da4c1b1c9b45908e5790d130f1c5e804c773
| * Bluetooth: improve getLeMaximumAdvertisingDataLength commentJakub Pawlowski2017-04-211-2/+2
| | | | | | | | | | | | Bug: 37534792 Test: none Change-Id: Ieff71356aceb0e2a4c6e81d9053f854448e0c927
| * Allow the Bluetooth MAC address to be updated asynchronously (2/3)Stanley Tng2017-04-201-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are intermittent issues where either the returned Bluetooth MAC address to Java framework is uninitialized or this address update arrives too late. This fix will do 2 things: (1) Returns error when MAC address is unavailable in the native code. (2) Updates the MAC address later by adding a new broadcast event. Test: Check address for these cases: factory reset, system reboot, and Bluetooth re-enable. Bug: 36709382 Change-Id: I09720193e38fdf9139e1bb146f8e1847e2b65b1a
| * Merge "Hide periodic scanning"Jakub Pawlowski2017-03-301-0/+1
| |\ | | | | | | | | | | | | | | | am: 202db17c78 Change-Id: Icedae1d34de063d6b708a30bdc6217d48ed373ef
| | * Hide periodic scanningJakub Pawlowski2017-03-291-0/+1
| | | | | | | | | | | | | | | | | | Bug: 30622771 Test: manual Change-Id: I5d786b13cf99287732e16769e2563ac7c4fe715c
* | | Limit btsnoop file size (3/8)Ajay Panicker2017-04-301-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limit btsnoop file size by rotating between snoop files. The rotation occurrs when a fixed number of packets have been logged and will start overwriting the older file. Bug: 35998031 Test: Enable snoop logs from developer options and let logs get large Change-Id: I40d5da4c1b1c9b45908e5790d130f1c5e804c773 (cherry picked from commit 7e2e61ee2e3f46fa0e4bee82028b36a0f2aa22d5)
* | | Merge "More auto-doc work." into oc-devJeff Sharkey2017-04-221-24/+0
|\ \ \
| * | | More auto-doc work.Jeff Sharkey2017-04-211-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for AnyThread, CallSuper, and UiThread. Another related CL started documenting @RequiresPermission, so remove duplicated information in existing APIs. Suppress auto-doc on a handful of classes that are already well-documented. Test: make -j32 offline-sdk-docs Bug: 37526420 Change-Id: I791437dccec0f11d5349a23b982ba098cb551af8
* | | | Merge "Allow the Bluetooth MAC address to be updated asynchronously (2/3)" ↵TreeHugger Robot2017-04-221-0/+24
|\ \ \ \ | | | | | | | | | | | | | | | into oc-dev
| * | | | Allow the Bluetooth MAC address to be updated asynchronously (2/3)Stanley Tng2017-04-211-0/+24
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are intermittent issues where either the returned Bluetooth MAC address to Java framework is uninitialized or this address update arrives too late. This fix will do 2 things: (1) Returns error when MAC address is unavailable in the native code. (2) Updates the MAC address later by adding a new broadcast event. Test: Check address for these cases: factory reset, system reboot, and Bluetooth re-enable. Bug: 36709382 Change-Id: I09720193e38fdf9139e1bb146f8e1847e2b65b1a (cherry picked from commit ad4d1d8e28618546953e75d4983335631feb6f2a)
* / / / Bluetooth: improve getLeMaximumAdvertisingDataLength commentJakub Pawlowski2017-04-211-2/+2
|/ / / | | | | | | | | | | | | | | | | | | Bug: 37534792 Test: none Change-Id: Ieff71356aceb0e2a4c6e81d9053f854448e0c927 (cherry picked from commit 4634b5cd27b274105e550f58f9d5fc51c79eb3fb)
* / / Hide periodic scanningJakub Pawlowski2017-03-311-0/+1
|/ / | | | | | | | | | | | | Bug: 30622771 Test: manual Change-Id: I5d786b13cf99287732e16769e2563ac7c4fe715c (cherry picked from commit 409577c38a97b1a919236ba655d5872ca158b77c)
* | Merge "LE Maximum Advertising Data Length (1/4)"Jakub Pawlowski2017-03-171-0/+19
|\| | | | | | | | | | | am: 74f2e1a303 Change-Id: I3b6599937ddd04a9c13573d156cc721152c0005a
| * LE Maximum Advertising Data Length (1/4)Jakub Pawlowski2017-03-161-0/+19
| | | | | | | | | | | | | | | | Add ability to check maximum advertising data length. Bug: 30622771 Test: manual Change-Id: I281f7e9f294c40a47a67a22809cc753b6693f7c4
* | Merge "Bluetooth 5 spelling fixes"Jakub Pawlowski2017-03-131-2/+2
|\| | | | | | | | | | | am: d45b027955 Change-Id: Ibef8ee6a56bf1f8c695e07e4ba61c015054eee13
| * Bluetooth 5 spelling fixesJakub Pawlowski2017-03-131-2/+2
| | | | | | | | | | | | | | Bug: 30622771 Test: manual Change-Id: I46b6486619cc7366e56b25ca48937e6792f53e1d (cherry picked from commit 53501ad210dd5c65c7910a6b75b2b481e92dd22f)
* | Merge "Bluetooth 5 periodc scan API (1/2)"Jakub Pawlowski2017-03-081-0/+26
|\| | | | | | | | | | | am: e3bcff433b Change-Id: I7b68746e3dc02a12d13380a90bcf26cebfd31f16
| * Bluetooth 5 periodc scan API (1/2)Jakub Pawlowski2017-03-081-0/+26
| | | | | | | | | | | | | | Bug: 30622771 Test: manual Change-Id: I61853bc71f6013e9406d1d151bb51ea4484bb92c (cherry picked from commit a48e03745becc96181c676dc3d194d0572f11c10)
* | Merge "Bluetooth 5 feature check API (1/2)"Jakub Pawlowski2017-03-081-0/+72
|\| | | | | | | | | | | am: eed95db01e Change-Id: I59cf0e8f496e6a1201a3a6ec832c33cd1c8972df
| * Bluetooth 5 feature check API (1/2)Jakub Pawlowski2017-03-081-0/+72
| | | | | | | | | | | | | | Bug: 30622771 Test: manual Change-Id: I90e2efe989745c07c2f2fb8f4ea5bc3b718382f6 (cherry picked from commit 79d66495c32996a5b532328571bf6ceecca70ca5)
* | Merge "Bluetooth: Expose L2CAP API to support OPP 1.2"Hemant Gupta2017-03-081-0/+29
|\| | | | | | | | | | | am: 79eb213a98 Change-Id: I5f82a0c40c64fca0701abba44693b2892209acf3
| * Bluetooth: Expose L2CAP API to support OPP 1.2Hemant Gupta2017-03-071-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Add changes to expose L2CAP API to create an insecure L2CAP socket for supporting OPP 1.2. Test: Connect with Remote OPP Client supporting OPP 1.2 and verify that connection and transfer happens over L2CAP. Connect with Remote OPP Client supporting OPP 1.1 and verify that connection and transfer happens over RFCOMM. Bug: 33010988 Change-Id: I21ed672afb4ed5d2355ff0a0f9691af220921c1f
* | Merge "Bluetooth: add getDiscoveryEndMillis() call" am: 1785fc4eeaMarie Janssen2017-01-301-0/+19
|\| | | | | | | | | | | am: 88c27ede3c Change-Id: I6f02c4ddc0fe56cda5af2dcf2f5193ba13522792
| * Bluetooth: add getDiscoveryEndMillis() callMarie Janssen2017-01-271-0/+19
| | | | | | | | | | | | | | | | | | Method to tell when the adapter finished (or will finish) being in discovery mode. Test: compiles and still can scan Bug: 34395439 Change-Id: I41b48c2b934c0a1d5e1727cec08f3f762e3cb309
* | Fix profiles broken by ag/1751147Ivan Podogov2016-12-301-0/+7
|\ \ | | | | | | | | | | | | | | | am: b6e4b12d1e Change-Id: I9c0a4ead26f60b601847c1ba73e6b492a3611880
| * | Fix profiles broken by ag/1751147Ivan Podogov2016-12-301-0/+7
| | | | | | | | | | | | Change-Id: Ifa92819df8e63355a3979ea0f1a20a0363b6cd45
* | | resolve merge conflicts of 45d205f to nyc-mr1-dev-plus-aospMarie Janssen2016-12-291-73/+33
|\| | | | | | | | | | | Change-Id: I42e00b90165220d88519771b8f4280aaf3a07525
| * | resolve merge conflicts of 5feadc6 to stage-aosp-masterMarie Janssen2016-12-291-76/+60
| |\| | | | | | | | | | Change-Id: Ia1cdf49d77a574c38ed5cc33c31d5cf930103484
| | * Merge "Bluetooth: track enabling in dumpsys"Marie Janssen2016-12-291-66/+33
| | |\
| | | * Bluetooth: track enabling in dumpsysMarie Janssen2016-12-291-66/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move basic state dumpsys to here from AdapterService. Track which apps are enabling and disabling Bluetooth, including BLE apps, and show the apps in the dumpsys logs. Test: start phone and enable/disable, take bug report Bug: 33692282 Change-Id: I6ea62ebdcfd7873d0be1bb5c5c520bbce3737a40
* | | | Rename the Bluetooth profile classes for HID Device role. am: 5fabc4426eIvan Podogov2016-12-291-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | am: 5a3deadde2 Change-Id: I97ff93fd2564bd76d90095f8086f79c6c6086aff
| * | | Rename the Bluetooth profile classes for HID Device role.Ivan Podogov2016-12-291-5/+5
| |\| | | | | | | | | | | | | | | | | | | | | | am: 5fabc4426e Change-Id: Ib5c9b904da57048d719df504142edd3dab0e6ec3
| | * | Rename the Bluetooth profile classes for HID Device role.Ivan Podogov2016-12-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have BluetoothInputDevice class, so adding something called BluetoothHidDevice seems confusing. On the other hand, the new class is designed to connect to HID Host devices, so naming it BluetoothInputHost makes sense and goes in line with the existing BluetoothInputDevice. The same goes for the new constant HID_DEVICE that is just as confusing to have together with the INPUT_DEVICE one. This CL also renames the "connection state changed" broadcast (for the same reasons), declares it as an SDK constant, and also adds some javadoc to it. Note that BluetoothHidDeviceApp* classes remained unchanged, as those correspond to the app that implements the Device (and connects to the Host). Test: make Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
* | | | Bluetooth: Add support for HID Device Role am: 7d82a61d97Hemant Gupta2016-12-291-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | am: 28e0a5494f Change-Id: Ic48911d254671d402f5a6b8198109f28e6497036
| * | | Bluetooth: Add support for HID Device RoleHemant Gupta2016-12-291-0/+7
| |\| | | | | | | | | | | | | | | | | | | | | | am: 7d82a61d97 Change-Id: Ic2a82d5670ffbd3046766d73ed9b180546c59169
| | * | Bluetooth: Add support for HID Device RoleHemant Gupta2016-12-291-0/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the HID Device Role support in Bluetooth framework. Also AIDL and callback related files for HID Device role are added to provide interface for third party applications to communicate with HID Device Service. Change-Id: Id03a362b7bcfa2e76056fa0197eaac12ce49b5a2
* | | resolve merge conflicts of 23228c6 to nyc-mr1-dev-plus-aospMarie Janssen2016-12-141-65/+32
|\| | | | | | | | | | | Change-Id: I903680717ed121a93fee3b7c2ed358cb29726d71
| * | Merge "Bluetooth: log message improvements"Marie Janssen2016-12-141-93/+36
| |\| | | | | | | | | | | | | | | | am: c1b40c2172 Change-Id: Ic89c59257559d95119829fa4157dbb763124e86f
| | * Bluetooth: log message improvementsMarie Janssen2016-12-141-65/+32
| |/ | | | | | | | | | | | | | | | | | | | | | | Some log improvements: - Reduce logspam - Use names for states in logs instead of numbers - Be more consistent with messages Also remove some commented out dead code. Test: run on phone, observe more useful logs Change-Id: I32163278e148be144c03d4e8aaf0eb761226c94c
| * DO NOT MERGE Add Bluetooth toggle prompts - frameworkSvetoslav Ganov2016-12-121-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If permission review is enabled toggling bluetoth on or off results in a user prompt to collect consent. This applies only to legacy apps, i.e. ones that don't support runtime permissions as they target SDK 22. Also added a configuration resource which controls whether permission review mode is enabled. By default it is not and an OEM can change this via an overlay. For now we also keep the old mechanism to toggle review mode via a build property which is still used and will be removed when clients have transitioned. bug:28715749 Change-Id: I77bca2305f9d0f20034b2c8fc5b58e0565d5e617
* | resolve merge conflicts of 5682fb8 to nyc-mr1-dev-plus-aospIvan Podogov2016-12-131-4/+28
|\ \ | | | | | | | | | | | | Test: build police Change-Id: Ifec1ab6760ebb94b0b411c9c60f07066e151206b
| * | Add Bluetooth toggle prompts - frameworkSvetoslav Ganov2016-12-021-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If permission review is enabled toggling bluetoth on or off results in a user prompt to collect consent. This applies only to legacy apps, i.e. ones that don't support runtime permissions as they target SDK 22. Also added a configuration resource which controls whether permission review mode is enabled. By default it is not and an OEM can change this via an overlay. For now we also keep the old mechanism to toggle review mode via a build property which is still used and will be removed when clients have transitioned. bug:28715749 Change-Id: I94c5828ad6c8aa6b363622a26ff9da4fc2e2fac7
| * | Bluetooth: prevent enabling BLE in airplane modeMarie Janssen2016-10-271-11/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | am: 167b3c5e92 Change-Id: I05a57fa747abedab24e0509c1fb7ab8737b2256a