summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiuyu Sun <jiuyu@google.com> 2019-03-21 03:06:15 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-03-21 03:06:15 +0000
commita596e744855e9286ef52359291137728cd812a0c (patch)
treeb8558603f9d47a0ec770b2bb8e81fc2e06657af4
parent250b26851d67a6ccee7a43cb525a934fc22ef79e (diff)
parent5265dc5fc3aefd62cf78d4bef845705fa0e54695 (diff)
Merge "Fix the assumption in GetEuiccProfileInfoListResult."
-rw-r--r--core/java/android/service/euicc/GetEuiccProfileInfoListResult.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java b/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
index 7a9d8a05ab47..9add38e40d9b 100644
--- a/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
+++ b/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
@@ -97,9 +97,10 @@ public final class GetEuiccProfileInfoListResult implements Parcelable {
if (this.result == EuiccService.RESULT_OK) {
this.mProfiles = profiles;
} else {
- if (profiles != null) {
+ // For error case, profiles is either null or 0 size.
+ if (profiles != null && profiles.length > 0) {
throw new IllegalArgumentException(
- "Error result with non-null profiles: " + result);
+ "Error result with non-empty profiles: " + result);
}
this.mProfiles = null;
}