Skip to content

Conversation

@uellenberg
Copy link

This adds a simple biometric lock to the whole application. Once toggled in settings, it requires a fingerprint/password/other authentication method to be used before the app can be opened.

Until it's closed, the app will stay permanently unlocked. This doesn't implement locking when moving to a different window / after a certain period of time, account-specific locks, or wiping auth data when biometrics change.

There were two bugs with TextSwitchPreference:
1. The switch display was consuming click events when they should have
   been given to the parent.
2. The materialSwitch variable became stale, and state updates didn't
   propagate correctly.

onBindViewHolder is always called when the underlying Preference
updates, so we can fix these two issues in in. Afterwards, state should
always be in sync.
If the activity was quickly closed, then onDestroyed might be called
without onStart, leading to an attempt at unregistering a non-existent
receiver and causing a crash.
This adds a simple biometric lock to the whole application. Once toggled
in settings, it requires a fingerprint/password/other authentication
method to be used before the app can be opened.

Until it's closed, the app will stay permanently unlocked. This doesn't
implement locking when moving to a different window / after a certain
period of time, account-specific locks, or wiping auth data when
biometrics change.
@uellenberg
Copy link
Author

Fixes #1096

@zhwanng I'm interested in getting a security feature like this into the Seadroid app. Please let me know if you have any feedback/concerns.

The biggest issue right now is that MainActivity won't be opened until the user authenticates, so all of the code to register with the server and handle background backups won't be called. I think it's desirable to not force the user to authenticate every time they reboot their device in order for the background backup to work. I'm thinking of moving some of the code out of MainActivity and into the application, that way it always runs.

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.

1 participant