fix error in savePublicKey

This commit is contained in:
Vincent Breitmoser
2018-06-12 15:39:42 +02:00
parent 6e67c14949
commit c309c75fee

View File

@@ -797,7 +797,7 @@ public class KeyWritableRepository extends KeyRepository {
if (!forceRefresh && Arrays.hashCode(publicRing.getEncoded()) if (!forceRefresh && Arrays.hashCode(publicRing.getEncoded())
== Arrays.hashCode(oldPublicRing.getEncoded())) { == Arrays.hashCode(oldPublicRing.getEncoded())) {
log(LogType.MSG_IP_SUCCESS_IDENTICAL); log(LogType.MSG_IP_SUCCESS_IDENTICAL);
return new SaveKeyringResult(SaveKeyringResult.UPDATED, mLog, null); return new SaveKeyringResult(SaveKeyringResult.UPDATED, mLog, canPublicRing);
} }
} catch (NotFoundException e) { } catch (NotFoundException e) {
// Not an issue, just means we are dealing with a new keyring. // Not an issue, just means we are dealing with a new keyring.
@@ -868,7 +868,7 @@ public class KeyWritableRepository extends KeyRepository {
} }
} }
return new SaveKeyringResult(result, mLog, canSecretRing); return new SaveKeyringResult(result, mLog, canPublicRing);
} catch (IOException e) { } catch (IOException e) {
log(LogType.MSG_IP_ERROR_IO_EXC); log(LogType.MSG_IP_ERROR_IO_EXC);
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog, null); return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog, null);