summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2013-05-10 16:38:14 -0700
committerEthan Chen <intervigil@gmail.com>2013-05-10 16:40:58 -0700
commit492c36536d259d55ea947a03ff22ad05ae6f51b2 (patch)
tree57cd1185d0c399c9e825eb3f3c1b7b87454d18cc
parentc70b94eac2766ceae1f99703792b0dc5856b087f (diff)
downloadframeworks_opt_telephony-492c36536d259d55ea947a03ff22ad05ae6f51b2.zip
frameworks_opt_telephony-492c36536d259d55ea947a03ff22ad05ae6f51b2.tar.gz
frameworks_opt_telephony-492c36536d259d55ea947a03ff22ad05ae6f51b2.tar.bz2
HTCQualcommRIL: squashed set of updates
libril: HTC8960RIL: add flag to force CDMA+LTE network mode HTC8960RIL: update unsolicited messages from m7wls stock RIL: make HTCQualcommRIL extend QualcommSharedRIL Change-Id: I650945f6e03ef9f0cbfa1cf605b22859bfe20def
-rw-r--r--src/java/com/android/internal/telephony/HTCQualcommRIL.java39
1 files changed, 32 insertions, 7 deletions
diff --git a/src/java/com/android/internal/telephony/HTCQualcommRIL.java b/src/java/com/android/internal/telephony/HTCQualcommRIL.java
index 7a6a67a..0276a34 100644
--- a/src/java/com/android/internal/telephony/HTCQualcommRIL.java
+++ b/src/java/com/android/internal/telephony/HTCQualcommRIL.java
@@ -41,15 +41,16 @@ import java.util.ArrayList;
*
* {@hide}
*/
-public class HTCQualcommRIL extends RIL implements CommandsInterface {
+public class HTCQualcommRIL extends QualcommSharedRIL implements CommandsInterface {
- private static final int RIL_UNSOL_ENTER_LPM = 1523;
- private static final int RIL_UNSOL_CDMA_3G_INDICATOR = 3009;
- private static final int RIL_UNSOL_CDMA_ENHANCE_ROAMING_INDICATOR = 3012;
- private static final int RIL_UNSOL_RESPONSE_PHONE_MODE_CHANGE = 6002;
+ private static final int RIL_UNSOL_ENTER_LPM = 3023;
+ private static final int RIL_UNSOL_TPMR_ID = 3024;
+ private static final int RIL_UNSOL_CDMA_3G_INDICATOR = 4259;
+ private static final int RIL_UNSOL_CDMA_ENHANCE_ROAMING_INDICATOR = 4262;
+ private static final int RIL_UNSOL_RESPONSE_PHONE_MODE_CHANGE = 4802;
private static final int RIL_UNSOL_RESPONSE_VOICE_RADIO_TECH_CHANGED = 21004;
- private static final int RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED = 21005;
- private static final int RIL_UNSOL_RESPONSE_DATA_NETWORK_STATE_CHANGED = 21007;
+ private static final int RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED = 5755;
+ private static final int RIL_UNSOL_RESPONSE_DATA_NETWORK_STATE_CHANGED = 5757;
public HTCQualcommRIL(Context context, int networkMode, int cdmaSubscription) {
super(context, networkMode, cdmaSubscription);
@@ -64,6 +65,9 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
// a new method just for naming sake.
boolean oldRil = needsOldRilFeature("icccardstatus");
+ // force CDMA + LTE network type
+ boolean forceCdmaLteNetworkType = needsOldRilFeature("forceCdmaLteNetworkType");
+
IccCardStatus cardStatus = new IccCardStatus();
cardStatus.setCardState(p.readInt());
cardStatus.setUniversalPinState(p.readInt());
@@ -101,10 +105,29 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
appStatus.pin2 = appStatus.PinStateFromRILInt(p.readInt());
cardStatus.mApplications[i] = appStatus;
}
+
+ // pretty hack way to do it. but keeps it out of CM telephony stack
+ if (forceCdmaLteNetworkType)
+ setPreferredNetworkType(8, null);
+
return cardStatus;
}
@Override
+ public void setPreferredNetworkType(int networkType , Message response) {
+ /**
+ * If not using a USIM, ignore LTE mode and go to 3G
+ */
+ if (!mUSIM && networkType == RILConstants.NETWORK_MODE_LTE_GSM_WCDMA &&
+ mSetPreferredNetworkType >= RILConstants.NETWORK_MODE_WCDMA_PREF) {
+ networkType = RILConstants.NETWORK_MODE_WCDMA_PREF;
+ }
+ mSetPreferredNetworkType = networkType;
+
+ super.setPreferredNetworkType(networkType, response);
+ }
+
+ @Override
protected Object
responseSignalStrength(Parcel p) {
/* HTC signal strength format:
@@ -156,6 +179,7 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
switch(response) {
case RIL_UNSOL_ENTER_LPM: ret = responseVoid(p); break;
+ case RIL_UNSOL_TPMR_ID: ret = responseVoid(p); break;
case RIL_UNSOL_CDMA_3G_INDICATOR: ret = responseInts(p); break;
case RIL_UNSOL_CDMA_ENHANCE_ROAMING_INDICATOR: ret = responseInts(p); break;
case RIL_UNSOL_RESPONSE_PHONE_MODE_CHANGE: ret = responseInts(p); break;
@@ -174,6 +198,7 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
switch(response) {
case RIL_UNSOL_ENTER_LPM:
+ case RIL_UNSOL_TPMR_ID:
case RIL_UNSOL_CDMA_3G_INDICATOR:
case RIL_UNSOL_CDMA_ENHANCE_ROAMING_INDICATOR:
case RIL_UNSOL_RESPONSE_PHONE_MODE_CHANGE: