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

Commit 07710866 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make UiccController's local log bigger on debuggable builds." into...

Merge "Make UiccController's local log bigger on debuggable builds." into rvc-dev am: 166c04f0 am: 49214baf

Change-Id: I736110006473c65ae0243d3d1ebc954c55a96133
parents f114f4db 49214baf
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -377,11 +377,9 @@ public class CatService extends Handler implements AppInterface {

        // Log all proactive commands.
        if (isProactiveCmd) {
            if (mUiccController != null) {
                mUiccController.addCardLog("ProactiveCommand mSlotId=" + mSlotId +
            UiccController.addLocalLog("CatService[" + mSlotId + "]: ProactiveCommand " +
                    " cmdParams=" + cmdParams);
        }
        }

        CharSequence message;
        ResultCode resultCode;
+13 −12
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.RadioConfig;
import com.android.internal.telephony.SubscriptionInfoUpdater;
import com.android.internal.telephony.uicc.euicc.EuiccCard;
import com.android.internal.telephony.util.TelephonyUtils;
import com.android.telephony.Rlog;

import java.io.FileDescriptor;
@@ -189,7 +190,7 @@ public class UiccController extends Handler {
    private RadioConfig mRadioConfig;

    // LocalLog buffer to hold important SIM related events for debugging
    static LocalLog sLocalLog = new LocalLog(100);
    private static LocalLog sLocalLog = new LocalLog(TelephonyUtils.IS_DEBUGGABLE ? 250 : 100);

    /**
     * API to make UiccController singleton if not already created.
@@ -886,14 +887,11 @@ public class UiccController extends Handler {
        }
        Throwable e = ar.exception;
        if (e != null) {
            String logStr;
            if (!(e instanceof CommandException) || ((CommandException) e).getCommandError()
                    != CommandException.Error.REQUEST_NOT_SUPPORTED) {
                // this is not expected; there should be no exception other than
                // REQUEST_NOT_SUPPORTED
                logStr = "Unexpected error getting slot status: " + ar.exception;
                Rlog.e(LOG_TAG, logStr);
                sLocalLog.log(logStr);
                logeWithLocalLog("Unexpected error getting slot status: " + ar.exception);
            } else {
                // REQUEST_NOT_SUPPORTED
                logWithLocalLog("onGetSlotStatusDone: request not supported; marking "
@@ -920,10 +918,8 @@ public class UiccController extends Handler {

        int numSlots = status.size();
        if (mUiccSlots.length < numSlots) {
            String logStr = "The number of the physical slots reported " + numSlots
                    + " is greater than the expectation " + mUiccSlots.length + ".";
            Rlog.e(LOG_TAG, logStr);
            sLocalLog.log(logStr);
            logeWithLocalLog("The number of the physical slots reported " + numSlots
                    + " is greater than the expectation " + mUiccSlots.length);
            numSlots = mUiccSlots.length;
        }

@@ -937,7 +933,6 @@ public class UiccController extends Handler {
                if (!isValidPhoneIndex(iss.logicalSlotIndex)) {
                    Rlog.e(LOG_TAG, "Skipping slot " + i + " as phone " + iss.logicalSlotIndex
                               + " is not available to communicate with this slot");

                } else {
                    mPhoneIdToSlotId[iss.logicalSlotIndex] = i;
                }
@@ -1204,10 +1199,16 @@ public class UiccController extends Handler {

    private void logWithLocalLog(String string) {
        Rlog.d(LOG_TAG, string);
        sLocalLog.log(string);
        sLocalLog.log("UiccController: " + string);
    }

    private void logeWithLocalLog(String string) {
        Rlog.e(LOG_TAG, string);
        sLocalLog.log("UiccController: " + string);
    }

    public void addCardLog(String data) {
    /** The supplied log should also indicate the caller to avoid ambiguity. */
    public static void addLocalLog(String data) {
        sLocalLog.log(data);
    }

+1 −1
Original line number Diff line number Diff line
@@ -1726,7 +1726,7 @@ public class UiccProfile extends IccCard {

    private void logWithLocalLog(String msg) {
        Rlog.d(LOG_TAG, msg);
        if (DBG) UiccController.sLocalLog.log("UiccProfile[" + mPhoneId + "]: " + msg);
        if (DBG) UiccController.addLocalLog("UiccProfile[" + mPhoneId + "]: " + msg);
    }

    /**