mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-15 21:35:05 -05:00
deactivate screenshots in new PassphraseDialogActivity
This commit is contained in:
parent
3bc3bc6d58
commit
a1323a1a14
@ -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);
|
||||
|
@ -15,3 +15,4 @@ include ':extern:KeybaseLib:Lib'
|
||||
include ':extern:TokenAutoComplete:library'
|
||||
include ':extern:openpgp-card-nfc-lib:library'
|
||||
include ':extern:safeslinger-exchange'
|
||||
include ':OpenKeychain-Test'
|
||||
|
Loading…
Reference in New Issue
Block a user