Skip to content

(Android 13, 14, 15 only) Removing screen lock deletes all API keys. #141

Description

@cheeseonamonkey

Affected Component

API Key Management

What happened?

  • API keys are deleted (silently).
  • Likely we were never able to add any API key without having a screen lock!

Steps to reproduce

  1. (Android 13, 14, 15 only)
  2. Have a screen lock PIN/Pattern.
  3. Add an API key,
  4. Remove the phone's secure screen lock.
  5. Force-stop SwiftSlate / reboot.
  6. Reopen it
  7. Bug:
  • API keys are deleted.
  • Likely we were never able to add any API key without a screen lock.

Fix is a single API version check in KeyManager:
#142

Provider (if relevant)

Not applicable

Device & Android version

Android 12.0

Additional context

Android's own documentation specifically warns that Android 12–14 have a platform bug with this flag: if the user has no secure lock screen, unlocked-device-required keys can fail to generate/use; removing the secure lock screen can also delete those keys:
Android Docs (Google)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions