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

Commit 514d2e8f 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:...

Merge "audio: Fix possible NullPointerException when DEBUG is true" am: 4d738300 am: 18b3180f am: 18062a45

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

Change-Id: I81298242ed16a24c14857a0bebadd4be71a52435
parents 3411e812 18062a45
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -344,10 +344,19 @@ class BluetoothRouteProvider {
    }
    }


    private void addActiveRoute(BluetoothRouteInfo btRoute) {
    private void addActiveRoute(BluetoothRouteInfo btRoute) {
        if (btRoute == null) {
            if (DEBUG) {
                Log.d(TAG, " btRoute is null");
            }
            return;
        }
        if (DEBUG) {
        if (DEBUG) {
            Log.d(TAG, "Adding active route: " + btRoute.route);
            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;
            return;
        }
        }
        setRouteConnectionState(btRoute, STATE_CONNECTED);
        setRouteConnectionState(btRoute, STATE_CONNECTED);