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

Commit dc3b93d5 authored by Jack Yu's avatar Jack Yu
Browse files

Added dump support to more telephony components.

Added dump support to Ims components and also improved service
state tracker dump support.

bug: 25955373
Change-Id: I295ac57be70303b072069dca70fd3b8827461cfc
parent 30646d03
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -2460,6 +2460,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * TODO: Revisit if we always should return at least one entry.
     */
    public String[] getActiveApnTypes() {
        if (mDcTracker == null) {
            return null;
        }

        return mDcTracker.getActiveApnTypes();
    }

@@ -3184,6 +3188,14 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        pw.flush();
        pw.println("++++++++++++++++++++++++++++++++");

        try {
            mImsPhone.dump(fd, pw, args);
        } catch (Exception e) {
            e.printStackTrace();
        }
        pw.flush();
        pw.println("++++++++++++++++++++++++++++++++");

        try {
            mDcTracker.dump(fd, pw, args);
        } catch (Exception e) {
+1 −0
Original line number Diff line number Diff line
@@ -444,6 +444,7 @@ public class PhoneFactory {

    public static void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("PhoneFactory:");
        pw.println(" sMadeDefaults=" + sMadeDefaults);
        Phone[] phones = (Phone[])PhoneFactory.getPhones();
        int i = -1;
        for(Phone phone : phones) {
+14 −0
Original line number Diff line number Diff line
@@ -4571,17 +4571,24 @@ public class ServiceStateTracker extends Handler {

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("ServiceStateTracker:");
        pw.println(" mSubId=" + mSubId);
        pw.println(" mSS=" + mSS);
        pw.println(" mNewSS=" + mNewSS);
        pw.println(" mVoiceCapable=" + mVoiceCapable);
        pw.println(" mCellInfo=" + mCellInfo);
        pw.println(" mCellInfoLte=" + mCellInfoLte);
        pw.println(" mRestrictedState=" + mRestrictedState);
        pw.println(" mPollingContext=" + mPollingContext);
        pw.println(" mDesiredPowerState=" + mDesiredPowerState);
        pw.println(" mDontPollSignalStrength=" + mDontPollSignalStrength);
        pw.println(" mSignalStrength=" + mSignalStrength);
        pw.println(" mLastSignalStrength=" + mLastSignalStrength);
        pw.println(" mRestrictedState=" + mRestrictedState);
        pw.println(" mPendingRadioPowerOffAfterDataOff=" + mPendingRadioPowerOffAfterDataOff);
        pw.println(" mPendingRadioPowerOffAfterDataOffTag=" + mPendingRadioPowerOffAfterDataOffTag);
        pw.println(" mCellLoc=" + mCellLoc);
        pw.println(" mNewCellLoc=" + mNewCellLoc);
        pw.println(" mLastCellInfoListTime=" + mLastCellInfoListTime);
        pw.println(" mPreferredNetworkType=" + mPreferredNetworkType);
        pw.println(" mMaxDataCalls=" + mMaxDataCalls);
        pw.println(" mNewMaxDataCalls=" + mNewMaxDataCalls);
@@ -4627,6 +4634,13 @@ public class ServiceStateTracker extends Handler {
        pw.println(" mRegistrationDeniedReason=" + mRegistrationDeniedReason);
        pw.println(" mCurrentCarrier=" + mCurrentCarrier);
        pw.flush();
        pw.println(" mImsRegistered=" + mImsRegistered);
        pw.println(" mImsRegistrationOnOff=" + mImsRegistrationOnOff);
        pw.println(" mAlarmSwitch=" + mAlarmSwitch);
        pw.println(" mPowerOffDelayNeed=" + mPowerOffDelayNeed);
        pw.println(" mDeviceShuttingDown=" + mDeviceShuttingDown);
        pw.println(" mSpnUpdatePending=" + mSpnUpdatePending);


    }

+22 −0
Original line number Diff line number Diff line
@@ -90,6 +90,8 @@ import com.android.internal.telephony.UUSInfo;
import com.android.internal.telephony.gsm.SuppServiceNotification;
import com.android.internal.telephony.uicc.IccRecords;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

@@ -1529,4 +1531,24 @@ public class ImsPhone extends ImsPhoneBase {
    public boolean isUtEnabled() {
        return mCT.isUtEnabled();
    }

    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("ImsPhone extends:");
        super.dump(fd, pw, args);
        pw.flush();

        pw.println("ImsPhone:");
        pw.println("  mDefaultPhone = " + mDefaultPhone);
        pw.println("  mPendingMMIs = " + mPendingMMIs);
        pw.println("  mPostDialHandler = " + mPostDialHandler);
        pw.println("  mSS = " + mSS);
        pw.println("  mWakeLock = " + mWakeLock);
        pw.println("  mIsPhoneInEcmState = " + mIsPhoneInEcmState);
        pw.println("  mEcmExitRespRegistrant = " + mEcmExitRespRegistrant);
        pw.println("  mSilentRedialRegistrants = " + mSilentRedialRegistrants);
        pw.println("  mImsRegistered = " + mImsRegistered);
        pw.println("  mSsnRegistrants = " + mSsnRegistrants);
        pw.flush();
    }
}
+21 −0
Original line number Diff line number Diff line
@@ -1849,6 +1849,27 @@ public final class ImsPhoneCallTracker extends CallTracker {
        pw.println(" mPhone=" + mPhone);
        pw.println(" mDesiredMute=" + mDesiredMute);
        pw.println(" mState=" + mState);
        for (int i = 0; i < mImsFeatureEnabled.length; i++) {
            pw.println(" " + mImsFeatureStrings[i] + ": "
                    + ((mImsFeatureEnabled[i]) ? "enabled" : "disabled"));
        }
        pw.flush();
        pw.println("++++++++++++++++++++++++++++++++");

        try {
            if (mImsManager != null) {
                mImsManager.dump(fd, pw, args);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        if (mConnections != null && mConnections.size() > 0) {
            pw.println("mConnections:");
            for (int i = 0; i < mConnections.size(); i++) {
                pw.println("  [" + i + "]: " + mConnections.get(i));
            }
        }
    }

    @Override