summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-11-26 13:48:35 +0100
committerAndrej Mihajlov <and@mullvad.net>2021-11-26 13:48:35 +0100
commit4f1ce838416f438967aa6e65332976711cb47533 (patch)
tree433b4be72024b8affbb823039b86dcaa2ec962b4
parent229b786dade5bf34fa60b44b3a059372913c9cee (diff)
parent0a900b9b871fc6d103b618b02bccb5d9d450d6bf (diff)
downloadmullvadvpn-4f1ce838416f438967aa6e65332976711cb47533.tar.xz
mullvadvpn-4f1ce838416f438967aa6e65332976711cb47533.zip
Merge branch 'hide-app-content-pr'
-rw-r--r--ios/CHANGELOG.md1
-rw-r--r--ios/MullvadVPN/AppDelegate.swift14
2 files changed, 15 insertions, 0 deletions
diff --git a/ios/CHANGELOG.md b/ios/CHANGELOG.md
index 45c68ef992..ebf30f71ca 100644
--- a/ios/CHANGELOG.md
+++ b/ios/CHANGELOG.md
@@ -25,6 +25,7 @@ Line wrap the file at 100 chars. Th
## [Unreleased]
### Added
- Add ability to specify custom DNS servers.
+- Show privacy overlay when entering app switcher.
### Changed
- Attach log backup from previous application run to problem report.
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift
index 8687183d44..8fa8bdad0c 100644
--- a/ios/MullvadVPN/AppDelegate.swift
+++ b/ios/MullvadVPN/AppDelegate.swift
@@ -23,6 +23,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
private let simulatorTunnelProvider = SimulatorTunnelProviderHost()
#endif
+ private lazy var occlusionWindow: UIWindow = {
+ let window = UIWindow(frame: UIScreen.main.bounds)
+ window.rootViewController = LaunchViewController()
+ window.windowLevel = .alert + 1
+ return window
+ }()
+
private var rootContainer: RootContainerViewController?
private var splitViewController: CustomSplitViewController?
private var selectLocationViewController: SelectLocationViewController?
@@ -132,6 +139,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Start periodic private key rotation
TunnelManager.shared.startPeriodicPrivateKeyRotation()
+
+ // Reveal application content
+ occlusionWindow.isHidden = true
+ window?.makeKeyAndVisible()
}
func applicationWillResignActive(_ application: UIApplication) {
@@ -140,6 +151,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Stop periodic private key rotation
TunnelManager.shared.stopPeriodicPrivateKeyRotation()
+
+ // Hide application content
+ occlusionWindow.makeKeyAndVisible()
}
func applicationDidEnterBackground(_ application: UIApplication) {