Merge "Catch exception when notifying Settings changes." into oc-mr1-dev

This commit is contained in:
TreeHugger Robot
2017-08-12 05:59:17 +00:00
committed by Android (Google) Code Review

View File

@@ -2878,7 +2878,11 @@ public class SettingsProvider extends ContentProvider {
case MSG_NOTIFY_URI_CHANGED: {
final int userId = msg.arg1;
Uri uri = (Uri) msg.obj;
getContext().getContentResolver().notifyChange(uri, null, true, userId);
try {
getContext().getContentResolver().notifyChange(uri, null, true, userId);
} catch (SecurityException e) {
Slog.w(LOG_TAG, "Failed to notify for " + userId + ": " + uri, e);
}
if (DEBUG) {
Slog.v(LOG_TAG, "Notifying for " + userId + ": " + uri);
}