mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
Merge pull request #471 from sreeram-boyapati/encryption
Added can_encrypt check
This commit is contained in:
commit
30a002634d
@ -324,7 +324,17 @@ public class ViewKeyMainFragment extends Fragment implements
|
||||
|
||||
mFingerprint.setText(PgpKeyHelper.colorizeFingerprint(fingerprint));
|
||||
}
|
||||
|
||||
int valid_keys = 0;
|
||||
data.moveToFirst();
|
||||
do{
|
||||
if(data.getInt(KEYS_INDEX_CAN_ENCRYPT) == 1){
|
||||
valid_keys++;
|
||||
}
|
||||
}while(data.moveToNext());
|
||||
if(valid_keys == 0){
|
||||
mActionEncrypt.setVisibility(View.GONE);
|
||||
}
|
||||
Log.i("Valid Encryption keys", Integer.toString(valid_keys));
|
||||
mKeysAdapter.swapCursor(data);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user