diff options
| author | 2020-11-10 19:22:49 +0000 | |
|---|---|---|
| committer | 2020-11-10 19:22:49 +0000 | |
| commit | 3349eaa9e88a4729a254e3add907b2f609cf9ad4 (patch) | |
| tree | 48da11ed7c5b68304c65a87d0b18a87549fc930a | |
| parent | 4cf0088deea4fdb049e63185f2fb58f58868317e (diff) | |
| parent | 0992000acea457142cb2b715a106057d6cee9166 (diff) | |
Merge "Check that Account Parcel has name and type." into oc-dev
| -rw-r--r-- | core/java/android/accounts/Account.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/accounts/Account.java b/core/java/android/accounts/Account.java index b6e85f18a695..3f90f36fb2a1 100644 --- a/core/java/android/accounts/Account.java +++ b/core/java/android/accounts/Account.java @@ -88,6 +88,12 @@ public class Account implements Parcelable { public Account(Parcel in) { this.name = in.readString(); this.type = in.readString(); + if (TextUtils.isEmpty(name)) { + throw new android.os.BadParcelableException("the name must not be empty: " + name); + } + if (TextUtils.isEmpty(type)) { + throw new android.os.BadParcelableException("the type must not be empty: " + type); + } this.accessId = in.readString(); if (accessId != null) { synchronized (sAccessedAccounts) { |