From 7b36cd0d2927f04243d4d52ccc72e6f7a26bb698 Mon Sep 17 00:00:00 2001 From: rebelonion <87634197+rebelonion@users.noreply.github.com> Date: Sat, 25 May 2024 10:11:24 -0500 Subject: [PATCH] fix: disallow screenshots in crash activity --- app/src/main/java/ani/dantotsu/others/CrashActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/ani/dantotsu/others/CrashActivity.kt b/app/src/main/java/ani/dantotsu/others/CrashActivity.kt index d3b5e75425..c410d687b6 100644 --- a/app/src/main/java/ani/dantotsu/others/CrashActivity.kt +++ b/app/src/main/java/ani/dantotsu/others/CrashActivity.kt @@ -4,6 +4,7 @@ import android.content.Intent import android.os.Bundle import android.view.View import android.view.ViewGroup +import android.view.WindowManager import androidx.appcompat.app.AppCompatActivity import androidx.core.content.FileProvider import androidx.core.view.updateLayoutParams @@ -24,7 +25,10 @@ class CrashActivity : AppCompatActivity() { ThemeManager(this).applyTheme() initActivity(this) binding = ActivityCrashBinding.inflate(layoutInflater) - + window.setFlags( + WindowManager.LayoutParams.FLAG_SECURE, + WindowManager.LayoutParams.FLAG_SECURE + ) setContentView(binding.root) binding.root.updateLayoutParams { topMargin = statusBarHeight