summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Mahajan <amitmahajan@google.com>2015-10-14 23:42:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-14 23:42:34 +0000
commit0e9e8f6f61eafea749b63affd4bab76e380839ce (patch)
tree673cf7d9d22fbcedea878788e982200365338b79
parentd84ce3307a46b46844cc1751f7efdecf2156cdf0 (diff)
parent83991ce1061dd6723460be667235ae14e14328d5 (diff)
downloadandroid_packages_providers_TelephonyProvider-0e9e8f6f61eafea749b63affd4bab76e380839ce.tar.gz
android_packages_providers_TelephonyProvider-0e9e8f6f61eafea749b63affd4bab76e380839ce.tar.bz2
android_packages_providers_TelephonyProvider-0e9e8f6f61eafea749b63affd4bab76e380839ce.zip
am 83991ce1: am da607219: Change to add user_visible field to Carriers table.
* commit '83991ce1061dd6723460be667235ae14e14328d5': Change to add user_visible field to Carriers table.
-rw-r--r--src/com/android/providers/telephony/TelephonyProvider.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index 67b0645..13faf27 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -66,7 +66,7 @@ public class TelephonyProvider extends ContentProvider
private static final boolean DBG = true;
private static final boolean VDBG = false; // STOPSHIP if true
- private static final int DATABASE_VERSION = 16 << 16;
+ private static final int DATABASE_VERSION = 17 << 16;
private static final int URL_UNKNOWN = 0;
private static final int URL_TELEPHONY = 1;
private static final int URL_CURRENT = 2;
@@ -265,6 +265,7 @@ public class TelephonyProvider extends ContentProvider
"max_conns_time INTEGER DEFAULT 0," +
"mtu INTEGER DEFAULT 0," +
"edited INTEGER DEFAULT " + Telephony.Carriers.UNEDITED + "," +
+ "user_visible BOOLEAN DEFAULT 1," +
// Uniqueness collisions are used to trigger merge code so if a field is listed
// here it means we will accept both (user edited + new apn_conf definition)
// Columns not included in UNIQUE constraint: name, current, edited,
@@ -587,6 +588,11 @@ public class TelephonyProvider extends ContentProvider
}
oldVersion = 16 << 16 | 6;
}
+ if (oldVersion < (17 << 16 | 6)) {
+ db.execSQL("ALTER TABLE " + CARRIERS_TABLE + " ADD COLUMN " +
+ Telephony.Carriers.USER_VISIBLE + " BOOLEAN DEFAULT 1;");
+ oldVersion = 17 << 16 | 6;
+ }
if (DBG) {
log("dbh.onUpgrade:- db=" + db + " oldV=" + oldVersion + " newV=" + newVersion);
}
@@ -932,8 +938,10 @@ public class TelephonyProvider extends ContentProvider
addIntAttribute(parser, "max_conns_time", map, Telephony.Carriers.MAX_CONNS_TIME);
addIntAttribute(parser, "mtu", map, Telephony.Carriers.MTU);
+
addBoolAttribute(parser, "carrier_enabled", map, Telephony.Carriers.CARRIER_ENABLED);
addBoolAttribute(parser, "modem_cognitive", map, Telephony.Carriers.MODEM_COGNITIVE);
+ addBoolAttribute(parser, "user_visible", map, Telephony.Carriers.USER_VISIBLE);
String bearerList = parser.getAttributeValue(null, "bearer_bitmask");
if (bearerList != null) {