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

Commit 2e4e3215 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Added to check to verify the result of the the EVENT_SELECT_FILE_DONE...

Merge "Added to check to verify the result of the the EVENT_SELECT_FILE_DONE in UiccPkcs15" into udc-d1-dev
parents 1637641c 41a8215d
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -106,14 +106,21 @@ public class UiccPkcs15 extends Handler {
                mCallback.sendToTarget();
                return;
            }

            IccIoResult response;
            switch (msg.what) {
                case EVENT_SELECT_FILE_DONE:
                    response = (IccIoResult) ar.result;
                    if (response.getException() == null) {
                        readBinary();
                    } else {
                        log("Select file error : " + response.getException());
                        AsyncResult.forMessage(mCallback, null, response.getException());
                        mCallback.sendToTarget();
                    }
                    break;

                case EVENT_READ_BINARY_DONE:
                    IccIoResult response = (IccIoResult) ar.result;
                    response = (IccIoResult) ar.result;
                    String result = IccUtils.bytesToHexString(response.payload)
                            .toUpperCase(Locale.US);
                    log("IccIoResult: " + response + " payload: " + result);
+2 −2
Original line number Diff line number Diff line
@@ -570,7 +570,7 @@ public class UiccCarrierPrivilegeRulesTest extends TelephonyTest {
            public Void answer(InvocationOnMock invocation) throws Throwable {
                currentFileId.set((String) invocation.getArguments()[6]);
                Message message = (Message) invocation.getArguments()[8];
                AsyncResult ar = new AsyncResult(null, new int[]{2}, null);
                AsyncResult ar = new AsyncResult(null, new IccIoResult(0x90, 0x00, ""), null);
                message.obj = ar;
                message.sendToTarget();
                return null;
@@ -668,7 +668,7 @@ public class UiccCarrierPrivilegeRulesTest extends TelephonyTest {
            public Void answer(InvocationOnMock invocation) throws Throwable {
                currentFileId.set((String) invocation.getArguments()[6]);
                Message message = (Message) invocation.getArguments()[8];
                AsyncResult ar = new AsyncResult(null, new int[]{2}, null);
                AsyncResult ar = new AsyncResult(null, new IccIoResult(0x90, 0x00, ""), null);
                message.obj = ar;
                message.sendToTarget();
                return null;