Loading src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +35 −5 Original line number Diff line number Diff line Loading @@ -602,7 +602,8 @@ public class BluetoothDeviceManager { Log.w(this, "disconnectSco: Trying to disconnect audio but no headset service exists."); } else { result = mBluetoothHeadset.disconnectAudio(); Log.i(this, "disconnectSco: BluetoothHeadset#disconnectAudio()=%b", result); Log.i(this, "disconnectSco: BluetoothHeadset#disconnectAudio()=%s", btCodeToString(result)); } return result; } Loading Loading @@ -888,8 +889,8 @@ public class BluetoothDeviceManager { } if (getBluetoothHeadset() != null) { int scoConnectionRequest = mBluetoothHeadset.connectAudio(); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%d", scoConnectionRequest); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%s", btCodeToString(scoConnectionRequest)); return scoConnectionRequest == BluetoothStatusCodes.SUCCESS || scoConnectionRequest == BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_CONNECTED; Loading Loading @@ -944,8 +945,8 @@ public class BluetoothDeviceManager { } if (getBluetoothHeadset() != null) { int scoConnectionRequest = mBluetoothHeadset.connectAudio(); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%d", scoConnectionRequest); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%s", btCodeToString(scoConnectionRequest)); return scoConnectionRequest == BluetoothStatusCodes.SUCCESS || scoConnectionRequest == BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_CONNECTED; Loading Loading @@ -1015,4 +1016,33 @@ public class BluetoothDeviceManager { public void dump(IndentingPrintWriter pw) { mLocalLog.dump(pw); } private String btCodeToString(int code) { switch (code) { case BluetoothStatusCodes.SUCCESS: return "SUCCESS"; case BluetoothStatusCodes.ERROR_UNKNOWN: return "ERROR_UNKNOWN"; case BluetoothStatusCodes.ERROR_PROFILE_SERVICE_NOT_BOUND: return "ERROR_PROFILE_SERVICE_NOT_BOUND"; case BluetoothStatusCodes.ERROR_TIMEOUT: return "ERROR_TIMEOUT"; case BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_CONNECTED: return "ERROR_AUDIO_DEVICE_ALREADY_CONNECTED"; case BluetoothStatusCodes.ERROR_NO_ACTIVE_DEVICES: return "ERROR_NO_ACTIVE_DEVICES"; case BluetoothStatusCodes.ERROR_NOT_ACTIVE_DEVICE: return "ERROR_NOT_ACTIVE_DEVICE"; case BluetoothStatusCodes.ERROR_AUDIO_ROUTE_BLOCKED: return "ERROR_AUDIO_ROUTE_BLOCKED"; case BluetoothStatusCodes.ERROR_CALL_ACTIVE: return "ERROR_CALL_ACTIVE"; case BluetoothStatusCodes.ERROR_PROFILE_NOT_CONNECTED: return "ERROR_PROFILE_NOT_CONNECTED"; case BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_DISCONNECTED: return "BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_DISCONNECTED"; default: return Integer.toString(code); } } } Loading
src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +35 −5 Original line number Diff line number Diff line Loading @@ -602,7 +602,8 @@ public class BluetoothDeviceManager { Log.w(this, "disconnectSco: Trying to disconnect audio but no headset service exists."); } else { result = mBluetoothHeadset.disconnectAudio(); Log.i(this, "disconnectSco: BluetoothHeadset#disconnectAudio()=%b", result); Log.i(this, "disconnectSco: BluetoothHeadset#disconnectAudio()=%s", btCodeToString(result)); } return result; } Loading Loading @@ -888,8 +889,8 @@ public class BluetoothDeviceManager { } if (getBluetoothHeadset() != null) { int scoConnectionRequest = mBluetoothHeadset.connectAudio(); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%d", scoConnectionRequest); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%s", btCodeToString(scoConnectionRequest)); return scoConnectionRequest == BluetoothStatusCodes.SUCCESS || scoConnectionRequest == BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_CONNECTED; Loading Loading @@ -944,8 +945,8 @@ public class BluetoothDeviceManager { } if (getBluetoothHeadset() != null) { int scoConnectionRequest = mBluetoothHeadset.connectAudio(); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%d", scoConnectionRequest); Log.i(this, "connectAudio: BluetoothHeadset#connectAudio()=%s", btCodeToString(scoConnectionRequest)); return scoConnectionRequest == BluetoothStatusCodes.SUCCESS || scoConnectionRequest == BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_CONNECTED; Loading Loading @@ -1015,4 +1016,33 @@ public class BluetoothDeviceManager { public void dump(IndentingPrintWriter pw) { mLocalLog.dump(pw); } private String btCodeToString(int code) { switch (code) { case BluetoothStatusCodes.SUCCESS: return "SUCCESS"; case BluetoothStatusCodes.ERROR_UNKNOWN: return "ERROR_UNKNOWN"; case BluetoothStatusCodes.ERROR_PROFILE_SERVICE_NOT_BOUND: return "ERROR_PROFILE_SERVICE_NOT_BOUND"; case BluetoothStatusCodes.ERROR_TIMEOUT: return "ERROR_TIMEOUT"; case BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_CONNECTED: return "ERROR_AUDIO_DEVICE_ALREADY_CONNECTED"; case BluetoothStatusCodes.ERROR_NO_ACTIVE_DEVICES: return "ERROR_NO_ACTIVE_DEVICES"; case BluetoothStatusCodes.ERROR_NOT_ACTIVE_DEVICE: return "ERROR_NOT_ACTIVE_DEVICE"; case BluetoothStatusCodes.ERROR_AUDIO_ROUTE_BLOCKED: return "ERROR_AUDIO_ROUTE_BLOCKED"; case BluetoothStatusCodes.ERROR_CALL_ACTIVE: return "ERROR_CALL_ACTIVE"; case BluetoothStatusCodes.ERROR_PROFILE_NOT_CONNECTED: return "ERROR_PROFILE_NOT_CONNECTED"; case BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_DISCONNECTED: return "BluetoothStatusCodes.ERROR_AUDIO_DEVICE_ALREADY_DISCONNECTED"; default: return Integer.toString(code); } } }