diff options
-rw-r--r-- | core/java/android/service/credentials/BeginGetCredentialOption.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/service/credentials/BeginGetCredentialOption.java b/core/java/android/service/credentials/BeginGetCredentialOption.java index 81b9f22ebc7f..1ad0424f44e3 100644 --- a/core/java/android/service/credentials/BeginGetCredentialOption.java +++ b/core/java/android/service/credentials/BeginGetCredentialOption.java @@ -116,12 +116,12 @@ public class BeginGetCredentialOption implements Parcelable { * @param id the unique id associated with this option * @param type the requested credential type * @param candidateQueryData the request candidateQueryData - * @throws IllegalArgumentException If type is empty. + * @throws IllegalArgumentException If id or type is empty. */ public BeginGetCredentialOption( @NonNull String id, @NonNull String type, @NonNull Bundle candidateQueryData) { - mId = id; + mId = Preconditions.checkStringNotEmpty(id, "id must not be empty"); mType = Preconditions.checkStringNotEmpty(type, "type must not be empty"); Bundle bundle = new Bundle(); bundle.putAll(candidateQueryData); |