From 742e98dd75e455f0e84449121b3ed0996edbf7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20J=C3=B6rg=20Spies?= <121790537+rjspies@users.noreply.github.com> Date: Tue, 24 Oct 2023 07:17:04 +0200 Subject: [PATCH] Enable the secure flags only when it is not a debug build (#156) --- app/src/main/kotlin/photos/network/MainActivity.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/photos/network/MainActivity.kt b/app/src/main/kotlin/photos/network/MainActivity.kt index ed83fdc5..5a1e0a68 100644 --- a/app/src/main/kotlin/photos/network/MainActivity.kt +++ b/app/src/main/kotlin/photos/network/MainActivity.kt @@ -53,7 +53,12 @@ class MainActivity : ComponentActivity() { WindowCompat.setDecorFitsSystemWindows(window, false) - window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE) + if (!BuildConfig.DEBUG) { + window.setFlags( + WindowManager.LayoutParams.FLAG_SECURE, + WindowManager.LayoutParams.FLAG_SECURE, + ) + } setContent { PhotosApp(