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

Commit 6ecde933 authored by Junda Liu's avatar Junda Liu
Browse files

Fix lower case hex string.

Code expects uppercase TAG and AID and ignores payload if lowercase. Convert payload to uppercase solves the issue.

Bug: b/28426990
Change-Id: I840e6175c9c8617b81fa4ad8b2ddb9d64ecbfe6a
parent edebaf37
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import java.lang.IndexOutOfBoundsException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;

/**
 * Class that reads PKCS15-based rules for carrier privileges.
@@ -122,7 +123,8 @@ public class UiccPkcs15 extends Handler {

                case EVENT_READ_BINARY_DONE:
                    IccIoResult response = (IccIoResult) ar.result;
                    String result = IccUtils.bytesToHexString(response.payload);
                    String result = IccUtils.bytesToHexString(response.payload)
                            .toUpperCase(Locale.US);
                    log("IccIoResult: " + response + " payload: " + result);
                    AsyncResult.forMessage(mCallback, result, (result == null) ?
                            new IccException("Error: null response for " + mFileId) : null);