From bca6f79026b6201253cb12c2bcda08a9e6cbae83 Mon Sep 17 00:00:00 2001 From: ryanywlin Date: Fri, 30 Mar 2018 10:25:30 +0800 Subject: [PATCH] Add callback onProfileAudioStateChanged() Bug: 74134939 Test: Build Change-Id: I2a7e837703b66e1798679c65afab7dc6572c295e --- .../android/settings/bluetooth/BluetoothDeviceUpdater.java | 4 ++++ .../android/settings/bluetooth/BluetoothSummaryUpdater.java | 4 ++++ .../settings/bluetooth/DeviceListPreferenceFragment.java | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java b/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java index 0ae85b11c61..e322bb4d86b 100644 --- a/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java +++ b/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java @@ -166,6 +166,10 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback { public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) { } + @Override + public void onProfileAudioStateChanged(int bluetoothProfile, int state) { + } + /** * Set the context to generate the {@link Preference}, so it could get the correct theme. */ diff --git a/src/com/android/settings/bluetooth/BluetoothSummaryUpdater.java b/src/com/android/settings/bluetooth/BluetoothSummaryUpdater.java index 43d25e7b49d..380bf699a1e 100644 --- a/src/com/android/settings/bluetooth/BluetoothSummaryUpdater.java +++ b/src/com/android/settings/bluetooth/BluetoothSummaryUpdater.java @@ -80,6 +80,10 @@ public final class BluetoothSummaryUpdater extends SummaryUpdater implements Blu public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) { } + @Override + public void onProfileAudioStateChanged(int bluetoothProfile, int state) { + } + @Override public void register(boolean listening) { if (mBluetoothAdapter == null) { diff --git a/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java b/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java index 207a4b0643e..d34699ed273 100644 --- a/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java +++ b/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java @@ -280,6 +280,9 @@ public abstract class DeviceListPreferenceFragment extends @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) { } + @Override + public void onProfileAudioStateChanged(int bluetoothProfile, int state) { } + /** * Return the key of the {@link PreferenceGroup} that contains the bluetooth devices */