summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-03-28 19:48:32 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-03-28 19:49:54 +0530
commitdf4bf9b688b4e90ee73fcefa7b7e7c188b0655bf (patch)
tree86f5f52d87ac5d831f18181ddb05b65a11d4babc /ui/src/main/java
parent0f67a2f1943e257d385020e843ff3949a4791667 (diff)
Disable screen capture in tunnel editor
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main/java')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
index 894c0e05..99a77494 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
@@ -13,6 +13,7 @@ import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
+import android.view.WindowManager
import android.view.inputmethod.InputMethodManager
import android.widget.Toast
import com.google.android.material.snackbar.Snackbar
@@ -73,10 +74,12 @@ class TunnelEditorFragment : BaseFragment(), AppExclusionListener {
setUpRoot(root as ViewGroup)
setUpScrollingContent(mainContainer, null)
}
+ requireActivity().window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
return binding?.root
}
override fun onDestroyView() {
+ requireActivity().window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
binding = null
super.onDestroyView()
}