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

Commit 5a7e6794 authored by Richard Ross's avatar Richard Ross Committed by Ethan Chen
Browse files

HTCQualcommRIL: properly reset radio on RIL_CONNECTED

* Resets radio on RIL_CONNECTED, but only after the first RIL_CONNECTED
  response.

Change-Id: I94a56d97eca173b8bcc5b38e59ee43740d2ef74a
parent b0ad83d1
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.os.Parcel;
import android.os.SystemProperties;
import android.text.TextUtils;
import android.telephony.CellInfo;
import android.telephony.Rlog;
@@ -153,12 +154,12 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
            case RIL_UNSOL_RIL_CONNECTED: {
                if (RILJ_LOGD) unsljLogRet(response, ret);

                boolean skipRadioPowerOff = needsOldRilFeature("skipradiooff");

                // Initial conditions
                if (!skipRadioPowerOff) {
                if (SystemProperties.get("ril.socket.reset").equals("1")) {
                    setRadioPower(false, null);
                }
                // Trigger socket reset if RIL connect is called again
                SystemProperties.set("ril.socket.reset", "1");
                setPreferredNetworkType(mPreferredNetworkType, null);
                setCdmaSubscriptionSource(mCdmaSubscription, null);
                setCellInfoListRate(Integer.MAX_VALUE, null);