Fixing the the conditions checked when searching conflicting row in db.
Bug: 20170255
Change-Id: I4846b009ae82482a078d2b4c2b72eccd38db003c
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index e604196..f901b47 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -935,11 +935,11 @@
static public Cursor selectConflictingRow(SQLiteDatabase db, String table,
ContentValues row) {
- // Conflict is possible only when numeric, mnnc, mnc (fields without any default value)
+ // Conflict is possible only when numeric, mcc, mnc (fields without any default value)
// are set in the new row
- if (row.containsKey(Telephony.Carriers.NUMERIC) ||
- row.containsKey(Telephony.Carriers.MCC) ||
- row.containsKey(Telephony.Carriers.MNC)) {
+ if (!row.containsKey(Telephony.Carriers.NUMERIC) ||
+ !row.containsKey(Telephony.Carriers.MCC) ||
+ !row.containsKey(Telephony.Carriers.MNC)) {
loge("dbh.selectConflictingRow: called for non-conflicting row: " + row);
return null;
}
@@ -1268,6 +1268,7 @@
DatabaseHelper.mergeFieldsAndUpdateDb(db, CARRIERS_TABLE, oldRow, values,
mergedValues, false);
oldRow.close();
+ notify = true;
}
}