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

Commit 449e6206 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9794482 from 5df1d21c to tm-qpr3-release

Change-Id: Id1a0ec1fc40db641b6dff8f7153a02c4d47c3926
parents d30a3b34 5df1d21c
Loading
Loading
Loading
Loading
+19 −2
Original line number Original line Diff line number Diff line
@@ -176,6 +176,8 @@ public class DataStallRecoveryManager extends Handler {
    private boolean mIsAttemptedAllSteps;
    private boolean mIsAttemptedAllSteps;
    /** Whether internet network connected. */
    /** Whether internet network connected. */
    private boolean mIsInternetNetworkConnected;
    private boolean mIsInternetNetworkConnected;
    /** The durations for current recovery action */
    private @ElapsedRealtimeLong long mTimeElapsedOfCurrentAction;


    /** The array for the timers between recovery actions. */
    /** The array for the timers between recovery actions. */
    private @NonNull long[] mDataStallRecoveryDelayMillisArray;
    private @NonNull long[] mDataStallRecoveryDelayMillisArray;
@@ -468,6 +470,15 @@ public class DataStallRecoveryManager extends Handler {
        return (SystemClock.elapsedRealtime() - mTimeLastRecoveryStartMs);
        return (SystemClock.elapsedRealtime() - mTimeLastRecoveryStartMs);
    }
    }


    /**
     * Get duration time for current recovery action.
     *
     * @return the time duration for current recovery action.
     */
    private long getDurationOfCurrentRecoveryMs() {
        return (SystemClock.elapsedRealtime() - mTimeElapsedOfCurrentAction);
    }

    /**
    /**
     * Broadcast intent when data stall occurred.
     * Broadcast intent when data stall occurred.
     *
     *
@@ -595,6 +606,7 @@ public class DataStallRecoveryManager extends Handler {
    private void setNetworkValidationState(boolean isValid) {
    private void setNetworkValidationState(boolean isValid) {
        boolean isLogNeeded = false;
        boolean isLogNeeded = false;
        int timeDuration = 0;
        int timeDuration = 0;
        int timeDurationOfCurrentAction = 0;
        boolean isFirstDataStall = false;
        boolean isFirstDataStall = false;
        boolean isFirstValidationAfterDoRecovery = false;
        boolean isFirstValidationAfterDoRecovery = false;
        @RecoveredReason int reason = getRecoveredReason(isValid);
        @RecoveredReason int reason = getRecoveredReason(isValid);
@@ -627,9 +639,11 @@ public class DataStallRecoveryManager extends Handler {
        }
        }


        if (isLogNeeded) {
        if (isLogNeeded) {
            timeDurationOfCurrentAction =
                (isFirstDataStall == true ? 0 : (int) getDurationOfCurrentRecoveryMs());
            DataStallRecoveryStats.onDataStallEvent(
            DataStallRecoveryStats.onDataStallEvent(
                    mLastAction, mPhone, isValid, timeDuration, reason,
                    mLastAction, mPhone, isValid, timeDuration, reason,
                    isFirstValidationAfterDoRecovery);
                    isFirstValidationAfterDoRecovery, timeDurationOfCurrentAction);
            logl(
            logl(
                    "data stall: "
                    "data stall: "
                    + (isFirstDataStall == true ? "start" : isValid == false ? "in process" : "end")
                    + (isFirstDataStall == true ? "start" : isValid == false ? "in process" : "end")
@@ -642,7 +656,9 @@ public class DataStallRecoveryManager extends Handler {
                    + ", isFirstValidationAfterDoRecovery="
                    + ", isFirstValidationAfterDoRecovery="
                    + isFirstValidationAfterDoRecovery
                    + isFirstValidationAfterDoRecovery
                    + ", TimeDuration="
                    + ", TimeDuration="
                    + timeDuration);
                    + timeDuration
                    + ", TimeDurationForCurrentRecoveryAction="
                    + timeDurationOfCurrentAction);
        }
        }
    }
    }


@@ -693,6 +709,7 @@ public class DataStallRecoveryManager extends Handler {
        mLastActionReported = false;
        mLastActionReported = false;
        broadcastDataStallDetected(recoveryAction);
        broadcastDataStallDetected(recoveryAction);
        mNetworkCheckTimerStarted = false;
        mNetworkCheckTimerStarted = false;
        mTimeElapsedOfCurrentAction = SystemClock.elapsedRealtime();


        switch (recoveryAction) {
        switch (recoveryAction) {
            case RECOVERY_ACTION_GET_DATA_CALL_LIST:
            case RECOVERY_ACTION_GET_DATA_CALL_LIST:
+7 −3
Original line number Original line Diff line number Diff line
@@ -73,6 +73,7 @@ public class DataStallRecoveryStats {
                .REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING;
                .REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING;
        boolean isFirstValidation = false;
        boolean isFirstValidation = false;
        int phoneId = 0;
        int phoneId = 0;
        int durationMillisOfCurrentAction = 0;
        TelephonyStatsLog.write(
        TelephonyStatsLog.write(
                TelephonyStatsLog.DATA_STALL_RECOVERY_REPORTED,
                TelephonyStatsLog.DATA_STALL_RECOVERY_REPORTED,
                carrierId,
                carrierId,
@@ -89,7 +90,8 @@ public class DataStallRecoveryStats {
                otherNetworkRegState,
                otherNetworkRegState,
                phoneNetworkRegState,
                phoneNetworkRegState,
                isFirstValidation,
                isFirstValidation,
                phoneId);
                phoneId,
                durationMillisOfCurrentAction);
    }
    }


    /**
    /**
@@ -108,7 +110,8 @@ public class DataStallRecoveryStats {
            boolean isRecovered,
            boolean isRecovered,
            int durationMillis,
            int durationMillis,
            @DataStallRecoveryManager.RecoveredReason int reason,
            @DataStallRecoveryManager.RecoveredReason int reason,
            boolean isFirstValidation) {
            boolean isFirstValidation,
            int durationMillisOfCurrentAction) {
        if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
        if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
            phone = phone.getDefaultPhone();
            phone = phone.getDefaultPhone();
        }
        }
@@ -163,7 +166,8 @@ public class DataStallRecoveryStats {
                otherNetworkRegState,
                otherNetworkRegState,
                phoneNetworkRegState,
                phoneNetworkRegState,
                isFirstValidation,
                isFirstValidation,
                phoneId);
                phoneId,
                durationMillisOfCurrentAction);
    }
    }


    /** Returns the RAT used for data (including IWLAN). */
    /** Returns the RAT used for data (including IWLAN). */