Revert "try rollback subghz fix"

This reverts commit 793f64f8d7.
This commit is contained in:
r3df0xx
2022-05-19 20:04:23 +03:00
parent ca35915b96
commit 64073bd905
3 changed files with 120 additions and 47 deletions

View File

@@ -56,12 +56,7 @@ static bool desktop_custom_event_callback(void* context, uint32_t event) {
return true;
case DesktopGlobalAutoLock:
if(!loader_is_locked(desktop->loader)) {
if(desktop->settings.pin_code.length > 0) {
desktop_pin_lock(&desktop->settings);
desktop_lock(desktop);
} else {
desktop_lock(desktop);
}
desktop_lock(desktop);
}
return true;
}

View File

@@ -100,11 +100,12 @@ void desktop_pin_lock_init(DesktopSettings* settings) {
} else {
furi_hal_rtc_set_pin_fails(0);
furi_hal_rtc_reset_flag(FuriHalRtcFlagLock);
furi_hal_usb_enable();
}
if(desktop_pin_lock_is_locked()) {
furi_hal_usb_disable();
Cli* cli = furi_record_open("cli");
cli_session_close(cli);
furi_record_close("cli");
}
}