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

Commit 0c19ae87 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add logs for RadioConfig"

parents 2a7f19d2 becf7346
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.util.SparseArray;
import com.android.internal.telephony.uicc.IccSlotStatus;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicLong;

/**
@@ -267,7 +268,8 @@ public class RadioConfig extends Handler {
                    mDefaultWorkSource);

            if (DBG) {
                logd(rr.serialString() + "> " + requestToString(rr.mRequest));
                logd(rr.serialString() + "> " + requestToString(rr.mRequest)
                        + " " + Arrays.toString(physicalSlots));
            }

            try {
@@ -287,7 +289,7 @@ public class RadioConfig extends Handler {
        return arrayList;
    }

    private static String requestToString(int request) {
    static String requestToString(int request) {
        switch (request) {
            case RIL_REQUEST_GET_SLOT_STATUS:
                return "GET_SLOT_STATUS";
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.internal.telephony;
import android.hardware.radio.config.V1_0.IRadioConfigIndication;
import android.hardware.radio.config.V1_0.SimSlotStatus;
import android.os.AsyncResult;
import android.telephony.Rlog;

import com.android.internal.telephony.uicc.IccSlotStatus;

@@ -29,6 +30,7 @@ import java.util.ArrayList;
 */
public class RadioConfigIndication extends IRadioConfigIndication.Stub {
    private final RadioConfig mRadioConfig;
    private static final String TAG = "RadioConfigIndication";

    public RadioConfigIndication(RadioConfig radioConfig) {
        mRadioConfig = radioConfig;
@@ -39,7 +41,7 @@ public class RadioConfigIndication extends IRadioConfigIndication.Stub {
     */
    public void simSlotsStatusChanged(int indicationType, ArrayList<SimSlotStatus> slotStatus) {
        ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus(slotStatus);

        Rlog.d(TAG, "[UNSL]< " + " UNSOL_SIM_SLOT_STATUS_CHANGED " + ret.toString());
        if (mRadioConfig.mSimSlotStatusRegistrant != null) {
            mRadioConfig.mSimSlotStatusRegistrant.notifyRegistrant(
                    new AsyncResult(null, ret, null));
+19 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.hardware.radio.V1_0.RadioError;
import android.hardware.radio.V1_0.RadioResponseInfo;
import android.hardware.radio.config.V1_0.IRadioConfigResponse;
import android.hardware.radio.config.V1_0.SimSlotStatus;
import android.telephony.Rlog;

import com.android.internal.telephony.uicc.IccSlotStatus;

@@ -30,6 +31,7 @@ import java.util.ArrayList;
 */
public class RadioConfigResponse extends IRadioConfigResponse.Stub {
    private final RadioConfig mRadioConfig;
    private static final String TAG = "RadioConfigResponse";

    public RadioConfigResponse(RadioConfig radioConfig) {
        mRadioConfig = radioConfig;
@@ -47,9 +49,17 @@ public class RadioConfigResponse extends IRadioConfigResponse.Stub {
            if (responseInfo.error == RadioError.NONE) {
                // send response
                RadioResponse.sendMessageResponse(rr.mResult, ret);
                Rlog.d(TAG, rr.serialString() + "< "
                        + mRadioConfig.requestToString(rr.mRequest) + " " + ret.toString());
            } else {
                rr.onError(responseInfo.error, ret);
                Rlog.e(TAG, rr.serialString() + "< "
                        + mRadioConfig.requestToString(rr.mRequest) + " error "
                        + responseInfo.error);
            }

        } else {
            Rlog.e(TAG, "getSimSlotsStatusResponse: Error " + responseInfo.toString());
        }
    }

@@ -63,9 +73,18 @@ public class RadioConfigResponse extends IRadioConfigResponse.Stub {
            if (responseInfo.error == RadioError.NONE) {
                // send response
                RadioResponse.sendMessageResponse(rr.mResult, null);
                Rlog.d(TAG, rr.serialString() + "< "
                        + mRadioConfig.requestToString(rr.mRequest));
            } else {
                rr.onError(responseInfo.error, null);
                Rlog.e(TAG, rr.serialString() + "< "
                        + mRadioConfig.requestToString(rr.mRequest) + " error "
                        + responseInfo.error);
            }
        } else {
            Rlog.e(TAG, "setSimSlotsMappingResponse: Error " + responseInfo.toString());
        }
    }


}