diff options
| -rw-r--r-- | core/java/android/service/euicc/GetEuiccProfileInfoListResult.java | 5 |
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 464d136e70e5..9f2b522db78a 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; } |