summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2011-07-18 18:42:41 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-07-18 18:42:41 -0700
commit865e68465284eca3c32a1a4c9398d08af86bbf63 (patch)
treee0bcd4b210f1d229c7828136cd2294244fe0d7a9 /telephony
parent35ca86d8a48e2c2edc12e21e087b76a2304c4cfe (diff)
parent6e8c7dd2128b2a46f5d56ed46d4d530af6ad38f5 (diff)
downloadframeworks_base-865e68465284eca3c32a1a4c9398d08af86bbf63.zip
frameworks_base-865e68465284eca3c32a1a4c9398d08af86bbf63.tar.gz
frameworks_base-865e68465284eca3c32a1a4c9398d08af86bbf63.tar.bz2
am 6e8c7dd2: am cd4636ec: Add LteOnCdmaDevice system property.
* commit '6e8c7dd2128b2a46f5d56ed46d4d530af6ad38f5': Add LteOnCdmaDevice system property.
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/BaseCommands.java28
-rw-r--r--telephony/java/com/android/internal/telephony/TelephonyProperties.java9
2 files changed, 26 insertions, 11 deletions
diff --git a/telephony/java/com/android/internal/telephony/BaseCommands.java b/telephony/java/com/android/internal/telephony/BaseCommands.java
index 8427d14..f0d2fba 100644
--- a/telephony/java/com/android/internal/telephony/BaseCommands.java
+++ b/telephony/java/com/android/internal/telephony/BaseCommands.java
@@ -857,22 +857,28 @@ public abstract class BaseCommands implements CommandsInterface {
*/
public static int getLteOnCdmaModeStatic() {
int retVal;
- String productType;
-
- Matcher matcher = sProductTypePattern.matcher(sKernelCmdLine);
- if (matcher.find()) {
- productType = matcher.group(1);
- if (sLteOnCdmaProductType.equals(productType)) {
- retVal = Phone.LTE_ON_CDMA_TRUE;
+ int curVal;
+ String productType = "";
+
+ curVal = SystemProperties.getInt(TelephonyProperties.PROPERTY_LTE_ON_CDMA_DEVICE,
+ Phone.LTE_ON_CDMA_UNKNOWN);
+ retVal = curVal;
+ if (retVal == Phone.LTE_ON_CDMA_UNKNOWN) {
+ Matcher matcher = sProductTypePattern.matcher(sKernelCmdLine);
+ if (matcher.find()) {
+ productType = matcher.group(1);
+ if (sLteOnCdmaProductType.equals(productType)) {
+ retVal = Phone.LTE_ON_CDMA_TRUE;
+ } else {
+ retVal = Phone.LTE_ON_CDMA_FALSE;
+ }
} else {
retVal = Phone.LTE_ON_CDMA_FALSE;
}
- } else {
- retVal = Phone.LTE_ON_CDMA_FALSE;
- productType = "";
}
- Log.d(LOG_TAG, "getLteOnCdmaMode=" + retVal + " product_type='" + productType +
+ Log.d(LOG_TAG, "getLteOnCdmaMode=" + retVal + " curVal=" + curVal +
+ " product_type='" + productType +
"' lteOnCdmaProductType='" + sLteOnCdmaProductType + "'");
return retVal;
}
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index 60cf9b7..abb4523 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -79,6 +79,15 @@ public interface TelephonyProperties
*/
static final String PROPERTY_LTE_ON_CDMA_PRODUCT_TYPE = "telephony.lteOnCdmaProductType";
+ /**
+ * The contents of this property is the one of {@link Phone#LTE_ON_CDMA_TRUE} or
+ * {@link Phone#LTE_ON_CDMA_FALSE}. If absent the value will assumed to be false
+ * and the {@see #PROPERTY_LTE_ON_CDMA_PRODUCT_TYPE} will be used to determine its
+ * final value which could also be {@link Phone#LTE_ON_CDMA_FALSE}.
+ * {@see BaseCommands#getLteOnCdmaMode()}
+ */
+ static final String PROPERTY_LTE_ON_CDMA_DEVICE = "telephony.lteOnCdmaDevice";
+
static final String CURRENT_ACTIVE_PHONE = "gsm.current.phone-type";
//****** SIM Card