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

Commit 9cb6ec72 authored by Susheel nyamala's avatar Susheel nyamala Committed by Gerrit - the friendly Code Review server
Browse files

Fix to avoid disconnected indication on call end

Voice call is in progress, and PS is reported as out of service
due to IRAT from 3G to 2G. On voice call end, as PS is out of
service, data is reported as disconnected to connectivityservice,
though the data connection is still active at modem.

Use the existing property "persist.telephony.oosisdc" to block
disconnected indication on voice call end.

Change-Id: If8d96115fdb8b0f65d75b57ee32da5fec2f4c178
CRs-Fixed: 636080
parent f5fa09ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public abstract class PhoneBase extends Handler implements Phone {
    /**
     * Indicates whether Out Of Service is considered as data call disconnect.
     */
    protected static final String PROPERTY_OOS_IS_DISCONNECT = "persist.telephony.oosisdc";
    public static final String PROPERTY_OOS_IS_DISCONNECT = "persist.telephony.oosisdc";

    // Key used to read and write the saved network selection numeric value
    public static final String NETWORK_SELECTION_KEY = "network_selection_key";
+9 −2
Original line number Diff line number Diff line
@@ -135,6 +135,13 @@ public class DcTracker extends DcTrackerBase {
    private static final String PROPERTY_CDMA_ROAMING_IPPROTOCOL = SystemProperties.get(
            "persist.telephony.cdma.rproto", "IP");

    /*
     * Flag that indicates that Out Of Service is considered as data call disconnect
     */
    protected boolean mOosIsDisconnect = SystemProperties.getBoolean(
            PhoneBase.PROPERTY_OOS_IS_DISCONNECT, true);


    private boolean mCanSetPreferApn = false;

    private AtomicBoolean mAttached = new AtomicBoolean(false);
@@ -841,7 +848,7 @@ public class DcTracker extends DcTrackerBase {
    // Disabled apn's still need avail/unavail notificiations - send them out
    protected void notifyOffApnsOfAvailability(String reason) {
        for (ApnContext apnContext : mApnContexts.values()) {
            if (!mAttached.get() || !apnContext.isReady()) {
            if ((!mAttached.get() && mOosIsDisconnect) || !apnContext.isReady()) {
                if (VDBG) {
                    log("notifyOffApnOfAvailability type:" +
                            apnContext.getDataProfileType());
@@ -2140,7 +2147,7 @@ public class DcTracker extends DcTrackerBase {
    protected void notifyDataConnection(String reason) {
        if (DBG) log("notifyDataConnection: reason=" + reason);
        for (ApnContext apnContext : mApnContexts.values()) {
            if (mAttached.get() && apnContext.isReady()) {
            if ((mAttached.get() || !mOosIsDisconnect) && apnContext.isReady()) {
                if (DBG) log("notifyDataConnection: type:" + apnContext.getDataProfileType());
                mPhone.notifyDataConnection(reason != null ? reason : apnContext.getReason(),
                        apnContext.getDataProfileType());