fix(ui-lvgl): no USB drive behind the screen PIN; drop the NVS PIN migration

The SD card (message history) could be lent to a computer from the lock
card before the PIN was entered. While locked with a PIN, usbPoll() no
longer reacts; a cable plugged in meanwhile is offered once unlocked.

The plain-text NVS PIN never shipped, so there's nothing to migrate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-09-29 00:13:33 +02:00
co-authored by Claude Opus 5.5
parent 4bda4f3a76
commit e28b5c5c51
3 changed files with 4 additions and 16 deletions
@@ -898,14 +898,6 @@ void UITask::begin(DisplayDriver* display_drv, SensorManager* sensors, NodePrefs
buildStatusBar();
applyDisplayPrefs(); // a slider percentage overrides the level main.cpp set
showHome();
// Before the PIN moved into NodePrefs it was kept in NVS in plain text.
char old_pin[9];
lvport::takeOldPin(old_pin, sizeof(old_pin));
if (old_pin[0] && _prefs && !pinSet()) {
screenlock::set(*_prefs, old_pin, the_mesh.getRNG());
the_mesh.savePrefs();
}
memset(old_pin, 0, sizeof(old_pin));
if (pinSet()) lockScreen(); // a reboot doesn't get round the PIN
showSplash(); // over both; fades out by itself
}