fix NPE for data signed with an unknown key
This commit is contained in:
@@ -263,6 +263,9 @@ public abstract class DecryptFragment extends Fragment {
|
||||
unifiedKeyInfoLiveData = new GenericLiveData<>(requireContext(), () -> {
|
||||
KeyRepository keyRepository = KeyRepository.create(requireContext());
|
||||
Long masterKeyId = keyRepository.getMasterKeyIdBySubkeyId(mSignatureResult.getKeyId());
|
||||
if (masterKeyId == null) {
|
||||
return null;
|
||||
}
|
||||
return keyRepository.getUnifiedKeyInfo(masterKeyId);
|
||||
});
|
||||
unifiedKeyInfoLiveData.observe(this, this::onLoadSignerKeyData);
|
||||
|
||||
Reference in New Issue
Block a user