summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/le
AgeCommit message (Collapse)Author
2022-07-26Merge TP1A.220624.020Deyao Ren
Change-Id: I357db3da652d8ce93bb26a00d0f123fae1b7c64c
2022-07-01Merge "Revert "Change Bluetooth matching package name"" into t-keystone-qcom-devTreehugger Robot
2022-07-01Revert "Change Bluetooth matching package name"Sravan Voleti
This reverts commit 6b1513a43145aa63f9775fb79aa64e2e645d4339. Reason for revert: Rename Bluetooth APK CRs-Fixed: 3233822 Change-Id: I04f5faf86a85f1a80d26e99cb0547609be696a66
2022-06-30Revert "Revert "Reuse SynchronousResultReceivers instead of creating new.""Neha Jain
This reverts commit dd85e91cea26c7f706af36c852e79d5b4ca1f173. Bug: 217366135 Reason for revert: Need this to fix a crash bug in tm-dev Change-Id: I2a94c278edc0681c5b8af6ea0a0171b71d72c650 (cherry picked from commit dbaf406ccb0ed887d4e93057c9ec0d3457f14457) Merged-In: I2a94c278edc0681c5b8af6ea0a0171b71d72c650
2022-06-29Revert "Reuse SynchronousResultReceivers instead of creating new."Neha Jain
This reverts commit 02dcbe72b3564559eaa9c2e2714824e4aac6f18c. Reason for revert: Causing builds to fail b/237471430 Change-Id: I6165d838abf312085050359377f67a68a5f8b51a (cherry picked from commit f5dd42bbd05e68f7763ccaa9fae5642acc4ceba1) Merged-In: I6165d838abf312085050359377f67a68a5f8b51a
2022-06-29Reuse SynchronousResultReceivers instead of creating new.Etienne Ruffieux
Bug: 217366135 Tag: #feature Test: manual Ignore-AOSP-First: to be chery-picked Change-Id: If8ae530a284151888a3f89a51d2c58f2a5cd3644 (cherry picked from commit 02dcbe72b3564559eaa9c2e2714824e4aac6f18c) Merged-In: If8ae530a284151888a3f89a51d2c58f2a5cd3644
2022-06-13Merge TP1A.220609.001Scott Lobdell
Change-Id: I6c3c168fb196a53feb1d2688b74bea4fdbc5b3e8
2022-06-06Update API docs to state that the IRK must be supplied in little endianRahul Sabnis
byte order Tag: #feature Bug: 233217148 Test: Manual (docs change) Ignore-AOSP-First: Android T docs change Change-Id: I5cab17003c22329744341235bb053cb55b4f7989
2022-05-26Update API docs to indicate that BT addresses are to be provided in bigRahul Sabnis
endian. Tag: #feature Bug: 233217148 Test: Manual (docs change) Ignore-AOSP-First: Android T docs change Change-Id: Iee36345088c886d5b43120bb10d8ddf52133de07
2022-05-10Change Bluetooth matching package namexiaowang
Matching package name is changed to "com.android.bluetooth.services" CRs-Fixed: 3191467 Change-Id: I3ecafb1558ff753830f412eb73ce690d1655d89b
2022-04-08Merge TP1A.220404.001Scott Lobdell
Change-Id: Ie978b3464b876dfaba2bf22ab195875f4fb4856a
2022-03-25Merge TP1A.220321.002Scott Lobdell
Change-Id: Ie8206e8b9c11c3fd55b7adddac5c782ad92c9da4
2022-03-25Add javadoc block for each constant of AD type filterChienyuan
Bug: 218875964 Tag: #feature Test: atest CtsBluetoothTestCases:android.bluetooth.cts.ScanFilterTest Change-Id: I8a0e06ac56978b2c8027943e9345669c95cfcfec
2022-03-17Merge TP1A.220310.002Daniel Norman
Change-Id: If2f3a2a6833c45ec4c0cba7c7e668a487938cb92
2022-03-17Defined value for AD type filterChienyuan
Bug:218875964 Tag: #feature Test: atest CtsBluetoothTestCases:android.bluetooth.cts.ScanFilterTest Change-Id: Ia8411e181bb88dc7afd2c88fe7340168f5ee46f9
2022-03-08Fix after API_reviewWilliam Escande
* isMandatoryCodec is now public * SCAN_FAILED_OUT_OF_HARDWARE/SCANNING_TOO_FREQUENTLY is now public with a IntDef (method using the value are changed accordingly) * Update doc for EXTRA_BATTERY_LEVEL and EXTRA_PAIRING_INITIATOR and ACTION_CONNECTION_STATE_CHANGED * Add Autoclosable to BluetoothSap to remove the NotCloseable * BluetoothClass.Device.PERI* are now public Bug: 222725037 Fix: 221851154 Test: Build + TH Tag: #refactor CTS-Coverage-Bug: 222539659 Merged-In: Ia6aa778d6bdc0319266c52a84633ee593eaa7eb0 Change-Id: Ia6aa778d6bdc0319266c52a84633ee593eaa7eb0
2022-03-08Fix after API_reviewWilliam Escande
* isMandatoryCodec is now public * SCAN_FAILED_OUT_OF_HARDWARE/SCANNING_TOO_FREQUENTLY is now public with a IntDef (method using the value are changed accordingly) * Update doc for EXTRA_BATTERY_LEVEL and EXTRA_PAIRING_INITIATOR and ACTION_CONNECTION_STATE_CHANGED * Add Autoclosable to BluetoothSap to remove the NotCloseable * BluetoothClass.Device.PERI* are now public Bug: 222725037 Fix: 221851154 Test: Build + TH Tag: #refactor CTS-Coverage-Bug: 222539659 Ignore-AOSP-First: merge conflict resolution Change-Id: Ia6aa778d6bdc0319266c52a84633ee593eaa7eb0
2022-03-07Merge TP1A.220209.001Deyao Ren
Change-Id: Id0e2895d3220831d2c617a243047e8229af8acc9
2022-02-14API Changes needed for apex to buildWilliam Escande
internal cherry-pick Bug: 216476895 Test: Compile Tag: #refactor Change-Id: I09108622038b174104457ca18ac6ec7949978f66 Merged-In: I09108622038b174104457ca18ac6ec7949978f66 CTS-Coverage-Bug: 217352944
2022-02-09Merge TP1A.220126.001Haamed Gheibi
Change-Id: Ibe4916c42b096976ac917991cf0c73f02512f3d4
2022-02-04Merge TP1A.220120.003Haamed Gheibi
Change-Id: I202f5093bbd13b381ea11f969fee6154ba91fa11
2022-02-04Update parcel read for ScanFilterWilliam Escande
The writeToParcel is always writing 2 int for the `mAdvertisingDataType` and the `mAdvertisingData == null ? 0 : 1` Changed the constructor(Parcel) to do the same thing in same order Tag: #stability Fix: 217567811 Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testScanFilter' Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testStartScanPendingIntent' Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testStartScanPendingIntent_nullnull' Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testBatchScan' Change-Id: Ie0d4d54bc74db73694c21b3f5ec646ddda8b0ec3 (cherry picked from commit 49837f2d24dc96fa1e73c6d34c5216c96efc1a38) Merged-In:Ie0d4d54bc74db73694c21b3f5ec646ddda8b0ec3
2022-02-03Merge "Update parcel read for ScanFilter" am: 8392aabff4 am: 07238d02bc am: ↵Treehugger Robot
e51440231a am: 5bbbf8a2fe Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1970943 Change-Id: Ic67af7dd39700ba3e7c9f51c6f582c766d6123ac
2022-02-03Update parcel read for ScanFilterWilliam Escande
The writeToParcel is always writing 2 int for the `mAdvertisingDataType` and the `mAdvertisingData == null ? 0 : 1` Changed the constructor(Parcel) to do the same thing in same order Tag: #stability Fix: 217567811 Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testScanFilter' Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testStartScanPendingIntent' Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testStartScanPendingIntent_nullnull' Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeScanTest#testBatchScan' Change-Id: Ie0d4d54bc74db73694c21b3f5ec646ddda8b0ec3
2022-02-02LE Scanner: Add AD TYPE filter APIsChienyuan
Bug: 206906726 Test: build pass Tag: #feature Change-Id: I2d1911b0ba6d5b7ef4e32400ec557182330dd0bb Merged-In: I2d1911b0ba6d5b7ef4e32400ec557182330dd0bb (cherry picked from commit 1ca8dbd7445978fbf99e8ed34aa65f619b028959)
2022-02-01API Changes needed for apex to buildWilliam Escande
Bug: 216476895 Test: Compile Tag: #refactor Ignore-AOSP-First: AOSP will be updated later Change-Id: I09108622038b174104457ca18ac6ec7949978f66 CTS-Coverage-Bug: 217352944
2022-02-01Remove allowBlocking from BluetoothManagerServiceWilliam Escande
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 Change-Id: I715cc2d8f2ae42be6d1099cd73095d37fa9e30f4 Merged-In: I715cc2d8f2ae42be6d1099cd73095d37fa9e30f4
2022-01-28Remove allowBlocking from BluetoothManagerServiceWilliam Escande
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
2022-01-27Merge "LE Scanner: Add AD TYPE filter APIs"Chienyuan Huang
2022-01-27LE Scanner: Add AD TYPE filter APIsChienyuan
Bug: 206906726 Test: build pass Tag: #feature Change-Id: I2d1911b0ba6d5b7ef4e32400ec557182330dd0bb
2022-01-27Merge "Periodic sync and PAST implementation"Treehugger Robot
2022-01-25Removes unnecessary owners file inRahul Sabnis
packages/modules/Bluetooth/framework/java/android/bluetooth/le. Tag: #feature Bug: 196026708 Test: Manual Merged-In: I1c981819cb1e9b03d585ec36026ca10f5108b3a9 Change-Id: I1c981819cb1e9b03d585ec36026ca10f5108b3a9
2022-01-25Removes unnecessary owners file inRahul Sabnis
packages/modules/Bluetooth/framework/java/android/bluetooth/le. Change-Id: I1c981819cb1e9b03d585ec36026ca10f5108b3a9 Tag: #feature Bug: 196026708 Test: Manual
2022-01-24Periodic sync and PAST implementationSubramanian Srinivasan
Bug: 208222454 Test: compile Tag: #feature sponsor: siyuanh@ Change-Id: I443958d5fd61fe00f7de5c755aca98c5087b9a1d
2022-01-24BLE scan time optimizationKai Shi
BLE scan time optimization to reduce scan latency: 1)Reduce scan interval and window for low power, balanced and ambient scan modes. Balanced and ambient modes now have effectively the same settings. 2)Add screen off and screen off balanced modes with longer interval for the internal use. 3)For regular apps: Foregroud: original scan mode. Background + screen on: low power mode. Screen off: screen off mode. For foreground service: Screen on: original scan mode. Scree off: fall back to screen off/screen off balanced mode unless it requests low latency mode. 4)When App requests a new scan without recent request, its scan mode is upgraded temporarily for 6 seconds (configurable). Tag: #feature Bug: 214595841 Test: Run scan in low power, low latency and balanced scan modes with filtered and unfiltered settings both continuously and periodically. Make sure the scan mode is set correctly during screen on/off transition and background/foreground transition. Tested with multiple scan clients from both test app and other service apps. Change-Id: I291a1a80f24d431b681aae485692241dfb474c5a
2022-01-12Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex""Ashwini Oruganti
2022-01-12Revert "Migrate unsafe parcel APIs in framework-minus-apex"Bernardo Rufino
This reverts commit 54298877a7406e73b9f746f59751614a74a2e500. Reason for revert: b/214053959 Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12Merge "le advertisement address type settings" am: 68a509b817 am: 79be719936 ↵Md Shahriar Hossain Sajib
am: 1d50f3c758 am: be86a71d20 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1868844 Change-Id: I38abedb11bab4d7e496a8499c3d8018cf96214ae
2022-01-06le advertisement address type settingsAndriy Naborskyy
add api to request public or random address type for advertisements. bug: 155993389 Bug: 199827901 Tag: #feature Test: atest BluetoothInstrumentationTests Test: ACTS, SL4A, IOP and BCST, CTS, GTS Change-Id: I4a2b9918e0f0cc31649e3c1952d9ba34f78d337f
2021-12-16Merge "Add scan result logs." am: dc3a5c4483 am: a46b830668 am: 57f166e83f ↵Treehugger Robot
am: 83b5bc3aa0 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1836926 Change-Id: I6e08007cbbe792f7a30ac9ed5aac8e3cc6758b51
2021-12-16Merge "Add scan result logs."Treehugger Robot
2021-12-15Merge "Migrate unsafe parcel APIs in framework-minus-apex"Bernardo Rufino
2021-12-15Migrate unsafe parcel APIs in framework-minus-apexBernardo Rufino
Migrate the following unsafe parcel APIs in framework-minus-apex: * Parcel.readSerializable() * Parcel.readArrayList() * Parcel.readList() * Parcel.readParcelable() * Parcel.readParcelableList() * Parcel.readSparseArray() This CL was generated by applying lint fixes that infer the expected type from the caller code and provide that as the type parameter (ag/16365240). A few observations: * In some classes we couldn't migrate because the class also belonged to another build module whose min SDK wasn't current (as is the case for framework-minus-apex), hence I suppressed the lint check (since I'll eventually submit the lint check to the tree). * In some cases, I needed to do the cast in https://stackoverflow.com/a/1080525/5765705 to make the compiler happy since there isn't another way of providing a class of type Class<MyClassWithGenerics<T>>. * In the readSerializable() case, the new API also requires the class loader, that was inferred to by InferredClass.class.getClassLoader(). * Note that automatic formatting and import rely on running hooked up to the IDE, which wasn't the case here. Bug: 195622897 Test: TH passes Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-14Copy attributable to BluetoothWilliam Escande
Attributable is called by bluetooth and it's hidden. By copying into bluetooth we are now allowed to call it Bug: 210467788 Test: build Tag: #refactor Change-Id: I73ea07c9439988ab5477c82799f718c6d81513be
2021-12-07Added missing equals override in new Transport Data classesEtienne Ruffieux
Tag: #feature Bug: 208904630 Test: atest Change-Id: I92cbd152eb063c866f7101040cb228036ae2c07a
2021-11-18Bluetooth: make it possible to advertise Transport Discovery DataJakub Pawlowski
Bug: 159363165 Tag: #feature Test: called the API in test app, verified advertisement content Change-Id: I92fe0671717bda2de1be3ff022713133ad681ab6
2021-10-25Replaced BitUtils#maskedEquals hidden API callEtienne Ruffieux
Added maskedEquals method to BluetoothLeUtils to prevent hidden API usage. Tag: #feature bug: 200200870 Test: Manual Change-Id: I7517cfef0b9e058e36d8d325f4a5ec653b1f804b
2021-10-15Add scan result logs.Mehmet Murat Sevim
Some GMSCore modules are missing some scan result despite the peer device is discovered by the Android BT stack. These logs will help debug such problems. Bug: 154942993 Bug: 199827901 Test: IOP and BCST Tag: #stability Change-Id: I6bd98df09ea2beb695aa9b4ac63bde307e77b182 (cherry picked from commit f204effb5cc6f1cc8e5e3f75ef343db3bd339b67)
2021-07-29Merge "Add implementation for IRK to parcelable functions." am: 400c21483c ↵Martin Brabham
am: fbd4f102c6 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1780808 Change-Id: I3b58d01895182c3dc970589e453cbebf2bdf7c50
2021-07-29Add implementation for IRK to parcelable functions.Martin Brabham
Bug: 194432570 Test: Manual test app; nRF connect Tag: #feature Change-Id: I54ac5e5f105d155a2d2fc826bf1f64cf34573ff9