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

Commit d5fd33b1 authored by Iván Budnik's avatar Iván Budnik
Browse files

Fix NPE in MediaRoute2ProviderServiceProxy#notifyProviderUpdated

The NPE was being swallowed by the Binder framework and logging a
warning.

Bug: 205124386
Test: Manual.
Change-Id: I0dcacddda3a5eeb1756869d85afedcbc9e56b415
parent 43fa00ce
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -502,6 +502,10 @@ public abstract class MediaRoute2ProviderService extends Service {
            return;
        }

        if (mProviderInfo == null) {
            return;
        }

        try {
            mRemoteCallback.notifyProviderUpdated(mProviderInfo);
        } catch (RemoteException ex) {
+3 −1
Original line number Diff line number Diff line
@@ -662,7 +662,9 @@ final class MediaRoute2ProviderServiceProxy extends MediaRoute2Provider
        }

        @Override
        public void notifyProviderUpdated(MediaRoute2ProviderInfo providerInfo) {
        public void notifyProviderUpdated(@NonNull MediaRoute2ProviderInfo providerInfo) {
            Objects.requireNonNull(providerInfo, "providerInfo must not be null");

            for (MediaRoute2Info route : providerInfo.getRoutes()) {
                if (route.isSystemRoute()) {
                    throw new SecurityException(