summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRicardo Cerqueira <github@cerqueira.org>2012-04-17 01:14:37 +0100
committerMike Kasick <mike@kasick.org>2012-12-05 16:04:49 -0500
commit9ed31967babe883c1522b96dc7c01da5cde3ea37 (patch)
treefabd3654c10ee0bb2cd9004bb25b51285a7d1e54 /src
parentd34549b51f24b89b967b909dac1ac06fb4cf69fe (diff)
downloadframeworks_opt_telephony-9ed31967babe883c1522b96dc7c01da5cde3ea37.zip
frameworks_opt_telephony-9ed31967babe883c1522b96dc7c01da5cde3ea37.tar.gz
frameworks_opt_telephony-9ed31967babe883c1522b96dc7c01da5cde3ea37.tar.bz2
Telephony: Add getLteOnGsmMode() method (2/2)
Same functionality as the existing getLteOnCdmaMode, but for GSM LTE devices. Enable with the telephony.lteOnGsmDevice system property From CM 10.0: Ibfb47ca608e51393b99d3308e0a6c66050b3f32e - Moved getLteOnGsmModeStatic() to TelephonyManager.
Diffstat (limited to 'src')
-rw-r--r--src/java/com/android/internal/telephony/BaseCommands.java8
-rw-r--r--src/java/com/android/internal/telephony/CommandsInterface.java6
-rw-r--r--src/java/com/android/internal/telephony/Phone.java6
-rw-r--r--src/java/com/android/internal/telephony/PhoneBase.java8
-rw-r--r--src/java/com/android/internal/telephony/PhoneFactory.java3
-rw-r--r--src/java/com/android/internal/telephony/PhoneProxy.java8
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);