mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 11:35:07 -05:00
Added can_encrypt check
This commit is contained in:
parent
107affcb34
commit
57f9b55677
@ -324,7 +324,17 @@ public class ViewKeyMainFragment extends Fragment implements
|
||||
|
||||
mFingerprint.setText(OtherHelper.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