From 714b1c1d2c919bda5c411386933147121d621d09 Mon Sep 17 00:00:00 2001 From: hughchen Date: Fri, 23 Mar 2018 15:54:29 +0800 Subject: [PATCH] Add callback onProfileAudioStateChanged() Bug: 74134939 Test: Build Change-Id: Ibbe65c65b76ecfcb8980b931c37a300d01cbef3c --- .../com/android/settingslib/bluetooth/BluetoothCallback.java | 1 + .../SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java | 3 +++ .../systemui/statusbar/policy/BluetoothControllerImpl.java | 3 +++ 3 files changed, 7 insertions(+) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java index ac3599cae05b2..4a6df5051679a 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java @@ -29,4 +29,5 @@ public interface BluetoothCallback { void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState); void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state); void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile); + void onProfileAudioStateChanged(int bluetoothProfile, int state); } diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java index b8411e2963bd6..94641054f548f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java +++ b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java @@ -611,6 +611,9 @@ public class KeyboardUI extends SystemUI implements InputManager.OnTabletModeCha @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) { } + + @Override + public void onProfileAudioStateChanged(int bluetoothProfile, int state) { } } private final class BluetoothErrorListener implements Utils.ErrorListener { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java index fcf084b293270..94db95a6f33c5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java @@ -279,6 +279,9 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {} + @Override + public void onProfileAudioStateChanged(int bluetoothProfile, int state) {} + private ActuallyCachedState getCachedState(CachedBluetoothDevice device) { ActuallyCachedState state = mCachedState.get(device); if (state == null) {