Skip to content

Commit

Permalink
Merge pull request #2502 from myxmaster/setRecentsScreenshotEnabled
Browse files Browse the repository at this point in the history
Android only: Set 'setRecentsScreenshotEnabled' to false to avoid data leak via recents
  • Loading branch information
kaloudis authored Nov 1, 2024
2 parents ac511b7 + 0bfd522 commit 6aaa6c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions android/app/src/main/java/com/zeus/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package app.zeusln.zeus

import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.widget.Toast
import com.facebook.react.ReactActivity
Expand Down Expand Up @@ -31,6 +32,11 @@ class MainActivity : ReactActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(null)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
setRecentsScreenshotEnabled(false) // Avoid data leak via recents
}

currentActivity = WeakReference(this@MainActivity)
started = true
}
Expand Down

0 comments on commit 6aaa6c1

Please sign in to comment.