Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5265dc5f authored by Holly Jiuyu Sun's avatar Holly Jiuyu Sun
Browse files

Fix the assumption in GetEuiccProfileInfoListResult.

Under error cases, LPA can return a GetEuiccProfileInfoListResult
with either null profiles or empty profiles.

Bug: 127376266
Test: build
Change-Id: Id29c8f00183660d2195c58c96eb4154454623eb6
parent e5262a39
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
        }