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

Commit 9cec95d6 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Log Cell DataStall recovery actions." into nyc-mr1-dev

parents db89f689 0a39f581
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ public class TelephonyEventLog extends ConnectivityMetricsLogger {
    public static final int TAG_DATA_CALL_LIST = 5;

    public static final int TAG_PHONE_STATE = 8;
    public static final int TAG_DATA_STALL = 9;

    public static final int TAG_RIL_REQUEST = 1001;
    public static final int TAG_RIL_RESPONSE = 1002;
@@ -267,6 +268,10 @@ public class TelephonyEventLog extends ConnectivityMetricsLogger {
        }
    }

    public void writeDataStallEvent(int recoveryAction) {
        writeEvent(TAG_DATA_STALL, recoveryAction, -1);
    }

    public void writeSetAirplaneMode(boolean enabled) {
        writeEvent(TAG_SETTINGS, SETTING_AIRPLANE_MODE, enabled ? 1 : 0);
    }
+8 −1
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.ServiceStateTracker;
import com.android.internal.telephony.TelephonyEventLog;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.UiccController;
@@ -124,6 +125,8 @@ public class DcTracker extends Handler {
    // All data enabling/disabling related settings
    private final DataEnabledSettings mDataEnabledSettings = new DataEnabledSettings();

    private final TelephonyEventLog mTelephonyEventLog;

    /**
     * After detecting a potential connection problem, this is the max number
     * of subsequent polls before attempting recovery.
@@ -719,6 +722,8 @@ public class DcTracker extends Handler {

        mSettingsObserver = new SettingsObserver(mPhone.getContext(), this);
        registerSettingsObserver();

        mTelephonyEventLog = new TelephonyEventLog(mPhone.getPhoneId());
    }

    @VisibleForTesting
@@ -730,6 +735,7 @@ public class DcTracker extends Handler {
        mDataConnectionTracker = null;
        mProvisionActionName = null;
        mSettingsObserver = new SettingsObserver(null, this);
        mTelephonyEventLog = new TelephonyEventLog(0);
    }

    public void registerServiceStateTrackerEvents() {
@@ -4589,7 +4595,8 @@ public class DcTracker extends Handler {
    private void doRecovery() {
        if (getOverallState() == DctConstants.State.CONNECTED) {
            // Go through a series of recovery steps, each action transitions to the next action
            int recoveryAction = getRecoveryAction();
            final int recoveryAction = getRecoveryAction();
            mTelephonyEventLog.writeDataStallEvent(recoveryAction);
            switch (recoveryAction) {
            case RecoveryAction.GET_DATA_CALL_LIST:
                EventLog.writeEvent(EventLogTags.DATA_STALL_RECOVERY_GET_DATA_CALL_LIST,