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

Commit b7a1333b authored by Santiago Seifert's avatar Santiago Seifert
Browse files

Simplify if/else branch in MR2ServiceImpl

Non-functional change to deduplicate code.

Test: Should be trivially correct.
Bug: 205124386
Change-Id: I07f8182d4b4b3dfea2dc5cb63edd77858becd87a
parent 5d7d1378
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1938,12 +1938,12 @@ class MediaRouter2ServiceImpl {
                @NonNull RoutingSessionInfo oldSession, @NonNull MediaRoute2Info route) {
            try {
                if (route.isSystemRoute() && !routerRecord.mHasModifyAudioRoutingPermission) {
                    routerRecord.mRouter.requestCreateSessionByManager(uniqueRequestId,
                            oldSession, mSystemProvider.getDefaultRoute());
                } else {
                    routerRecord.mRouter.requestCreateSessionByManager(uniqueRequestId,
                            oldSession, route);
                    // The router lacks permission to modify system routing, so we hide system
                    // route info from them.
                    route = mSystemProvider.getDefaultRoute();
                }
                routerRecord.mRouter.requestCreateSessionByManager(
                        uniqueRequestId, oldSession, route);
            } catch (RemoteException ex) {
                Slog.w(TAG, "getSessionHintsForCreatingSessionOnHandler: "
                        + "Failed to request. Router probably died.", ex);