summaryrefslogtreecommitdiff
path: root/system/rust/tests
AgeCommit message (Collapse)Author
2025-02-12system/rust: Set imports_granularity rustfmt option to Module Chris Suter
This matches the Fuchsia style. See https://fxbug.dev/340943530 for rationale. I've also reformatted all Rust files under system/rust with this style as there seemed to be some inconsistencies. Fix: 396241824 Test: m com.android.btservices Flag: EXEMPT refactor only Change-Id: I74425bfbe98a402fa5f9fd5f1746a00b9767a321
2025-02-11Delete libbt_common Henri Chataing
This rust library only exports the method `init_logging`, which is used solely by the bluetooth_core crate. `init_logging` is inlined to system/rust/src/utils.rs Bug: 331817295 Test: m libbluetooth_core_rs Flag: EXEMPT, dead code removal Change-Id: Ib8fce44be854f095a3a95324df102ef060717084
2024-07-16system/rust/gatt: Switch to the default PDL rust generator Henri Chataing
The generator rust_no_alloc is no longer maintained and the default rust generator is now the preferred rust generator. Bug: 331817295 Test: m com.android.btservices Test: atest --host libbluetooth_core_rs_test Flag: EXEMPT, mechanical refactor Change-Id: I18da339ffb2537229fb870594edd344b6a924241
2024-06-14system/rust: Update GATT packet definition to use 8[] for ATT values Henri Chataing
Bug: 331817295 Test: m com.android.btservices Test: atest --host libbluetooth_core_rs_test Flag: EXEMPT, mechanical refactor Change-Id: Ia8b5fbf470df7ed3d20fced5339beb136e3aa9ba
2024-06-12system/rust: Update GATT datastore interfaces to use raw values Henri Chataing
The code almost never makes use of the structured type and mostly relies on AttAttributeDataChild::RawData. Removing this type will help convert the pdl rust backend later as the generated type AttAttributeDataChild will no longer exist under this form. Bug: 331817295 Test: m com.android.btservices Test: atest --host libbluetooth_core_rs_test Flag: EXEMPT, mechanical refactor Change-Id: I429341ed0ccc4a8cdaba7cc86d1249f16f11a28e
2024-06-11system/rust: Apply cargo fmt Henri Chataing
Bug: 331817295 Test: m com.android.btservices Flag: EXEMPT, formatting Change-Id: Ibda132cef7bc849eea175bb9b978c6b58e311afc
2023-05-10[GATT Server] Simplify API of IsolationManager Rahul Arya
Test: unit Bug: 274945531 Change-Id: I956e035b9646dac149357f74e3d4a3d0236a9b0e
2023-05-10[GATT Server] Expose IsolationManager from GATT server module Rahul Arya
The IsolationManager is made a submodule of the GATT server, so we can query it to figure out what services are exposed to each connection. It is temporarily also available directly from FFI, solely for the purpose of arbitration. This will be removed once the Rust server is used for 100% of GATT server operations. Test: unit + CTS multi-device Bug: 274945531 Change-Id: Idc3cdd78ec2435a7a286413d7b1ebaae83a8f07a
2023-05-08[GATT Server] Use TransportIndex instead of conn_id in API Rahul Arya
In preparation for supporting multiple GATT servers simultaneously, the API of GattModule should use TransportIndex (i.e. connection handle), rather than ConnectionId, since multiple ConnectionIds exist for a single TransportIndex. Test: unit Bug: 274945531 Change-Id: Ie820bdab7a0d14b7f0aa6f2db37aa3bf568f4242
2023-04-17[Private GATT] Rename writable -> writable_with_response Rahul Arya
Based on comments from aosp/2503097. Test: unit Bug: 274945531 Change-Id: I566daa99e5ba23faac4eb0c993b9e100919c1a9e
2023-03-23[Private GATT] Refactor GattDatastore Rahul Arya
Split into RawGattDatastore and GattDatastore, so we can add read blob / reliable writes without making internal services more messy. Test: unit Bug: 255880936 Change-Id: Ie165fa45fca2a8e003da39f6515e3c41605fed43
2023-03-22[Private GATT] Add service change indication Rahul Arya
Send indication when attribute schema changes to all registered, connected clients. Test: unit Bug: 255880936 Change-Id: Ie8c0ac8596c43b9b53ed3acd4e6615a689e739de
2023-03-22[Private GATT] Built-in services Rahul Arya
GATT/GAP. Implementation of GATT srv_chg indication to follow in the next CL. Bug: 255880936 Test: unit Change-Id: If344709656c3d7e46e94f2644f63f8c221bae08d
2023-03-20[Private GATT] Minor cleanup Rahul Arya
Based on code coverage results, removing unreachable code or adding tests to untested code. Bug: 255880936 Test: unit Change-Id: Ib11c078927e3e5902ac58e2c120c3e7d5cc1175f
2023-03-18[Private GATT] Make datastores per-service Rahul Arya
Previously the GattDatastore was global. Now, it can be specified per-service, so that multiple datastores can be used. This is needed to support GAP/GATT/DIS services, as well as non-isolated connections. Test: unit Bug: 255880936 Change-Id: I581fec49621ce1cc2652b013b5978d659166fb95
2023-03-09[Private GATT] Simplify datastore interface Rahul Arya
Focus only on reads/writes, and not on connection lifecycle. Instead, use timeouts to handle cleanup of stale callbacks. Bug: 255880936 Test: unit Change-Id: I7afb42ed2a2a3d98fa6e83e1ff426855d2bc3667
2023-03-09[Private GATT] Add support for MTU Exchange Rahul Arya
Snoop MTU_REQ/RSP packets from legacy stack, and use them to track the MTU used in the isolated server. Bug: 255880936 Test: unit Change-Id: Ifcaa35be47abdbf714b592318184701645b55800
2023-03-09[Private GATT] Add support for descriptors Rahul Arya
Bug: 255880936 Test: unit Change-Id: I62a0f715cbf27e5a895dcdb39cd9f06233fb19ea
2023-03-09[Private GATT] Add support for handle value indications Rahul Arya
Bug: 255880936 Test: unit Change-Id: Iafec2663928df99f2d6b5ac4efad7a9f13113871
2023-03-09[Private GATT] Make ATT permissions a bitmask Rahul Arya
Simplifies code and makes it easier to extend in the future. Bug: 255880936 Test: unit Change-Id: Ibfba803117f6eb9dc1c6cada5a72bae2f384360b
2023-03-08[Private GATT] Refactor to remove Rc<> Rahul Arya
This CL introduces the abstraction of SharedBox<>, which wraps Rc<> to avoid accidental circular references / leaks. Without this, we could leak AttServerBearers by e.g. storing an Rc<> to them in a spawned future, or by actually having a circular reference. Bug: 255880936 Test: unit Change-Id: If60bd51d4ecda799de465d2e54a2976cf4e6793a
2023-02-24[Private GATT] Add support for GATT write requests Rahul Arya
Bug: 255880936 Test: unit Change-Id: Iec10e55b720729bd88e8a3889d9f47150fb693ee
2023-02-24[Private GATT] Add support for reading attributes over JNI Rahul Arya
Bug: 255880936 Test: unit Change-Id: Ie235a33b7c34e24284c93828cba7affbf2894793
2023-02-09[Private GATT] Clear services when server closed Rahul Arya
If we just close the server, we keep an Rc<> to the live server with its attributes. We should instead clear all the services first (and eventually send a srvc_chg indication) before closing. Test: unit Bug: 255880936 Change-Id: I2d8430b57cd8031bb41f19c1ddb2cabcc9e24fbe
2023-02-06[Private GATT] Add GATT server + module Rahul Arya
Bug: 255880936 Test: unit Change-Id: I94fafe8afc68dc31501f274099ef6f3a684009a1