Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88f9d0b9 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Catch exception when notifying Settings changes.

Since changes are dispatched through a separate thread, the target
user may have been removed by the time we try sending the change
notification, so log instead of crashing.

Bug: 64402212
Test: builds, boots
Change-Id: I0efdfabf24829bef7a1ecc7b3c97205f87e9769f
parent 2593d707
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2878,7 +2878,11 @@ public class SettingsProvider extends ContentProvider {
                    case MSG_NOTIFY_URI_CHANGED: {
                        final int userId = msg.arg1;
                        Uri uri = (Uri) msg.obj;
                        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);
                        }