Skip to content

Commit

Permalink
Enable the secure flags only when it is not a debug build (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjspies committed Oct 24, 2023
1 parent 3afe54c commit 742e98d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/main/kotlin/photos/network/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 742e98d

Please sign in to comment.