From 1e58a1faa71ce26411beed18c7d51d1bcd736535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Ko=C5=82odziejczyk?= Date: Tue, 1 Aug 2023 14:45:24 +0000 Subject: [PATCH] MediaOutputController: Distinguish broadcast check context in logs This adds context for debug logs in case if there is no local broadcaster. Tag: #feature Bug: 286599762 Test: atest MediaOutputBroadcastDialogTest Change-Id: I00f79365218a768ae7ff64f6ae46fd6371c27831 --- .../media/dialog/MediaOutputController.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java index 8a8ff9ba75277..b431babb9b40e 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java @@ -989,7 +989,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, LocalBluetoothLeBroadcast broadcast = mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastProfile(); if (broadcast == null) { - Log.d(TAG, "getBroadcastMetadata: LE Audio Broadcast is null"); + Log.d(TAG, "getLocalBroadcastMetadataQrCodeString: LE Audio Broadcast is null"); return ""; } final LocalBluetoothLeBroadcastMetadata metadata = @@ -1097,7 +1097,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, LocalBluetoothLeBroadcastAssistant assistant = mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastAssistantProfile(); if (assistant == null) { - Log.d(TAG, "The broadcast assistant profile is null"); + Log.d(TAG, "getConnectedBroadcastSinkDevices: The broadcast assistant profile is null"); return null; } @@ -1108,7 +1108,8 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, LocalBluetoothLeBroadcastAssistant assistant = mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastAssistantProfile(); if (assistant == null) { - Log.d(TAG, "The broadcast assistant profile is null"); + Log.d(TAG, "isThereAnyBroadcastSourceIntoSinkDevice: The broadcast assistant profile " + + "is null"); return false; } List sourceList = assistant.getAllSources(sink); @@ -1121,7 +1122,8 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, LocalBluetoothLeBroadcastAssistant assistant = mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastAssistantProfile(); if (assistant == null) { - Log.d(TAG, "The broadcast assistant profile is null"); + Log.d(TAG, "addSourceIntoSinkDeviceWithBluetoothLeAssistant: The broadcast assistant " + + "profile is null"); return false; } assistant.addSource(sink, metadata, isGroupOp); @@ -1134,7 +1136,8 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, LocalBluetoothLeBroadcastAssistant assistant = mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastAssistantProfile(); if (assistant == null) { - Log.d(TAG, "The broadcast assistant profile is null"); + Log.d(TAG, "registerLeBroadcastAssistantServiceCallback: The broadcast assistant " + + "profile is null"); return; } Log.d(TAG, "Register LE broadcast assistant callback"); @@ -1146,7 +1149,8 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, LocalBluetoothLeBroadcastAssistant assistant = mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastAssistantProfile(); if (assistant == null) { - Log.d(TAG, "The broadcast assistant profile is null"); + Log.d(TAG, "unregisterLeBroadcastAssistantServiceCallback: The broadcast assistant " + + "profile is null"); return; } Log.d(TAG, "Unregister LE broadcast assistant callback");