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

Commit 39961301 authored by Roman Kiryanov's avatar Roman Kiryanov
Browse files

Check mBtRouteProvider for null before calling methods on it



line #250 allows it to be null.

Bug: 152647633
Test: boot, play vide in chrome
Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
Change-Id: I95074c50db10895e6e7eca6f3b46324d586d53bc
parent adf530fc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -261,9 +261,11 @@ class SystemMediaRoute2Provider extends MediaRoute2Provider {
                    .build();
            builder.addSelectedRoute(mSelectedRouteId);

            if (mBtRouteProvider != null) {
                for (MediaRoute2Info route : mBtRouteProvider.getTransferableRoutes()) {
                    builder.addTransferableRoute(route.getId());
                }
            }

            RoutingSessionInfo newSessionInfo = builder.setProviderId(mUniqueId).build();
            if (Objects.equals(oldSessionInfo, newSessionInfo)) {