Commit Graph

1416 Commits

Author SHA1 Message Date
Andrei-Valentin Onea
882defd836 Merge "Document public alternatives to greylisted APIs" am: 3647eb620b
am: 3641066567

Change-Id: Ia21d1ce57a2cbffe8b417d6f1d5535924c7ea162
2019-06-19 07:21:29 -07:00
Andrei-Valentin Onea
3647eb620b Merge "Document public alternatives to greylisted APIs" 2019-06-19 13:57:08 +00:00
Andrei Onea
f950c08b78 Document public alternatives to greylisted APIs
Add known public alternatives or recommendations for greylisted APIs in
Bluetooth.

Bug: 135171386
Test: m
Change-Id: I86e708be37eb7d1b0fafa2d64283b7f81bc02e51
2019-06-17 11:29:45 +01:00
Chienyuan
7bd8017a94 Merge "Declare STATE_AUDIO_CONNECTED in right place" am: 8fdfd917d1
am: 2235a8778b

Change-Id: Ib76c1f59d811c76a4d44c9ca172599214631610e
2019-06-14 00:31:42 -07:00
Treehugger Robot
8fdfd917d1 Merge "Declare STATE_AUDIO_CONNECTED in right place" 2019-06-14 07:12:26 +00:00
Chienyuan
a669d1a198 Declare STATE_AUDIO_CONNECTED in right place
Test: build pass
Change-Id: Ia3834207756afdcc06ccfd7bdc5c91c3e651bebe
2019-05-29 10:29:30 +08:00
Sal Savage
b4b40f284f Merge "Update BluetoothProfileConnector to invoke service disconnections with correct profile ID" am: d8b457545a
am: 8b3ceb7640

Change-Id: Ia12feb3f9d86c71634bda442e07eccd092972f0e
2019-05-28 18:40:12 -07:00
Sal Savage
4afdab44ab Update BluetoothProfileConnector to invoke service disconnections with correct profile ID
Bug: b/133517229
Test: Build + Manual on automotive hardware
Change-Id: Id8dbeaf844a65020f610505f81eea20b96ec002a
2019-05-28 16:56:23 +00:00
Martin Brabham
2b3b1429db DO NOT MERGE: ScanFilter: Fix argument sanitization logic.
Bug: 132888204
Test: Manual
Change-Id: Id8cadbbfac29aca97ccb83815795948b1bbf85a5
2019-05-22 05:33:19 +00:00
Sal Savage
5d145c06ea Add timestamp and read status extra constants to MAP Client
Bug: b/132455654
Test: build and run on automotive hardware. Use kitchen sink to send
and receive messages.

Change-Id: Ic0f04640f1894d6cf336ba7e641df9cf148a2bbd
Merged-In: Ic0f04640f1894d6cf336ba7e641df9cf148a2bbd
2019-05-21 08:16:47 -07:00
Sal Savage
40aa11ead0 Add timestamp and read status extra constants to MAP Client
Bug: b/132455654
Test: build and run on automotive hardware. Use kitchen sink to send
and receive messages.

Change-Id: Ic0f04640f1894d6cf336ba7e641df9cf148a2bbd
2019-05-14 11:15:14 -07:00
TreeHugger Robot
87b7e3d48d Merge "Fix binder leakage when turning off Bluetooth" into qt-dev 2019-05-03 04:04:34 +00:00
Ugo Yu
6d9cfce73a Fix binder leakage when turning off Bluetooth
* In current design, Bluetooth AdapterState stops all BR/EDR
  profiles' service and triggers onServiceDisconnected callback to
  all binder clients before BluetoothManagerService invokes
  onBluetoothStateChange(false), which means unbind service
  would never be called in framework.
* Do unbind service when onServiceDisconnected is invoked.
* Move profile binder logic to BluetoothProfileConnector except:
  - BluetoothHeadset: its binder logic is in BluetoothManagerService
  - BluetoothPbap: it has an individual ServiceListener

Bug: 129037442
Bug: 129437895
Test: Bluetooth ON/OFF stress test.
      adb shell dumpsys activity services | egrep "com.android.bluetooth"
      to check whether AppBindRecord for com.android.bluetooth grows

Change-Id: Id0d85866d386962b94d2d966f0a864b1da165d13
2019-05-02 18:06:41 +08:00
Ugo Yu
d011546a85 Fix binder leakage when turning off Bluetooth
* In current design, Bluetooth AdapterState stops all BR/EDR
  profiles' service and triggers onServiceDisconnected callback to
  all binder clients before BluetoothManagerService invokes
  onBluetoothStateChange(false), which means unbind service
  would never be called in framework.
* Do unbind service when onServiceDisconnected is invoked.
* Move profile binder logic to BluetoothProfileConnector except:
  - BluetoothHeadset: its binder logic is in BluetoothManagerService
  - BluetoothPbap: it has an individual ServiceListener

Bug: 129037442
Bug: 129437895
Test: Bluetooth ON/OFF stress test.
      adb shell dumpsys activity services | egrep "com.android.bluetooth"
      to check whether AppBindRecord for com.android.bluetooth grows

Merged-In: Id0d85866d386962b94d2d966f0a864b1da165d13
Change-Id: Id0d85866d386962b94d2d966f0a864b1da165d13
2019-05-02 17:25:52 +08:00
Stanley Tng
649e6a57f8 Add more documentation for LE CoC
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
(cherry picked from commit bcbc130235)
Merged-In: I40abde70a7ca6bcd194ee75bd8367c0ed9e97d05
2019-04-24 09:24:19 -07:00
Treehugger Robot
964f6265ad Merge "Add more documentation for LE CoC" 2019-04-22 02:05:22 +00:00
Treehugger Robot
ce5fdc042a Merge "Add nullability annotations to android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid" 2019-04-20 02:20:04 +00:00
Stanley Tng
bcbc130235 Add more documentation for LE CoC
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
2019-04-19 15:50:42 -07:00
Zach Johnson
df512f12a1 Add nullability annotations to android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid
Test: compilation
Fixes: 126698824
Change-Id: I4873b46a37df3e103ddc62001cc9f0bc01aea4dc
2019-04-19 22:35:13 +00:00
Zach Johnson
df588a2292 Add nullability annotations to android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid
Test: compilation
Fixes: 126698824
Change-Id: I4873b46a37df3e103ddc62001cc9f0bc01aea4dc
2019-04-19 15:30:22 -07:00
Treehugger Robot
e5cf74326d Merge "Refine Bluetooth Metadata API" 2019-04-15 20:37:28 +00:00
Jakub Pawlowski
64307cc0b2 Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull
Test: compilation
Bug: 115639878
Merged-In: I5f895d65a7036275ab0faa0afd2ee1eebc416476
Change-Id: I5f895d65a7036275ab0faa0afd2ee1eebc416476
2019-04-12 09:27:10 +02:00
Jakub Pawlowski
cc01027e50 Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull
Test: compilation
Bug: 115639878
Merged-In: I5f895d65a7036275ab0faa0afd2ee1eebc416476
Change-Id: I5f895d65a7036275ab0faa0afd2ee1eebc416476
2019-04-12 09:04:22 +02:00
Ugo Yu
4741a8bd53 Refine Bluetooth Metadata API
- 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
2019-04-08 20:09:53 +08:00
Jack He
fac8c40ba5 Merge "BluetoothHealth: hide auto-created default constructors" am: 463454432b am: 39a6d731bb
am: f08eadc878

Change-Id: I042170e4b06ee298c063a84c8f7aaabe58a4c0dd
2019-04-01 17:40:49 -07:00
Jack He
875ff327e0 BluetoothHealth: hide auto-created default constructors
Fixes: 123926561
Test: make
Change-Id: I388472c82eaca245285b5ecf2959c415508d7e69
2019-04-01 13:19:54 -07:00
Ugo Yu
50e3c08d4c Refine Bluetooth Metadata API
- 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
2019-04-01 23:16:17 +08:00
Ugo Yu
1cf619760e Merge "Refine Bluetooth silence mode API" am: c650674397 am: 0196a831b1
am: ae55a7a369

Change-Id: Ie5dfde6a063209acf61846438b6f507ef24f9716
2019-03-31 20:44:42 -07:00
Ugo Yu
1d2e68cf4b Refine Bluetooth silence mode API
- 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
2019-03-22 14:30:59 +08:00
Stanley Tng
5c85ed092a Merge "Cleanup annontations for Hearing Aids Profile API" am: f6b3f6a8d8 am: 73f7fd85cb
am: 72f589aafd

Change-Id: I1bc62eb19c3d1bd3fd6d959163aaf9e44ab0d217
2019-03-18 14:36:27 -07:00
Stanley Tng
7f3b781bfa Cleanup annontations for Hearing Aids Profile API
Remove the @UnsupportedAppUsage and add the @IntDef for the Profile
Connection States in the Hearing Aids Profile API. Also, the parent
class BluetoothProfile has its Profile Connection States annontated.

Bug: 128523382
Test: Compile only
Change-Id: Ibd02516fa637ddb48d70a8dfacf607f047aec282
2019-03-16 00:22:34 +00:00
Deqiang Chen
e00f6c33e1 Merge "Avoid IllegalArgumentException when bluetooth is disabled" am: 2a1bdd2429 am: 787e52045f
am: 8a4e2f3aeb

Change-Id: Idb94b41924023ba3fab9694c93f17ed4ce4d01b4
2019-03-14 16:04:41 -07:00
Deqiang Chen
2a1bdd2429 Merge "Avoid IllegalArgumentException when bluetooth is disabled" 2019-03-14 22:23:18 +00:00
Stanley Tng
db74e56e22 Merge "Add @NonNull annotations to LE CoC APIs" am: 8b57ab7989 am: 68e00291e0
am: f36e4f26a4

Change-Id: I674f926ff2822d311fd6f6a0cbf061a2e815b093
2019-03-12 23:37:09 -07:00
Stanley Tng
97341da063 Add @NonNull annotations to LE CoC APIs
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
2019-03-13 02:27:38 +00:00
Deqiang Chen
da9f738c0c Avoid IllegalArgumentException when bluetooth is disabled
When the corresponding profile service is not available on device,
bluetoothA2dp, bluetoothHidHost and bluetoothPbap will report
IllegalArgumentException when bluetooth is disabled. This change avoid
that exception.

Bug: 127359897
Test: local test and observe there is no IllegalArgumentException when
bluetooth is disabled

Change-Id: I457e5225b8710dd5d02c405ef558892e99d1736f
(cherry picked from commit ee8371007b82ff8c6d26e8ac90c6e3d3cf6bf2a8)
2019-03-12 14:53:45 -07:00
Ugo Yu
cf592009e3 Merge "Change BluetoothCodecStatus.sameCapabilities() to public" am: 27a6501a19 am: 8db54f6563
am: 99c86ecda5

Change-Id: Id4006e0be9eca624d52a313fc6e492483cc53dbb
2019-03-09 05:49:31 -08:00
Stanley Tng
0c7376b588 Merge "Add @NonNull annotations to Hearing Aids Profile APIs" am: 6fa52c9b25 am: 1c5a742cb8
am: 4929093ff7

Change-Id: Ib1388c480e135f56063da0fe26063ef9e31a6807
2019-03-08 07:38:20 -08:00
Treehugger Robot
27a6501a19 Merge "Change BluetoothCodecStatus.sameCapabilities() to public" 2019-03-08 10:38:47 +00:00
Stanley Tng
9d37667fdc Add @NonNull annotations to Hearing Aids Profile APIs
Bug: 126699327
Bug: 119617521
Test: Ran with CTS tests for Hearing Aids Profile, android.bluetooth.cts.HearingAidProfileTest
Change-Id: If83052a68c867d839e263f490592b80bef513a01
2019-03-06 17:17:40 +00:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
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
2019-02-28 23:29:04 -07:00
Ugo Yu
87f8ec4965 Change BluetoothCodecStatus.sameCapabilities() to public
- Public this API to help A2DP state machine check selectable
  codec capabilities status.

Bug: 124254557
Bug: 125551347
Test: runtest bluetooth

Change-Id: If44887f756d2e8348e8f76dfb67b77b993ffd8db
2019-02-27 19:49:13 +08:00
Nan Zhang
944f18371b Fix the incorrect javadoc links
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
2019-02-15 14:39:24 -08:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Jean-Michel Trivi
103a678ac3 Merge "AudioDeviceBroker in audio service" 2019-01-25 22:31:09 +00:00
Jean-Michel Trivi
5885037c88 AudioDeviceBroker in audio service
New AudioDeviceBroker class running in audio service.
Has dedicated message loop for handling audio device
   connections and disconnections.
New helper classes for AudioDeviceBroker:
 - BtHelper for Bluetooth
 - AudioDeviceInventory to manage list of devices

Bug: 112863932
Test: media CTS + audio CTS Verifier
Change-Id: I3e8f662a9d82fa7245695888e14fac7f4fc6e728
2019-01-25 11:03:50 -08:00
Ugo Yu
d02a78bd95 Merge "Introduce system APIs for Bluetooth silence mode." am: d17b284bdb am: 5a5217d2b8
am: 26b4283a13

Change-Id: I07f8019e748495b05ea09bab69ec72c0ab9f271b
2019-01-24 11:21:36 -08:00
Ugo Yu
26b4283a13 Merge "Introduce system APIs for Bluetooth silence mode." am: d17b284bdb
am: 5a5217d2b8

Change-Id: Icdc5720da633f3cba7e1acb730b4ca21475d6f4b
2019-01-24 10:37:47 -08:00
Treehugger Robot
d17b284bdb Merge "Introduce system APIs for Bluetooth silence mode." 2019-01-24 18:08:05 +00:00
Ugo Yu
f3b120041d Merge "Change MetadataListener to a abstract static class" am: 9d3ce3e55e am: 745c6de6eb
am: f2d656b438

Change-Id: I68915d6190faa22e20b03321dc5895a37e6de5f8
2019-01-23 23:43:29 -08:00