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

Commit 3e5a9f7a authored by Jordan Liu's avatar Jordan Liu Committed by Gerrit Code Review
Browse files

Merge "Reduce log spam in DcTracker and DataEnabledSettings"

parents f9cdd07f e6167222
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -161,8 +161,8 @@ public class DataEnabledSettings {
    }

    public synchronized void setInternalDataEnabled(boolean enabled) {
        localLog("InternalDataEnabled", enabled);
        if (mInternalDataEnabled != enabled) {
            localLog("InternalDataEnabled", enabled);
            mInternalDataEnabled = enabled;
            updateDataEnabledAndNotify(REASON_INTERNAL_DATA_ENABLED);
        }
@@ -175,10 +175,10 @@ public class DataEnabledSettings {
        // Can't disable data for stand alone opportunistic subscription.
        if (isStandAloneOpportunistic(mPhone.getSubId(), mPhone.getContext()) && !enabled) return;

        localLog("UserDataEnabled", enabled);
        boolean changed = GlobalSettingsHelper.setInt(mPhone.getContext(),
                Settings.Global.MOBILE_DATA, mPhone.getSubId(), (enabled ? 1 : 0));
        if (changed) {
            localLog("UserDataEnabled", enabled);
            mPhone.notifyUserMobileDataStateChanged(enabled);
            updateDataEnabledAndNotify(REASON_USER_DATA_ENABLED);
            MultiSimSettingController.getInstance().notifyUserDataEnabled(mPhone.getSubId(),
@@ -248,8 +248,8 @@ public class DataEnabledSettings {
    }

    public synchronized void setPolicyDataEnabled(boolean enabled) {
        localLog("PolicyDataEnabled", enabled);
        if (mPolicyDataEnabled != enabled) {
            localLog("PolicyDataEnabled", enabled);
            mPolicyDataEnabled = enabled;
            updateDataEnabledAndNotify(REASON_POLICY_DATA_ENABLED);
        }
@@ -260,8 +260,8 @@ public class DataEnabledSettings {
    }

    public synchronized void setCarrierDataEnabled(boolean enabled) {
        localLog("CarrierDataEnabled", enabled);
        if (mCarrierDataEnabled != enabled) {
            localLog("CarrierDataEnabled", enabled);
            mCarrierDataEnabled = enabled;
            updateDataEnabledAndNotify(REASON_DATA_ENABLED_BY_CARRIER);
        }
@@ -328,13 +328,12 @@ public class DataEnabledSettings {
    }

    public synchronized void setDataRoamingEnabled(boolean enabled) {
        localLog("setDataRoamingEnabled", enabled);

        // will trigger handleDataOnRoamingChange() through observer
        boolean changed = GlobalSettingsHelper.setBoolean(mPhone.getContext(),
                Settings.Global.DATA_ROAMING, mPhone.getSubId(), enabled);

        if (changed) {
            localLog("setDataRoamingEnabled", enabled);
            MultiSimSettingController.getInstance().notifyRoamingDataEnabled(mPhone.getSubId(),
                    enabled);
        }
+1 −2
Original line number Diff line number Diff line
@@ -2383,8 +2383,7 @@ public class DcTracker extends Handler {
                    return;
                case CONNECTED:
                    if (DBG) log("onEnableApn: 'CONNECTED' so return");
                    apnContext.requestLog("onEnableApn state=CONNECTED, so return");

                    // Don't add to local log since this is so common
                    sendRequestNetworkCompleteMsg(onCompleteMsg, true, mTransportType,
                            requestType, DataFailCause.NONE);
                    return;