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

Commit 35fbc3d5 authored by Iván Budnik's avatar Iván Budnik Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in MediaRoute2ProviderServiceProxy#notifyProviderUpdated" into main

parents 4bd09c0f d5fd33b1
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(