OSDN Git Service

Default CDMA subscription source to RUIM/SIM
authorGrace Chen <chengrace@google.com>
Tue, 13 Jun 2017 23:07:45 +0000 (16:07 -0700)
committerGrace Chen <chengrace@google.com>
Tue, 13 Jun 2017 23:09:01 +0000 (16:09 -0700)
Operators read CDMA subscription from RUIM/SIM now thus change
the default hardcoded preference everywhere. Add code clean-up to
make the default come from a single source, the Phone interface.

Additional rework proposed in http://b/62299272, but this corrects
immediate issue where CDMA SSM was defaulting to NV instead of RUIM
/SIM and caused CSIM subscription to not load and 'no sim' symptom
for many users.

Bug: 62143087
Test: None
Change-Id: I32b1f1e40c736a566df824218a6565de851ce161

packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

index b777d41..06d00be 100644 (file)
@@ -45,8 +45,8 @@ import android.util.Log;
 
 import com.android.ims.ImsConfig;
 import com.android.internal.content.PackageHelper;
+import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.RILConstants;
-import com.android.internal.telephony.cdma.CdmaSubscriptionSourceManager;
 import com.android.internal.util.XmlUtils;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.internal.widget.LockPatternView;
@@ -2617,9 +2617,9 @@ class DatabaseHelper extends SQLiteOpenHelper {
             loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, type);
 
             // Set the preferred cdma subscription source to target desired value or default
-            // value defined in CdmaSubscriptionSourceManager
+            // value defined in Phone
             type = SystemProperties.getInt("ro.telephony.default_cdma_sub",
-                        CdmaSubscriptionSourceManager.PREFERRED_CDMA_SUBSCRIPTION);
+                        Phone.PREFERRED_CDMA_SUBSCRIPTION);
             loadSetting(stmt, Settings.Global.CDMA_SUBSCRIPTION_MODE, type);
 
             loadIntegerSetting(stmt, Settings.Global.LOW_BATTERY_SOUND_TIMEOUT,