Subtly show PIN in BadKB

This commit is contained in:
Willy-JL
2023-02-25 03:25:31 +00:00
parent c6c6b50583
commit 62dd0aded2
4 changed files with 15 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ static void bt_pin_code_hide(Bt* bt) {
static bool bt_pin_code_verify_event_handler(Bt* bt, uint32_t pin) {
furi_assert(bt);
bt->pin = pin;
if(bt_get_profile_pairing_method(bt) == GapPairingNone) return true;
@@ -154,6 +155,8 @@ Bt* bt_alloc() {
// API evnent
bt->api_event = furi_event_flag_alloc();
bt->pin = 0;
return bt;
}
@@ -219,6 +222,7 @@ static bool bt_on_gap_event_callback(GapEvent event, void* context) {
furi_assert(context);
Bt* bt = context;
bool ret = false;
bt->pin = 0;
if(event.type == GapEventTypeConnected) {
// Update status bar

View File

@@ -76,4 +76,5 @@ struct Bt {
FuriEventFlag* api_event;
BtStatusChangedCallback status_changed_cb;
void* status_changed_ctx;
uint32_t pin;
};