From 0df3aaccae9c2c2bf8575cde91555335bb8f850a Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Thu, 22 Oct 2020 22:27:49 +0200 Subject: [PATCH] Secure authenticator QRCode against screen grabers --- .../smsCommunicator/activities/SmsCommunicatorOtpActivity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt index 964d87ab70..12e4679d38 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt @@ -6,6 +6,7 @@ import android.os.Bundle import android.text.Editable import android.text.TextWatcher import android.view.View +import android.view.WindowManager import com.google.common.primitives.Ints.min import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel import info.nightscout.androidaps.R @@ -31,6 +32,7 @@ class SmsCommunicatorOtpActivity : NoSplashAppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); setContentView(R.layout.activity_smscommunicator_otp) smscommunicator_otp_verify_edit.addTextChangedListener(object : TextWatcher {