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

Commit 4651a74e authored by Santiago Seifert's avatar Santiago Seifert
Browse files

Log available types when selected type not in available list

Bug: b/378691660
Test: Manually by forcing the log line to run.
Flag: EXEMPT log changes only
Change-Id: I145847ebc70d2d71b48e33e6010657f2a9874439
parent 6266b5cb
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.server.media.BluetoothRouteController.NoOpBluetoothRouteController;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -378,7 +379,12 @@ import java.util.Objects;
            Slog.e(
                    TAG,
                    "Could not map this selected device attribute type to an available route: "
                            + selectedDeviceAttributesType);
                            + selectedDeviceAttributesType
                            + ". Available types: "
                            + Arrays.toString(
                                    Arrays.stream(audioDeviceInfos)
                                            .map(AudioDeviceInfo::getType)
                                            .toArray()));
            // We know mRouteIdToAvailableDeviceRoutes is not empty.
            newSelectedRouteHolder = mRouteIdToAvailableDeviceRoutes.values().iterator().next();
        }