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

Commit e367d484 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
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 am: 2e4e3215 am: a123c79f am: 49392f97

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/23103739



Change-Id: I87e313dd075f664119bc4eb320e4885588906fb4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5de3c261 49392f97
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;