| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.accounts; |
| 18 |
|
| 19 |
import android.annotation.Nullable; |
| 20 |
import android.compat.annotation.UnsupportedAppUsage; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
public class AccountAndUser { |
| 28 |
@UnsupportedAppUsage |
| 29 |
public Account account; |
| 30 |
@UnsupportedAppUsage |
| 31 |
public int userId; |
| 32 |
|
| 33 |
@UnsupportedAppUsage |
| 34 |
public AccountAndUser(Account account, int userId) { |
| 35 |
this.account = account; |
| 36 |
this.userId = userId; |
| 37 |
} |
| 38 |
|
| 39 |
public boolean equals(@Nullable Object o) { |
| 40 |
if (this == o) return true; |
| 41 |
if (!(o instanceof AccountAndUser)) return false; |
| 42 |
final AccountAndUser other = (AccountAndUser) o; |
| 43 |
return this.account.equals(other.account) |
| 44 |
&& this.userId == other.userId; |
| 45 |
} |
| 46 |
|
| 47 |
@Override |
| 48 |
public int hashCode() { |
| 49 |
return account.hashCode() + userId; |
| 50 |
} |
| 51 |
|
| 52 |
public String toString() { |
| 53 |
return account.toString() + " u" + userId; |
| 54 |
} |
| 55 |
} |