Add usage count to entries

Update Preferences.java

Fix build error and review improvements
This commit is contained in:
Michael Schättgen 2021-06-02 18:02:38 +02:00
parent 7506c70236
commit 34cd16f240
16 changed files with 235 additions and 1 deletions

View file

@ -17,6 +17,8 @@ import java.util.Arrays;
import java.util.Objects;
import java.util.UUID;
import javax.annotation.Nonnull;
public class VaultEntry extends UUIDMap.Value {
private String _name = "";
private String _issuer = "";
@ -24,6 +26,7 @@ public class VaultEntry extends UUIDMap.Value {
private OtpInfo _info;
private byte[] _icon;
private IconType _iconType = IconType.INVALID;
private int _usageCount;
private VaultEntry(UUID uuid, OtpInfo info) {
super(uuid);
@ -130,6 +133,10 @@ public class VaultEntry extends UUIDMap.Value {
return _info;
}
public int getUsageCount() {
return _usageCount;
}
public void setName(String name) {
_name = name;
}
@ -155,6 +162,8 @@ public class VaultEntry extends UUIDMap.Value {
return _icon != null;
}
public void setUsageCount(int usageCount) { _usageCount = usageCount; }
@Override
public boolean equals(Object o) {
if (!(o instanceof VaultEntry)) {