Fix to handle IllegalArgumentException
Exception handling mechanism is added to prevent crash in case
of missing contacts provider.
Bug: 22060548
Change-Id: I8c568c1cc53a33fe7a242be634e70aeafb163fb7
diff --git a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
index 99621d9..300137f 100644
--- a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
+++ b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
@@ -122,8 +122,13 @@
where.append(" = 1 AND ");
where.append(Calls.TYPE);
where.append(" = ?");
- mContext.getContentResolver().update(Calls.CONTENT_URI, values, where.toString(),
- new String[]{ Integer.toString(Calls.MISSED_TYPE) });
+ try {
+ mContext.getContentResolver().update(Calls.CONTENT_URI, values,
+ where.toString(), new String[]{ Integer.toString(Calls.
+ MISSED_TYPE) });
+ } catch (IllegalArgumentException e) {
+ Log.w(this, "ContactsProvider update command failed", e);
+ }
}
});
cancelMissedCallNotification();