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

Commit a19d0b80 authored by Alex Dadukin's avatar Alex Dadukin
Browse files

Move findBluetoothRouteWithRouteId closer to the usage and make private

Bug: b/255495104
Test: atest SystemMediaRouter2Test
Change-Id: Id893608f8b0f016c5f5a7fe90ff509e4fb498302
parent 14e61084
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -176,6 +176,18 @@ class BluetoothRouteProvider {
        }
    }

    private BluetoothRouteInfo findBluetoothRouteWithRouteId(String routeId) {
        if (routeId == null) {
            return null;
        }
        for (BluetoothRouteInfo btRouteInfo : mBluetoothRoutes.values()) {
            if (TextUtils.equals(btRouteInfo.mRoute.getId(), routeId)) {
                return btRouteInfo;
            }
        }
        return null;
    }

    /**
     * Clears the active device for all known profiles.
     */
@@ -238,18 +250,6 @@ class BluetoothRouteProvider {
        return routes;
    }

    BluetoothRouteInfo findBluetoothRouteWithRouteId(String routeId) {
        if (routeId == null) {
            return null;
        }
        for (BluetoothRouteInfo btRouteInfo : mBluetoothRoutes.values()) {
            if (TextUtils.equals(btRouteInfo.mRoute.getId(), routeId)) {
                return btRouteInfo;
            }
        }
        return null;
    }

    /**
     * Updates the volume for {@link AudioManager#getDevicesForStream(int) devices}.
     *