Last active
August 29, 2015 14:11
-
-
Save invisiblek/45bac7bf50468c6e2fb3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java b/ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java | |
index 44e18de..b6ce507 100644 | |
--- a/ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java | |
+++ b/ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java | |
@@ -36,6 +36,8 @@ import com.android.internal.telephony.uicc.IccCardStatus; | |
*/ | |
public class LgeLteRIL extends RIL implements CommandsInterface { | |
private Message mPendingGetSimStatus; | |
+ private Message mPendingNetworkTypeMsg; | |
+ private int mPendingNetworkType; | |
public LgeLteRIL(Context context, int preferredNetworkType, | |
int cdmaSubscription, Integer instanceId) { | |
@@ -101,12 +103,30 @@ public class LgeLteRIL extends RIL implements CommandsInterface { | |
} | |
@Override | |
+ public void | |
+ setPreferredNetworkType(int networkType, Message response) { | |
+ if (mState != RadioState.RADIO_ON) { | |
+ mPendingNetworkTypeMsg = response; | |
+ mPendingNetworkType = networkType; | |
+ } else { | |
+ super.setPreferredNetworkType(networkType, response); | |
+ } | |
+ } | |
+ | |
+ @Override | |
protected void switchToRadioState(RadioState newState) { | |
super.switchToRadioState(newState); | |
- if (newState == RadioState.RADIO_ON && mPendingGetSimStatus != null) { | |
- super.getIccCardStatus(mPendingGetSimStatus); | |
- mPendingGetSimStatus = null; | |
+ if (newState == RadioState.RADIO_ON) { | |
+ if (mPendingGetSimStatus != null) { | |
+ super.getIccCardStatus(mPendingGetSimStatus); | |
+ mPendingGetSimStatus = null; | |
+ } | |
+ if (mPendingNetworkTypeMsg != null) { | |
+ super.setPreferredNetworkType(mPendingNetworkType, | |
+ mPendingNetworkTypeMsg); | |
+ mPendingNetworkTypeMsg = null; | |
+ } | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment