summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorNaveen Kalla <nkalla@codeaurora.org>2012-08-29 09:40:25 -0700
committerRichard Ross <toastcfh@gmail.com>2012-11-26 19:00:17 -0500
commitf478f4306b533070d61cc1e47ed282c30b4dcc43 (patch)
tree856f2524834e722473b2de04a5ec8d9f4ba0905a /src/java
parenta59c406d6590a578a97b364ec14e1f7a3acf4f8d (diff)
downloadframeworks_opt_telephony-f478f4306b533070d61cc1e47ed282c30b4dcc43.zip
frameworks_opt_telephony-f478f4306b533070d61cc1e47ed282c30b4dcc43.tar.gz
frameworks_opt_telephony-f478f4306b533070d61cc1e47ed282c30b4dcc43.tar.bz2
Initialize RIL with the correct CDMA subscription mode setting
Users choice of CDMA Subscription Source is stored in CDMA_SUBSCRIPTION_MODE setting in database. If telephony restarts after a crash, PhoneFactory sets the CDMA subscription source value from PREFERRED_CDMA_SUBSCRIPTION setting and that causes the mismatch with the value in the settings database chosen by the user. The change is to use the CDMA_SUBSCRIPTION_MODE setting instead when creating the RIL object. Also, remove the Setting PREFERRED_CDMA_SUBSCRIPTION from the database. With this change the special treatment for LTE on CDMA will not be needed. The correct value can be set in the database for CDMA_SUBSCRIPTION_MODE and that will be taken on power-up by this code. Change-Id: I11fff596a5fe721c64f192c889672326517dc43d
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/android/internal/telephony/PhoneFactory.java25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/java/com/android/internal/telephony/PhoneFactory.java b/src/java/com/android/internal/telephony/PhoneFactory.java
index 5601591..6e126ec 100644
--- a/src/java/com/android/internal/telephony/PhoneFactory.java
+++ b/src/java/com/android/internal/telephony/PhoneFactory.java
@@ -112,30 +112,11 @@ public class PhoneFactory {
Settings.Global.PREFERRED_NETWORK_MODE, preferredNetworkMode);
Log.i(LOG_TAG, "Network Mode set to " + Integer.toString(networkMode));
- // Get cdmaSubscription
- // TODO: Change when the ril will provides a way to know at runtime
- // the configuration, bug 4202572. And the ril issues the
- // RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, bug 4295439.
+ // Get cdmaSubscription mode from Settings.Global
int cdmaSubscription;
- int lteOnCdma = TelephonyManager.getLteOnCdmaModeStatic();
- switch (lteOnCdma) {
- case PhoneConstants.LTE_ON_CDMA_FALSE:
- cdmaSubscription = CdmaSubscriptionSourceManager.SUBSCRIPTION_FROM_NV;
- Log.i(LOG_TAG, "lteOnCdma is 0 use SUBSCRIPTION_FROM_NV");
- break;
- case PhoneConstants.LTE_ON_CDMA_TRUE:
- cdmaSubscription = CdmaSubscriptionSourceManager.SUBSCRIPTION_FROM_RUIM;
- Log.i(LOG_TAG, "lteOnCdma is 1 use SUBSCRIPTION_FROM_RUIM");
- break;
- case PhoneConstants.LTE_ON_CDMA_UNKNOWN:
- default:
- //Get cdmaSubscription mode from Settings.System
- cdmaSubscription = Settings.Global.getInt(context.getContentResolver(),
- Settings.Global.PREFERRED_CDMA_SUBSCRIPTION,
+ cdmaSubscription = Settings.Global.getInt(context.getContentResolver(),
+ Settings.Global.CDMA_SUBSCRIPTION_MODE,
preferredCdmaSubscription);
- Log.i(LOG_TAG, "lteOnCdma not set, using PREFERRED_CDMA_SUBSCRIPTION");
- break;
- }
Log.i(LOG_TAG, "Cdma Subscription set to " + cdmaSubscription);
//reads the system properties and makes commandsinterface