aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/le/AdvertisingSet.java
Commit message (Collapse)AuthorAgeFilesLines
* Reuse SynchronousResultReceivers instead of creating new.Etienne Ruffieux2022-06-221-8/+8
| | | | | | | | Bug: 217366135 Tag: #feature Test: manual Ignore-AOSP-First: to be chery-picked Change-Id: If8ae530a284151888a3f89a51d2c58f2a5cd3644
* Remove allowBlocking from BluetoothManagerServiceWilliam Escande2022-01-281-16/+39
| | | | | | | | | | | | | | | Since Bluetooth is becoming a mainline module, it can no longer call the allowBlocking hidden api. Instead, corresponding aidl are moved to be oneway and use a synchronous data to handle the return value. also: aosp/1927380 for similar work on all bluetooth profiles BluetoothGatt will be done next Bug: 211851706 Test: build + start bt Tag: #refactor Ignore-AOSP-First: merge conflict resolution Change-Id: I715cc2d8f2ae42be6d1099cd73095d37fa9e30f4
* Ensure privileged APIs require runtime permission.Jeff Sharkey2021-04-291-2/+6
| | | | | | | | | | | | | | | | | When users revoke a runtime permission, they expect all interactions to be blocked, including those protected by the BLUETOOTH_PRIVILEGED permission. This change finishes applying that policy to any remaining Bluetooth APIs which didn't already implement it. To keep the implementation straightforward, this change does "data delivery" checks when registering for callbacks; the ideal behavior would be to wait until data is actually delivered through the callbacks, but RemoteCallbackList doesn't have support for AttributionSource yet. Bug: 186405452 Test: atest BluetoothInstrumentationTests Change-Id: Idd7be143eb8baff020a0718065293baae708041b
* Pass attribution source to BT APIs.Oli Lan2021-04-221-11/+12
| | | | | | | | | | | This adds attribution source to BT method calls. This is now required to allow the app ops for the new BT permissions (BLUETOOTH_CONNECT, BLUETOOTH_ADVERTISE, and BLUETOOTH_SCAN) to be noted. Bug: 183626112 Test: atest BluetoothInstrumentationTests Change-Id: I81598553b762e491d6364064a2e1ef41dec89bf9
* More Bluetooth API annotation updates.Jeff Sharkey2021-04-161-0/+3
| | | | | | | | | | | | | | | | | | This change adds a "BluetoothPermissionChecker" that ensures that all Bluetooth permission annotations are consistent. In addition, it verifies that all Bluetooth public APIs have been audited to be permission protected where relevant. We've currently standardized on saying that APIs that return device or Bluetooth state information (without sharing details about any particular remote Bluetooth device) do not need to be permission protected. This change is only annotations and has no behavior changes. Bug: 183626724 Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true Change-Id: Ie80b15b058359bf1e9a6ee881b89cb3e5b584ca1
* Update Bluetooth API annotations.Jeff Sharkey2021-04-141-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent work has introduced a new "Nearby devices" runtime permission which protects all existing Bluetooth APIs; we've done this by defining a <split-permission> to convert the old BLUETOOTH and BLUETOOTH_ADMIN permissions into one of three new permissions: * BLUETOOTH_ADVERTISE: Required to be able to advertise to nearby Bluetooth devices. * BLUETOOTH_CONNECT: Allows applications to connect to paired bluetooth devices. * BLUETOOTH_SCAN: Required to be able to discover and pair nearby Bluetooth devices. At its core, this change begins updating the Bluetooth APIs to have correct @RequiresPermission indicating which permission is actually enforced internally. To ensure alignment across Binder, the newly added "RequiresPermissionChecker" Error Prone checker was used to discover any inconsistencies, ensuring correctness from server-side enforcement up through to the public APIs. In addition, since developers will continue building apps for both modern and legacy platforms, this change introduces new auto-doc annotations which will emit helpful consistent documentation describing the behavior of older devices that are still using the old permission model. Bug: 183626724 Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true Change-Id: I02aa127e8e07f239561f4f2a3bbdfc6fccb82f7f
* Fix checkstyle errors (2/2)Jack He2017-08-241-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-28/+25
| | | | | | | | * Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
* Bluetooth: bluetooth.le API fixesJakub Pawlowski2017-04-281-1/+1
| | | | | | | | | | Fix minor spelling problems. Throw IllegalStateException instead of IllegalArgumentException in build(). Bug: 37532634 Test: none Change-Id: I73b6f04aec98f5baffb06a363e2a3f71e8cec3c4
* Expose LE advertiser address for easier PTS tests (1/6)Jakub Pawlowski2017-04-191-1/+17
| | | | | | | | | | This patchset adds a hidden method getOwnAddress, that lets app with BLUETOOTH_PRIVILEGED permission to lear their own addreess. This is done exclusively for PTS tests. Bug: 35147497 Test: manual Change-Id: Iaf0f2fe0613de44b8430ac25e691d66a4ad44f8d
* Bluetooth 5 advertising duration refactoring (4/4)Jakub Pawlowski2017-04-011-3/+10
| | | | | | | | | Expose both duration and maximum extended advertising events to limit advertising time. Test: manual Bug: 30622771 Change-Id: I44df300995ef985526b93f8c24389775720b3432
* Bluetooth LE Advertising minor improvementsJakub Pawlowski2017-04-011-8/+30
| | | | | | | | | This patch adds some additional error checking for the advertising set parameters, and some more comments. Test: manual Bug: 30622771 Change-Id: I87bd44f4179ef63694ad3ed656dc2acc52e40f1e
* Bluetooth 5 AdvertisingSet implementation (1/4)Jakub Pawlowski2017-03-201-3/+3
| | | | | | Test: manual Bug: 30622771 Change-Id: Ia89718c0c2ab2eaa71b158ecdcae989af907769f
* Bluetooth 5 move timeout parameter (1/2)Jakub Pawlowski2017-03-171-2/+2
| | | | | | | | | Timeout is not a parameter, it is a property of enabling the advertising. Move it into more proper place. Test: manual Bug: 30622771 Change-Id: I09ebc6c770bc02938ea16a9738a7e03dc8006fde
* Bluetooth 5 Advertising APIJakub Pawlowski2017-03-081-0/+162
Test: manual Bug: 30622771 Change-Id: Id6856e6110872ec50ff1af54ddc75c0104a6459c (cherry picked from commit 5324a14cf490656269ef862d7f8f6b139a21c0e6)