-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix slow unlock on iOS by disabling privacy screen immediately #9884
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ import 'package:flutter/material.dart'; | |
| import 'package:flutter/scheduler.dart'; | ||
| import 'package:flutter_animate/flutter_animate.dart'; | ||
| import 'package:logging/logging.dart'; | ||
| import 'package:privacy_screen/privacy_screen.dart'; | ||
|
|
||
| class LockScreen extends StatefulWidget { | ||
| final BaseConfiguration config; | ||
|
|
@@ -331,6 +332,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver { | |
| _isShowingLockScreen = false; | ||
| if (result) { | ||
| lastAuthenticatingTime = DateTime.now().millisecondsSinceEpoch; | ||
| await PrivacyScreen.instance.disable(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This unconditional Useful? React with 👍 / 👎. |
||
| AppLock.of(context)?.didUnlock(); | ||
| await _lockscreenSetting.setInvalidAttemptCount(0); | ||
| setState(() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling
PrivacyScreen.instance.disable()on every successful unlock turns off the privacy-screen feature globally, but this flow never re-enables it.LockScreenSettingsonly enables privacy mode from saved preferences during setup, so users with hide-app-content enabled lose app-switcher/screenshot protection after their first unlock until they restart or manually toggle the setting.Useful? React with 👍 / 👎.