Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FL-3332] Autolock fixes #3905

Closed
wants to merge 17 commits into from

Conversation

portasynthinca3
Copy link
Member

@portasynthinca3 portasynthinca3 commented Sep 16, 2024

What's new

Verification

  • Set up a PIN and 30s autolocking

Fix A:

  • While the device is unlocked, open a CLI session
  • While the device is still unlocked, press the back button to reset the inactivity timer, start a stopwatch at the same exact moment
  • Verify that the CLI session is still active after 30 seconds
  • Verify that there's a CLI icon on the desktop
  • Terminate the CLI session
  • Verify that the device locks itself after 30 seconds

Fix B:

  • Unlock the device, press the back button to reset the inactivity timer, start a stopwatch at the same exact moment
  • While the device is still unlocked, run ./fbt flash_usb_full such that the process of uploading the files crosses the 30-second mark (the timing is tricky to get right, i admit)
  • Verify that the upload is not interrupted

Fix C:

  • Unlock the device, press the back button to reset the inactivity timer, start a stopwatch at the same exact moment
  • Connect to the device via qFlipper or Flipper Lab
  • While the device is still unlocked, update the firmware such that the process of uploading the files crosses the 30-second mark (again, kinda tricky)
  • Verify that the upload is not interrupted

Fix D:

  • Power-cycle the device using all available methods (soft reset, hard reset, reboot via settings, power off and on via settings)
  • Verify that the device locks itself upon startup no matter the state that it was in prior to it

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Copy link

github-actions bot commented Sep 16, 2024

Compiled f7 firmware for commit fc4d555f:

@portasynthinca3 portasynthinca3 marked this pull request as draft September 16, 2024 16:33
@Devnol
Copy link

Devnol commented Sep 16, 2024

Lmao I actually forgot to report this other bug I found but it looks like you caught it too. Leaving the device idle while connected with RPC will autolock it and drop the RPC. The workaround I found was actually to enter any app (e.g. NFC) and just sit in that screen which prevented the autolock (dunno if that's also a bug or not, seems like intended to me).

@portasynthinca3 portasynthinca3 marked this pull request as ready for review September 17, 2024 10:28
applications/services/desktop/desktop_i.h Outdated Show resolved Hide resolved
applications/services/desktop/views/desktop_events.h Outdated Show resolved Hide resolved
applications/services/cli/cli_vcp.c Outdated Show resolved Hide resolved
applications/services/cli/cli_vcp.c Outdated Show resolved Hide resolved
applications/services/desktop/desktop.c Outdated Show resolved Hide resolved
applications/services/desktop/desktop.c Outdated Show resolved Hide resolved
@skotopes skotopes marked this pull request as draft October 6, 2024 20:55
Copy link

github-actions bot commented Oct 8, 2024

PVS-Studio report for commit 607ed487:

@portasynthinca3 portasynthinca3 marked this pull request as ready for review October 8, 2024 14:13
applications/main/u2f/u2f_hid.c Show resolved Hide resolved
applications/services/desktop/desktop.c Outdated Show resolved Hide resolved
@skotopes skotopes marked this pull request as draft October 14, 2024 13:55
@skotopes
Copy link
Member

Please fix merge conflict

@portasynthinca3 portasynthinca3 marked this pull request as ready for review October 14, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inhibit automatic screen locking when connected via USB CDC [Request] - Require PIN on cold boot
3 participants