Lockscreen: Separate 'Allow RPC While Locked' for USB/BLE (#343)

* Lockscreen: Separate 'Allow RPC While Locked' for USB/Bluetooth (BLE)

- #330, split of the `allow_locked_rpc_commands` bool into `allow_locked_rpc_usb` and `allow_locked_rpc_ble` to allow the connections separately.

* Shorter wording

* Update changelog

---------

Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
This commit is contained in:
Alexander Bays
2025-01-12 20:40:36 -06:00
committed by GitHub
parent 7d4ea20701
commit 34379f1fbe
6 changed files with 61 additions and 25 deletions

View File

@@ -385,9 +385,10 @@ static void
}
RpcSession* rpc_session_open(Rpc* rpc, RpcOwner owner) {
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock) &&
!momentum_settings.allow_locked_rpc_commands)
return NULL;
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock)) {
if(owner == RpcOwnerUsb && !momentum_settings.allow_locked_rpc_usb) return NULL;
if(owner == RpcOwnerBle && !momentum_settings.allow_locked_rpc_ble) return NULL;
}
furi_check(rpc);