summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider
diff options
context:
space:
mode:
authorNaveen Kalla <nkalla@codeaurora.org>2013-07-03 16:39:27 -0700
committerNaveen Kalla <nkalla@codeaurora.org>2013-08-01 18:03:42 -0700
commitb4d485c18448eadb92083c74fc84722250daeb5d (patch)
tree6cff8eabf6ce6859f0e97b200ba18d951fcd1f57 /packages/SettingsProvider
parentc67b2ed50226c4758d0fc1434d39f6add6a0a533 (diff)
downloadframeworks_base-b4d485c18448eadb92083c74fc84722250daeb5d.zip
frameworks_base-b4d485c18448eadb92083c74fc84722250daeb5d.tar.gz
frameworks_base-b4d485c18448eadb92083c74fc84722250daeb5d.tar.bz2
Set subscription_mode in the database to a default value
If ro.telephony.default_cdma_sub is set, use that to set the default CDMA subscription source in the database. If that is not set use the default preferred value defined in the source code. Change-Id: I11fff596a5fe721c64f192c889672326517dc43d
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index b65a9a0..120b28f 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -47,6 +47,7 @@ import com.android.internal.content.PackageHelper;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
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;
@@ -1429,7 +1430,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
};
String[] secureToGlobal = {
Settings.Global.PREFERRED_NETWORK_MODE,
- Settings.Global.PREFERRED_CDMA_SUBSCRIPTION,
+ Settings.Global.CDMA_SUBSCRIPTION_MODE,
};
moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_GLOBAL, systemToGlobal, true);
@@ -2246,6 +2247,12 @@ public class DatabaseHelper extends SQLiteOpenHelper {
RILConstants.PREFERRED_NETWORK_MODE);
loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, type);
+ // Set the preferred cdma subscription source to target desired value or default
+ // value defined in CdmaSubscriptionSourceManager
+ type = SystemProperties.getInt("ro.telephony.default_cdma_sub",
+ CdmaSubscriptionSourceManager.PREFERRED_CDMA_SUBSCRIPTION);
+ loadSetting(stmt, Settings.Global.CDMA_SUBSCRIPTION_MODE, type);
+
// --- New global settings start here
} finally {
if (stmt != null) stmt.close();