fix crash in ViewKeyActivity

This commit is contained in:
Vincent Breitmoser
2018-07-18 11:05:09 +02:00
parent 59b6d0b1ca
commit 54498ef4c4

View File

@@ -17,7 +17,7 @@ public class UnifiedKeyInfoViewModel extends ViewModel {
private LiveData<UnifiedKeyInfo> unifiedKeyInfoLiveData;
public void setMasterKeyId(long masterKeyId) {
if (this.masterKeyId != null) {
if (this.masterKeyId != null && this.masterKeyId != masterKeyId) {
throw new IllegalStateException("cannot change masterKeyId once set!");
}
this.masterKeyId = masterKeyId;