Adding try-catch block to catch an unexpected exception causing crash.
This is a temporary/partial change. Debugging further to check the
root cause.
Bug: 20701423
Change-Id: I0337a17da9b7bc73d5029d2c1852fc7a835ee766
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index 1a8fa16..3a930ea 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -811,8 +811,13 @@
mergedValues.putAll(newRow);
}
- db.update(table, mergedValues, "_id=" + oldRow.getInt(oldRow.getColumnIndex("_id")),
- null);
+ try {
+ db.update(table, mergedValues, "_id=" + oldRow.getInt(oldRow.getColumnIndex("_id")),
+ null);
+ } catch (Exception e) {
+ loge("mergeFieldsAndUpdateDb: Unexpected exception on db.update " + e);
+ loge("mergeFieldsAndUpdateDb: Failed to add updated values to db:" + mergedValues);
+ }
}
static public Cursor selectConflictingRow(SQLiteDatabase db, String table,