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

Commit 18b3180f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "audio: Fix possible NullPointerException when DEBUG is true" am: 4d738300

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1814782

Change-Id: Ia85f1532bc5b3682756699597ecd00fd2e8c71d3
parents aca72963 4d738300
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -344,10 +344,19 @@ class BluetoothRouteProvider {
    }

    private void addActiveRoute(BluetoothRouteInfo btRoute) {
        if (btRoute == null) {
            if (DEBUG) {
                Log.d(TAG, " btRoute is null");
            }
            return;
        }
        if (DEBUG) {
            Log.d(TAG, "Adding active route: " + btRoute.route);
        }
        if (btRoute == null || mActiveRoutes.contains(btRoute)) {
        if (mActiveRoutes.contains(btRoute)) {
            if (DEBUG) {
                Log.d(TAG, " btRoute is already added.");
            }
            return;
        }
        setRouteConnectionState(btRoute, STATE_CONNECTED);