Skip to content

Commit

Permalink
fix: disallow screenshots in crash activity
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed May 25, 2024
1 parent ce488ea commit 7b36cd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/main/java/ani/dantotsu/others/CrashActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<ViewGroup.MarginLayoutParams> {
topMargin = statusBarHeight
Expand Down

0 comments on commit 7b36cd0

Please sign in to comment.