Simplify if/else branch in MR2ServiceImpl
Non-functional change to deduplicate code. Test: Should be trivially correct. Bug: 205124386 Change-Id: I07f8182d4b4b3dfea2dc5cb63edd77858becd87a
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user