Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mobile/packages/lock_screen/lib/ui/lock_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -331,6 +332,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
_isShowingLockScreen = false;
if (result) {
lastAuthenticatingTime = DateTime.now().millisecondsSinceEpoch;
await PrivacyScreen.instance.disable();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep privacy protection enabled after unlock

Calling PrivacyScreen.instance.disable() on every successful unlock turns off the privacy-screen feature globally, but this flow never re-enables it. LockScreenSettings only 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 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard privacy-screen disable on desktop unlocks

This unconditional disable() call runs on all platforms, but elsewhere desktop is explicitly excluded from privacy-screen operations. In desktop environments where privacy_screen lacks an implementation, disable() can throw; because it is awaited before didUnlock(), the catch path logs and exits without unlocking, leaving users on the lock screen even after successful authentication.

Useful? React with 👍 / 👎.

AppLock.of(context)?.didUnlock();
await _lockscreenSetting.setInvalidAttemptCount(0);
setState(() {
Expand Down