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

Commit 41a8215d authored by arunvoddu's avatar arunvoddu Committed by Jayachandran C
Browse files

Added to check to verify the result of the the EVENT_SELECT_FILE_DONE in UiccPkcs15

Bug: 278928983
Test: atest FrameworksTelephonyTests
Test: Manually verified through logs and performed basic sanity and found no issues.
Change-Id: I5f313a37c2712a64c191633332fd1ea87b56f465
parent 04021dc6
Loading
Loading
Loading
Loading
+10 −3
Original line number Original line Diff line number Diff line
@@ -106,14 +106,21 @@ public class UiccPkcs15 extends Handler {
                mCallback.sendToTarget();
                mCallback.sendToTarget();
                return;
                return;
            }
            }

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


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