Fix apn overwrite issue
When a new apn is created with an existing apn name but
different apn type, existing apn is overwritten with new apn.
This is because of the unique constraint defined for carriers
table.
Fix is to add type field also to the unique constraint,
which would allow multiple apns to share same apn with different types.
Change-Id: I1ebcbb1f58d6039ca6f90eccf4b593f0bf3799f1
CRs-Fixed: 1053860
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index 5491a79..90a0b8a 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -152,6 +152,7 @@
CARRIERS_UNIQUE_FIELDS.add(MVNO_TYPE);
CARRIERS_UNIQUE_FIELDS.add(MVNO_MATCH_DATA);
CARRIERS_UNIQUE_FIELDS.add(PROFILE_ID);
+ CARRIERS_UNIQUE_FIELDS.add(TYPE);
}
static {