mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Rewrite layout of EditEntryActivity to not use TableLayout
This prevents excessive overdraw and fixes the UI tests
This commit is contained in:
parent
44ff321f8f
commit
68436fba9c
8 changed files with 130 additions and 135 deletions
|
@ -39,7 +39,7 @@ public class HotpInfo extends OtpInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
public String getTypeId() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,11 @@ public abstract class OtpInfo implements Serializable {
|
|||
|
||||
public abstract String getOtp();
|
||||
|
||||
public abstract String getType();
|
||||
public abstract String getTypeId();
|
||||
|
||||
public String getType() {
|
||||
return getType().toUpperCase();
|
||||
}
|
||||
|
||||
public JSONObject toJson() {
|
||||
JSONObject obj = new JSONObject();
|
||||
|
@ -127,7 +131,7 @@ public abstract class OtpInfo implements Serializable {
|
|||
}
|
||||
|
||||
OtpInfo info = (OtpInfo) o;
|
||||
return getType().equals(info.getType())
|
||||
return getTypeId().equals(info.getTypeId())
|
||||
&& Arrays.equals(getSecret(), info.getSecret())
|
||||
&& getAlgorithm(false).equals(info.getAlgorithm(false))
|
||||
&& getDigits() == info.getDigits();
|
||||
|
|
|
@ -28,7 +28,13 @@ public class SteamInfo extends TotpInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
public String getTypeId() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
String id = getTypeId();
|
||||
return id.substring(0, 1).toUpperCase() + id.substring(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class TotpInfo extends OtpInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
public String getTypeId() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ public class EditEntryActivity extends AegisActivity {
|
|||
_textSecret.setText(secretString);
|
||||
}
|
||||
|
||||
_dropdownType.setText(_origEntry.getInfo().getType().toUpperCase(), false);
|
||||
_dropdownType.setText(_origEntry.getInfo().getTypeId().toUpperCase(), false);
|
||||
_dropdownAlgo.setText(_origEntry.getInfo().getAlgorithm(false), false);
|
||||
|
||||
String group = _origEntry.getGroup();
|
||||
|
|
|
@ -53,7 +53,7 @@ public class VaultEntry extends UUIDMap.Value {
|
|||
JSONObject obj = new JSONObject();
|
||||
|
||||
try {
|
||||
obj.put("type", _info.getType());
|
||||
obj.put("type", _info.getTypeId());
|
||||
obj.put("uuid", getUUID().toString());
|
||||
obj.put("name", _name);
|
||||
obj.put("issuer", _issuer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue