Loading services/core/java/com/android/server/audio/AudioService.java +7 −0 Original line number Diff line number Diff line Loading @@ -7636,6 +7636,10 @@ public class AudioService extends IAudioService.Stub throw new IllegalArgumentException("Illegal BluetoothProfile profile for device " + previousDevice + " -> " + newDevice + ". Got: " + profile); } sDeviceLogger.enqueue(new EventLogger.StringEvent("BlutoothActiveDeviceChanged for " + BluetoothProfile.getProfileName(profile) + ", device update " + previousDevice + " -> " + newDevice)); AudioDeviceBroker.BtDeviceChangedData data = new AudioDeviceBroker.BtDeviceChangedData(newDevice, previousDevice, info, "AudioService"); Loading Loading @@ -9685,6 +9689,9 @@ public class AudioService extends IAudioService.Stub } } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); sDeviceLogger.enqueue(new EventLogger.StringEvent( "BluetoothAdapter ACTION_STATE_CHANGED with state " + state)); if (state == BluetoothAdapter.STATE_OFF || state == BluetoothAdapter.STATE_TURNING_OFF) { mDeviceBroker.disconnectAllBluetoothProfiles(); Loading services/core/java/com/android/server/audio/BtHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -459,6 +459,8 @@ public class BtHelper { //@GuardedBy("AudioDeviceBroker.mDeviceStateLock") /*package*/ synchronized void onBtProfileDisconnected(int profile) { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "BT profile " + BluetoothProfile.getProfileName(profile) + " disconnected")); switch (profile) { case BluetoothProfile.A2DP: mA2dp = null; Loading Loading @@ -487,6 +489,9 @@ public class BtHelper { @GuardedBy("AudioDeviceBroker.mDeviceStateLock") /*package*/ synchronized void onBtProfileConnected(int profile, BluetoothProfile proxy) { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "BT profile " + BluetoothProfile.getProfileName(profile) + " connected to proxy " + proxy)); if (profile == BluetoothProfile.HEADSET) { onHeadsetProfileConnected((BluetoothHeadset) proxy); return; Loading Loading
services/core/java/com/android/server/audio/AudioService.java +7 −0 Original line number Diff line number Diff line Loading @@ -7636,6 +7636,10 @@ public class AudioService extends IAudioService.Stub throw new IllegalArgumentException("Illegal BluetoothProfile profile for device " + previousDevice + " -> " + newDevice + ". Got: " + profile); } sDeviceLogger.enqueue(new EventLogger.StringEvent("BlutoothActiveDeviceChanged for " + BluetoothProfile.getProfileName(profile) + ", device update " + previousDevice + " -> " + newDevice)); AudioDeviceBroker.BtDeviceChangedData data = new AudioDeviceBroker.BtDeviceChangedData(newDevice, previousDevice, info, "AudioService"); Loading Loading @@ -9685,6 +9689,9 @@ public class AudioService extends IAudioService.Stub } } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); sDeviceLogger.enqueue(new EventLogger.StringEvent( "BluetoothAdapter ACTION_STATE_CHANGED with state " + state)); if (state == BluetoothAdapter.STATE_OFF || state == BluetoothAdapter.STATE_TURNING_OFF) { mDeviceBroker.disconnectAllBluetoothProfiles(); Loading
services/core/java/com/android/server/audio/BtHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -459,6 +459,8 @@ public class BtHelper { //@GuardedBy("AudioDeviceBroker.mDeviceStateLock") /*package*/ synchronized void onBtProfileDisconnected(int profile) { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "BT profile " + BluetoothProfile.getProfileName(profile) + " disconnected")); switch (profile) { case BluetoothProfile.A2DP: mA2dp = null; Loading Loading @@ -487,6 +489,9 @@ public class BtHelper { @GuardedBy("AudioDeviceBroker.mDeviceStateLock") /*package*/ synchronized void onBtProfileConnected(int profile, BluetoothProfile proxy) { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "BT profile " + BluetoothProfile.getProfileName(profile) + " connected to proxy " + proxy)); if (profile == BluetoothProfile.HEADSET) { onHeadsetProfileConnected((BluetoothHeadset) proxy); return; Loading