Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ConnectUserRecord extends Persisted {

@Persisting(4)
private String primaryPhone;

@Deprecated
@Persisting(5)
private String alternatePhone;

Expand All @@ -53,6 +53,7 @@ public class ConnectUserRecord extends Persisted {
@Persisting(value = 10, nullable = true)
@MetaField(META_PIN)
private String pin;
@Deprecated
@Persisting(11)
@MetaField(META_SECONDARY_PHONE_VERIFIED)
/**
Expand Down Expand Up @@ -113,14 +114,6 @@ public void setPrimaryPhone(String primaryPhone) {
this.primaryPhone = primaryPhone;
}

public String getAlternatePhone() {
return alternatePhone;
}

public void setAlternatePhone(String alternatePhone) {
this.alternatePhone = alternatePhone;
}

public void setPin(String pin) {
this.pin = pin;
}
Expand Down Expand Up @@ -166,10 +159,6 @@ public boolean shouldForcePin() {
return shouldForceRecoveryLogin() && pin != null && pin.length() > 0;
}

public boolean shouldForcePassword() {
return shouldForceRecoveryLogin() && !shouldForcePin();
}

private boolean shouldForceRecoveryLogin() {
Date pinDate = getLastPinDate();
boolean forcePin = pinDate == null;
Expand Down Expand Up @@ -207,7 +196,7 @@ public static ConnectUserRecord fromV14(ConnectUserRecordV14 oldRecord) {
newRecord.password = oldRecord.getPassword();
newRecord.name = oldRecord.getName();
newRecord.primaryPhone = oldRecord.getPrimaryPhone();
newRecord.alternatePhone = oldRecord.getAlternatePhone();
newRecord.alternatePhone = "";
newRecord.registrationPhase = oldRecord.getRegistrationPhase();
newRecord.lastPasswordDate = oldRecord.getLastPasswordDate();
newRecord.connectToken = oldRecord.getConnectToken();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class ConnectUserRecordV14 extends Persisted {
@Persisting(4)
private String primaryPhone;

@Deprecated
@Persisting(5)
private String alternatePhone;

Expand All @@ -46,10 +47,12 @@ public class ConnectUserRecordV14 extends Persisted {
@Persisting(value = 10, nullable = true)
@MetaField(META_PIN)
private String pin;

@Deprecated
@Persisting(11)
@MetaField(META_SECONDARY_PHONE_VERIFIED)
private boolean secondaryPhoneVerified;

@Deprecated
@Persisting(12)
@MetaField(META_VERIFY_SECONDARY_PHONE_DATE)
private Date verifySecondaryPhoneByDate;
Expand Down Expand Up @@ -101,10 +104,6 @@ public String getPrimaryPhone() {
return primaryPhone;
}

public String getAlternatePhone() {
return alternatePhone;
}

public int getRegistrationPhase() {
return registrationPhase;
}
Expand Down
6 changes: 0 additions & 6 deletions app/src/org/commcare/utils/PhoneNumberHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,6 @@ public void afterTextChanged(Editable s) {
};
}

public void storeAlternatePhone(Context context, ConnectUserRecord user, String phone) {
user.setAlternatePhone(phone);
ConnectUserDatabaseUtil.storeUser(context, user);
ConnectDatabaseHelper.setRegistrationPhase(context, ConnectConstants.PERSONALID_REGISTRATION_CONFIRM_PIN);
}

public void storePrimaryPhone(Context context, ConnectUserRecord user, String phone) {
user.setPrimaryPhone(phone);
ConnectUserDatabaseUtil.storeUser(context, user);
Expand Down
Loading