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

Commit 67845718 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Don't crash system with exception from onServiceChanged

Change-Id: I6d66eb8388838da5aed50283f169c95ab5d7bf4e
Fix: 118839305
Test: boot, code inspection
parent e8d1eaa1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -289,9 +289,11 @@ public abstract class RegisteredServicesCache<V> {
        }

        final RegisteredServicesCacheListener<V> listener2 = listener;
        handler.post(new Runnable() {
            public void run() {
        handler.post(() -> {
            try {
                listener2.onServiceChanged(type, userId, removed);
            } catch (Throwable th) {
                Slog.wtf(TAG, "Exception from onServiceChanged", th);
            }
        });
    }