From 1a51772083566f0792fbaadf8c5dfbfc9cba4cb7 Mon Sep 17 00:00:00 2001 From: Soner YUKSEL Date: Thu, 17 Aug 2023 16:56:05 -0400 Subject: [PATCH] Fix brave/brave-ios#7893: Browser Lock - Cancel Issue (brave/brave-ios#7894) --- Sources/Brave/Frontend/Passcode/WindowProtection.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Brave/Frontend/Passcode/WindowProtection.swift b/Sources/Brave/Frontend/Passcode/WindowProtection.swift index 19ffcd5764ca..21e76001867e 100644 --- a/Sources/Brave/Frontend/Passcode/WindowProtection.swift +++ b/Sources/Brave/Frontend/Passcode/WindowProtection.swift @@ -148,6 +148,8 @@ public class WindowProtection { NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification) .sink(receiveValue: { [weak self] _ in guard let self = self else { return } + // Should set as non cancallable for browser lock + self.isCancellable = false // Update visibility when entering background self.isVisible = Preferences.Privacy.lockWithPasscode.value && self.context.canEvaluatePolicy(.deviceOwnerAuthentication, error: nil) })