|
13 | 13 | */ |
14 | 14 | @ParametersAreNonnullByDefault |
15 | 15 | public class SignUpInfo implements Parcelable { |
16 | | - private String username, password; |
| 16 | + private String username, password, email; |
17 | 17 | @SerializedName("grant_type") @Nullable |
18 | 18 | private String grantType; |
19 | 19 | @SerializedName("account_info") @Nullable |
20 | 20 | private AccountInfo accountInfo; |
21 | 21 |
|
| 22 | + public SignUpInfo(String username, String password, String email) { |
| 23 | + this.username = username; |
| 24 | + this.password = password; |
| 25 | + this.email = email; |
| 26 | + } |
| 27 | + |
| 28 | + public SignUpInfo(String username, String password, String email, AccountInfo accountInfo) { |
| 29 | + this.username = username; |
| 30 | + this.password = password; |
| 31 | + this.accountInfo = accountInfo; |
| 32 | + this.email = email; |
| 33 | + } |
| 34 | + |
22 | 35 | public SignUpInfo(String username, String password) { |
23 | 36 | this.username = username; |
24 | 37 | this.password = password; |
| 38 | + this.email = username; |
25 | 39 | } |
26 | 40 |
|
27 | 41 | public SignUpInfo(String username, String password, AccountInfo accountInfo) { |
28 | 42 | this.username = username; |
29 | 43 | this.password = password; |
30 | 44 | this.accountInfo = accountInfo; |
| 45 | + this.email = username; |
| 46 | + } |
| 47 | + |
| 48 | + public String getEmail() { |
| 49 | + return email; |
31 | 50 | } |
32 | 51 |
|
33 | 52 | public String getUsername() { |
@@ -66,13 +85,15 @@ public int describeContents() { |
66 | 85 | public void writeToParcel(Parcel dest, int flags) { |
67 | 86 | dest.writeString(this.username); |
68 | 87 | dest.writeString(this.password); |
| 88 | + dest.writeString(this.email); |
69 | 89 | dest.writeString(this.grantType); |
70 | 90 | dest.writeParcelable(this.accountInfo, flags); |
71 | 91 | } |
72 | 92 |
|
73 | 93 | protected SignUpInfo(Parcel in) { |
74 | 94 | this.username = in.readString(); |
75 | 95 | this.password = in.readString(); |
| 96 | + this.email = in.readString(); |
76 | 97 | this.grantType = in.readString(); |
77 | 98 | this.accountInfo = in.readParcelable(AccountInfo.class.getClassLoader()); |
78 | 99 | } |
|
0 commit comments