summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiashen Wang <jiashenwang@google.com>2021-01-14 16:03:10 -0800
committerJiashen Wang <jiashenwang@google.com>2021-01-27 17:05:37 -0800
commit68418a0147bff2fb1b2b7b23a67cf7d42f4a499c (patch)
tree8fb68a71a676581ee942edc02fbc60a9124055f7
parent738abf603a254401199b6197867d58792ec5a21b (diff)
Do now throw exception when activation code is empty
Bug: 169276772 Test: 13352325 Change-Id: Ia8fd0ab98c33d1e30b4fce1bad53b1c628364725 Merged-In: Ia8fd0ab98c33d1e30b4fce1bad53b1c628364725
-rw-r--r--telephony/java/android/telephony/euicc/DownloadableSubscription.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/telephony/java/android/telephony/euicc/DownloadableSubscription.java b/telephony/java/android/telephony/euicc/DownloadableSubscription.java
index 34120790b25a..a5150b010f57 100644
--- a/telephony/java/android/telephony/euicc/DownloadableSubscription.java
+++ b/telephony/java/android/telephony/euicc/DownloadableSubscription.java
@@ -121,25 +121,21 @@ public final class DownloadableSubscription implements Parcelable {
}
public Builder(@NonNull String encodedActivationCode) {
- Preconditions.checkNotNull(encodedActivationCode, "Activation code may not be null");
this.encodedActivationCode = encodedActivationCode;
}
/**
- * Builds a {@link DownloadableSubscription} object. If the encoded activation code is
- * {@code null}, a {@link NullPointerException} will be thrown.
+ * Builds a {@link DownloadableSubscription} object.
* @return a non-null {@link DownloadableSubscription} object.
*/
@NonNull
public DownloadableSubscription build() {
- Preconditions.checkNotNull(encodedActivationCode, "Activation code may not be null");
return new DownloadableSubscription(encodedActivationCode, confirmationCode,
carrierName, accessRules);
}
/**
- * Sets the encoded activation code. If the encoded activation code is {@code null}, a
- * {@link NullPointerException} will be thrown.
+ * Sets the encoded activation code.
* @param value the activation code to use. An activation code can be parsed from a user
* scanned QR code. The format of activation code is defined in SGP.22. For
* example, "1$SMDP.GSMA.COM$04386-AGYFT-A74Y8-3F815$1.3.6.1.4.1.31746". For
@@ -147,7 +143,6 @@ public final class DownloadableSubscription implements Parcelable {
*/
@NonNull
public Builder setEncodedActivationCode(@NonNull String value) {
- Preconditions.checkNotNull(encodedActivationCode, "Activation code may not be null");
encodedActivationCode = value;
return this;
}