| Age | Commit message (Collapse) | Author |
|
This has no functional change; it just contains logs that might help us
diagnose the issue.
Bug: 356462170
Test: m com.android.btservices
Flag: EXEMPT refactor only
Change-Id: Iad9cdb0d61bc815a7a2bc97c24fae7cbe18d48e7
|
|
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
|
|
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
|
|
Not waiting leads to a high chance of a later crash; it's better to wait
forever.
Fix: 385666726
Test: m com.android.btservices
Flag: EXEMPT bugfix
Change-Id: I07dd7fde11b1949606a69478cc5eca70f88ff8c9
|
|
Restructure the GlobalModuleRegistry:
- Rename to RustModuleRunner
- Clarify states
- Internalize the static global
- Add a number of logs when error states occur
This is reland of https://r.android.com/3318393 except that starting and
stopping the module multiple times is now supported.
Tested with `atest net_test_bluetooth` to verify the cause of revert has
been fixed.
Fix: 356462170
Test: m com.android.btservices
Flag: EXEMPT refactor only
Change-Id: I2aece397937e075a494b0b6e200492bb5664f46c
|
|
|
|
This reverts commit b182e3dd6daaa2c2f5076e18128e07c6b8c3c6a9.
Reason for revert: b/393481018
Change-Id: I26d3fe5ffc9cd7854e2e3b8e7b9226b976978bbb
|
|
|
|
Test: m rust
Bug: 384401387
Change-Id: I647a63976830e5071cb4dac8c0480a00ecf4d973
|
|
Bug: 305066880
Test: m com.android.btservices
Flag: EXEMPT, log change
Change-Id: If1dbab99250a4f62626206fc9f73d27e71ebab56
|
|
Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, build change
Change-Id: I259a974e5d0bf389d69876889118de0d5eed9b5e
|
|
Restructure the GlobalModuleRegistry:
- Rename to RustModuleRunner
- Clarify states
- Internalize the static global
- Add a number of logs when error states occur
Logs should be output before panic to make crashes identifiable.
Bug: 356462170
Test: m com.android.btservices
Flag: EXEMPT refactor only
Change-Id: Iecd62aa2b6e743b2726f2cf87808e6718d98fedf
|
|
The logging macros within have long been removed,
this is just cleanup work to inline the included headers
where necessary
Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, no logical change
Change-Id: I2147ce4bdcea977b92318b2cb96e7020a8958161
|
|
Unused, out of date
Test: mma -j32
Bug: 290846969
Bug: 349469413
Bug: 372202918
Flag: EXEMPT, just delting unused code under flag
Change-Id: Ie01c56f81d81affeed5c7285bcf8d712b6af59b0
|
|
All existing init flags have been migrated to feature
flags or removed and the rust module can now be deleted.
Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: I38be97fad7f9bd42f432d74e5b8090a08dc4502a
|
|
Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, no logical change
Change-Id: Ia465d52ae9c4889db5529cb2fec9085befd8104f
|
|
Introduce tCONN_ID as a type for
GATT connection IDs used internally
by the native stack.
Althogh this change itself doesn't do anything,
this is a preparatory step for expanding
tGATT_IF to uint16_t and tCONN_ID to uint32_t.
Rust stack cleanup will follow in a subsequent CL.
Flag: EXEMPT, mechanical refactor
Bug: 273561907
Test: atest BluetoothInstrumentationTests
Change-Id: I307fbb0815f3f3c31c80e75c12c4223237099adc
|
|
Test: m rust
Bug: 364333811
Change-Id: I0431582199a8039ce226d6376bdc0ee65a53fa1d
|
|
Initflags are deprecated, use a trunkstable flag.
Bug: 349469413
Test: mma -j32
Change-Id: I4e5917098167261289f9f64f6827b7b28f97df81
|
|
|
|
|
|
This external function declaration isn't able to be handled nicely by
clippy in this case, so we suppress the lint. I also added a formatting
fix to make it look more like other Safety sections.
```
error: unsafe function's docs miss `# Safety` section
--> packages/modules/Bluetooth/system/rust/src/connection/ffi.rs:62:9
|
62 | / unsafe fn unchecked_register_rust_callbacks(
63 | | self: Pin<&mut Self>,
64 | | callbacks: Box<LeAclManagerCallbackShim>,
65 | | );
| |_________^
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `-D clippy::missing-safety-doc` implied by `-D warnings`
= help: to override `-D warnings` add
`#[allow(clippy::missing_safety_doc)]`
error: aborting due to 1 previous error
```
Bug: http://b/346588808
Test: ./toolchain/android_rust/tools/test_compiler.py --prebuilt-path dist/rust-linux.tar.xz --target aosp_cf_x86_64_phone --image --reuse-prebuilt
Bug: 346588808
Test: m aosp_cf_x86_64_phone
Change-Id: I015915f20cd97172bbc66913412da5f139a909de
|
|
A thread setting bt_gatt_callbacks and
a thread using it may be different,
potentially causing an NPE if
bt_gatt_callbacks is accessed after being cleaned up.
Use a local variable to ensure safe access in threaded environments.
Bug: 353974484
Flag: EXEMPT, strict null check.
Test: atest BluetoothInstrumentaionTests
Change-Id: I2bd8dd62d0fab0e58db1c1b690406341fc251bf8
|
|
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
|
|
Restore SpacesBeforeTrailingComments to 2 to match current style
Then run clang-format -i **/**.{c,h,cc,cpp,hpp}
Then fix a bunch of typo (reported by gerrit)
Then fix unnecessary multiline string
Then fix whitespace for disabled clang format (reported by cpplint)
This is no-op
Bug: 311772251
Test: mmm packages/modules/Bluetooth
Flag: Exempt Format only
Change-Id: If135447803a40a2a07d4630ba2195e08ef8d250c
|
|
Bug: 255880936
Fixes: 290842873
Test: mma -j32
Flag: EXEMPT, no logical change
Change-Id: Ia1d6f2ea775087680f5d34472e32d44f574854d4
|
|
Bug: 331817295
Test: m com.android.btservices
Test: atest --host libbluetooth_core_rs_test
Flag: EXEMPT, mechanical refactor
Change-Id: Ia8b5fbf470df7ed3d20fced5339beb136e3aa9ba
|
|
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
|
|
|
|
Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, formatting
Change-Id: Ibda132cef7bc849eea175bb9b978c6b58e311afc
|
|
Test: mmm packages/modules/Bluetooth
Bug: 345074109
Flag: EXEMPT, mechanical refactor
Change-Id: Ief3f4c1ddd614f697ec8d5bb0b6eabc2adfde5e1
|
|
In production FROM_HERE only convey the filename
and the pc and only log the pc in case of internal
libchrome failures.
It's mainly useful in debugging by enabling
ENABLE_LOCATION_SOURCE and logging the
base::Location object ourselves.
The same information can be retrieved using c++'s
[source_location](https://en.cppreference.com/w/cpp/utility/source_location)
without needing to modify every caller.
The benefit outweight the cost of needing to provide
that (correctly) in every call site.
Bug: 345074109
Test: mmm packages/modules/Bluetooth
Flag: EXEMPT mechanical refactor
Change-Id: I5ba252baa6c885f3c34bffec058517bf39539bbe
|
|
Bug: 290846388
Fix: 290846388
Test: m com.android.btservices
Flag: EXEMPT, removing legacy flag
Change-Id: I434d863d73cf5e78cb7f919598d5c6412a48eb5a
|
|
OwnedHandle is dropped when a connection is dropped with a
Pending transaction. Removing this will change the behavior.
warning: field `0` is never read
--> src/gatt/server/att_server_bearer.rs:37:13
|
37 | Pending(OwnedHandle<()>),
| ------- ^^^^^^^^^^^^^^^
| |
| field in this variant
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
37 | Pending(()),
|
Bug: 330185853
Test: atest libbluetooth_core_rs_test
Flag: EXEMPT, build-only change
Change-Id: I00d61e2a1f91667931edf0beaea7961c5e00296b
|
|
Test: m com.android.btservices
Bug: 305066880
Flag: EXEMPT, mechanical refactor
Change-Id: Ia6632bc2c6ab18d93fd9d5d21bb863eb8a3150ff
|
|
Bug: 279512287
Test: mmm packages/modules/Bluetooth
Flag: Exempt, mechanical refactor
Change-Id: I962860d1e39a0b1b32bfa2816c12a79b557b8a62
|
|
BTM_BackgroundConnectAddressKnown
-> BTM_Sec_AddressKnown
convert_to_address_with_type
-> BTM_Sec_GetAddressWithType
Bug: 301661850
Test: m com.android.btservices
Change-Id: Iaa71a5d07704a83e298035dd2f9b5670dcbcc866
|
|
The second argument of do_in_jni_thread is a base::OnceCallback so it's
safe to use base::BindOnce to construct the callback.
Bug: 272116782
Test: m .
Change-Id: Ibaffe5fd569100063a778e40b61b0cb2ab8c5686
|
|
Remove unneeded import and call to into_iter().
Bug: 295883071
Test: m libbluetooth_core_rs
Change-Id: I7f8ab535a7993fa249df710505dd19e8a43c2f48
|
|
Bug: 289280004
Test: atest avatar
Change-Id: Iec110ae7314111d0b9b9466bbaa0bcdd1e4e0b26
|
|
after rust module unloading
Disconnection events received after the rust module is unloaded
(from shutting down the stack) cause the rust module to raise
a panic because the arbiter is no longer initialized.
This change silences LE disconnection events received in this
context.
Bug: 289280004
Test: atest avatar
Change-Id: Iec122a42feed059f6fa1826b625df10e92ad64bb
|
|
These will soon be required by a lint.
Bug: 290018030
Test: m rust
Change-Id: I13fc1bc46b855603b4ee8410e89fc7ec75c27e65
|
|
Bug: 288268986
Test: m rust
Change-Id: Ia6555a46e87f2072cf015889cf3f6c37579558d2
|
|
The test for this code is flaky and never works on the first iteration
but works on the second attempt.
This is because the crash is cleaning the bluetooth stack and let the
arbiter be set a second time.
The proper fix is to clean the arbiter when the stack is shut down, but
being a OnceCell prevent it.
Option 1 to solve it is to no longer use a OnceCell but a optional
value that will require a lock to be shared across multiples caller.
Option 2 is to have a mutable OnceCell but this looks like an
anti-pattern
The cost of this CL is an added rwlock when doing a call on the arbiter
Bug: 287403942
Test: atest net_test_bluetooth.GattTest.GattServerBuild
Change-Id: Ibe70e51dcdade64570ff95894aad21f5bd35a109
|
|
* changes:
[GATT Server] Simplify API of IsolationManager
[GATT Server] Expose IsolationManager from GATT server module
[GATT Server] Simplify IsolationManager interface
[GATT Server] Split up Arbiter logic and FFI
|
|
For compatibility with the new version of libbitflags (2.2.1), implement
Copy, Clone, Debug, PartialEq, Eq for AttPermissions.
Bug: 261439617
Test: Build
Change-Id: I67a64634a5f1bd320f983154c25ba2b7e2a813dc
Merged-In: Ib00d6cf4c55ce69481aab277ae86365aac3eaa8f
|
|
* changes:
Revert^2 [Connection Manager] Forward disconnection callbacks
[Connection Manager] Unregister for callbacks on shutdown
|
|
|
|
Test: unit
Bug: 274945531
Change-Id: I956e035b9646dac149357f74e3d4a3d0236a9b0e
|
|
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
|