diff options
6 files changed, 39 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/BaseCommands.java b/src/java/com/android/internal/telephony/BaseCommands.java index 1b54656..88c3130 100644 --- a/src/java/com/android/internal/telephony/BaseCommands.java +++ b/src/java/com/android/internal/telephony/BaseCommands.java @@ -644,4 +644,12 @@ public abstract class BaseCommands implements CommandsInterface { @Override public void testingEmergencyCall() {} + + /** + * @hide + */ + @Override + public int getLteOnGsmMode() { + return TelephonyManager.getLteOnGsmModeStatic(); + } } diff --git a/src/java/com/android/internal/telephony/CommandsInterface.java b/src/java/com/android/internal/telephony/CommandsInterface.java index 94bd3e8..bbcd077 100644 --- a/src/java/com/android/internal/telephony/CommandsInterface.java +++ b/src/java/com/android/internal/telephony/CommandsInterface.java @@ -1563,6 +1563,12 @@ public interface CommandsInterface { public int getLteOnCdmaMode(); /** + * Return if the current radio is LTE on GSM + * @hide + */ + public int getLteOnGsmMode(); + + /** * Request the ISIM application on the UICC to perform the AKA * challenge/response algorithm for IMS authentication. The nonce string * and challenge response are Base64 encoded Strings. diff --git a/src/java/com/android/internal/telephony/Phone.java b/src/java/com/android/internal/telephony/Phone.java index aa3cf13..e6634dd 100644 --- a/src/java/com/android/internal/telephony/Phone.java +++ b/src/java/com/android/internal/telephony/Phone.java @@ -1650,6 +1650,12 @@ public interface Phone { public int getLteOnCdmaMode(); /** + * Return if the current radio is LTE on GSM + * @hide + */ + public int getLteOnGsmMode(); + + /** * TODO: Adding a function for each property is not good. * A fucntion of type getPhoneProp(propType) where propType is an * enum of GSM+CDMA+LTE props would be a better approach. diff --git a/src/java/com/android/internal/telephony/PhoneBase.java b/src/java/com/android/internal/telephony/PhoneBase.java index f617e2b..d244ed6 100644 --- a/src/java/com/android/internal/telephony/PhoneBase.java +++ b/src/java/com/android/internal/telephony/PhoneBase.java @@ -1192,6 +1192,14 @@ public abstract class PhoneBase extends Handler implements Phone { } /** + * {@hide} + */ + @Override + public int getLteOnGsmMode() { + return mCM.getLteOnGsmMode(); + } + + /** * Sets the SIM voice message waiting indicator records. * @param line GSM Subscriber Profile Number, one-based. Only '1' is supported * @param countWaiting The number of messages waiting, if known. Use diff --git a/src/java/com/android/internal/telephony/PhoneFactory.java b/src/java/com/android/internal/telephony/PhoneFactory.java index 6e126ec..8f8dfc7 100644 --- a/src/java/com/android/internal/telephony/PhoneFactory.java +++ b/src/java/com/android/internal/telephony/PhoneFactory.java @@ -108,6 +108,9 @@ public class PhoneFactory { if (TelephonyManager.getLteOnCdmaModeStatic() == PhoneConstants.LTE_ON_CDMA_TRUE) { preferredNetworkMode = Phone.NT_MODE_GLOBAL; } + if (TelephonyManager.getLteOnGsmModeStatic() != 0) { + preferredNetworkMode = Phone.NT_MODE_LTE_GSM_WCDMA; + } int networkMode = Settings.Global.getInt(context.getContentResolver(), Settings.Global.PREFERRED_NETWORK_MODE, preferredNetworkMode); Log.i(LOG_TAG, "Network Mode set to " + Integer.toString(networkMode)); diff --git a/src/java/com/android/internal/telephony/PhoneProxy.java b/src/java/com/android/internal/telephony/PhoneProxy.java index 1c4bdc5..620fcc5 100644 --- a/src/java/com/android/internal/telephony/PhoneProxy.java +++ b/src/java/com/android/internal/telephony/PhoneProxy.java @@ -968,6 +968,14 @@ public class PhoneProxy extends Handler implements Phone { return mActivePhone.getLteOnCdmaMode(); } + /** + * {@hide} + */ + @Override + public int getLteOnGsmMode() { + return mActivePhone.getLteOnGsmMode(); + } + @Override public void setVoiceMessageWaiting(int line, int countWaiting) { mActivePhone.setVoiceMessageWaiting(line, countWaiting); |