Added can_encrypt check

This commit is contained in:
Sreeram Boyapati 2014-03-23 14:35:48 +05:30
parent 107affcb34
commit 57f9b55677

View File

@ -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;