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

Commit da43e675 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Jakub Pawłowski
Browse files

Pretty print profile names in BluetoothDatabase

Test: observe logcat output when connecting to device
Change-Id: Iec184020ff8778cb9c626b354c89fd8a7ef416de
(cherry picked from commit 3605603c)
parent 432e7c9e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -377,7 +377,8 @@ public class DatabaseManager {
            Metadata data = mMetadataCache.get(address);
            int connectionPolicy = data.getProfileConnectionPolicy(profile);

            Log.v(TAG, "getProfileConnectionPolicy: xx:xx:xx:xx:xx:xx, profile=" + profile
            Log.v(TAG, "getProfileConnectionPolicy: xx:xx:xx:xx:xx:xx, profile="
                    + BluetoothProfile.getProfileName(profile)
                    + ", connectionPolicy = " + connectionPolicy);
            return connectionPolicy;
        }
+14 −0
Original line number Diff line number Diff line
@@ -485,8 +485,22 @@ public interface BluetoothProfile {
                return "HEARING_AID";
            case LE_AUDIO:
                return "LE_AUDIO";
            case VOLUME_CONTROL:
                return "VOLUME_CONTROL";
            case MCP_SERVER:
                return "MCP_SERVER";
            case CSIP_SET_COORDINATOR:
                return "CSIP_SET_COORDINATOR";
            case LE_AUDIO_BROADCAST:
                return "LE_AUDIO_BROADCAST";
            case LE_CALL_CONTROL:
                return "LE_CALL_CONTROL";
            case HAP_CLIENT:
                return "HAP_CLIENT";
            case LE_AUDIO_BROADCAST_ASSISTANT:
                return "LE_AUDIO_BROADCAST_ASSISTANT";
            case BATTERY:
                return "BATTERY";
            default:
                return "UNKNOWN_PROFILE";
        }