Conversation
|
how about collecting the differences between the protocols into some sort of a protocol description struct (and picking the appropriate one at startup) to avoid something like not only the code would be easier to read when all the related things are grouped together, imagine if the protocol changes again - what kind of spaghetti this becomes. |
|
This PR is missing the needed change to allow /dev/binder in systemd service file the same way that is done for /dev/hwbinder https://github.com/mer-hybris/bluebinder/blob/master/bluebinder.service#L16 |
mlehtima
left a comment
There was a problem hiding this comment.
Also fix the earlier comment about allowing /dev/binder in service file
| g_main_loop_quit(proxy->loop); | ||
| *status = GBINDER_STATUS_FAILED; | ||
| return NULL; | ||
| if (proxy->protocol->rpc_protocol == BINDER_RPC_PROTOCOL_AIDL) { |
There was a problem hiding this comment.
and this too looks like a candidate for a protocol specific callback. but of course ifs work too, it's a matter of personal preference. I like when all protocol specific stuff is concentrated in one place and abstracted from the generic code with aninterface.
| #error "unknown byte order" | ||
| #endif | ||
|
|
||
| #ifndef hci_iso_hdr |
There was a problem hiding this comment.
This didn't work so use instead "#ifndef HCI_ISO_HDR_SIZE" and maybe add a comment before like "For compatibility with old bluez5"
Add support for AIDL Bluetooth HAL found on Android 14. First attempt to get AIDL HAL on /dev/binder, then fallback to /dev/hwbinder for HIDL if not present.