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

Commit a25cf483 authored by Yashdev Singh's avatar Yashdev Singh Committed by Susheel nyamala
Browse files

Add config option for pdp regular deactivation

- Default AOSP implementation is to restart the radio for PDP
error cause = 36-Regular deactivation.
- Added xml based option to disable this implementation and treat
error=36 as temp failure.

Change-Id: I5f1931578f720d50dc8f272ee39e5c7abd1126b9
parent 9aa80c0b
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -191,6 +191,10 @@ public class PhoneFactory {
        }
        }
    }
    }


    public static Context getContext() {
        return sContext;
    }

    /**
    /**
     * Makes a {@link SipPhone} object.
     * Makes a {@link SipPhone} object.
     * @param sipUri the local SIP URI the phone runs on
     * @param sipUri the local SIP URI the phone runs on
+13 −1
Original line number Original line Diff line number Diff line
@@ -15,6 +15,12 @@
 */
 */
package com.android.internal.telephony.dataconnection;
package com.android.internal.telephony.dataconnection;


import android.content.Context;
import android.telephony.Rlog;

import com.android.internal.R;
import com.android.internal.telephony.PhoneFactory;

import java.util.HashMap;
import java.util.HashMap;


/**
/**
@@ -81,7 +87,13 @@ public enum DcFailCause {


    /** Radio has failed such that the radio should be restarted */
    /** Radio has failed such that the radio should be restarted */
    public boolean isRestartRadioFail() {
    public boolean isRestartRadioFail() {
        return (this == REGULAR_DEACTIVATION);
        Context context = PhoneFactory.getContext();
        boolean radioResetOnRegularDeact = context.getResources().
            getBoolean(com.android.internal.R.bool.config_radio_reset_on_regular_deactivation);

        Rlog.d("isRestartRadioFail", "radioResetOnRegularDeact="+radioResetOnRegularDeact);

        return (radioResetOnRegularDeact && (this == REGULAR_DEACTIVATION));
    }
    }


    public boolean isPermanentFail() {
    public boolean isPermanentFail() {