diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-13 21:17:19 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-13 21:17:19 +0200 |
commit | a1323a1a1456ce2b50599d66304178ebddb02efd (patch) | |
tree | c58083b898d651803da89758ae320fea106b14a3 /OpenKeychain/src | |
parent | 3bc3bc6d5878d19d7dbf7dc452d5650eb6e3c212 (diff) | |
download | open-keychain-a1323a1a1456ce2b50599d66304178ebddb02efd.tar.gz open-keychain-a1323a1a1456ce2b50599d66304178ebddb02efd.tar.bz2 open-keychain-a1323a1a1456ce2b50599d66304178ebddb02efd.zip |
deactivate screenshots in new PassphraseDialogActivity
Diffstat (limited to 'OpenKeychain/src')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java index c361414a8..fa9444862 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java @@ -31,6 +31,7 @@ import android.support.v4.app.FragmentActivity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; +import android.view.WindowManager; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; import android.widget.Button; @@ -64,6 +65,15 @@ public class PassphraseDialogActivity extends FragmentActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // do not allow screenshots of passphrase input + // to prevent "too easy" passphrase theft by root apps + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) { + getWindow().setFlags( + WindowManager.LayoutParams.FLAG_SECURE, + WindowManager.LayoutParams.FLAG_SECURE + ); + } + // this activity itself has no content view (see manifest) long keyId = getIntent().getLongExtra(EXTRA_SECRET_KEY_ID, 0); |