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

Commit 714b1c1d authored by hughchen's avatar hughchen Committed by Hugh Chen
Browse files

Add callback onProfileAudioStateChanged()

Bug: 74134939
Test: Build
Change-Id: Ibbe65c65b76ecfcb8980b931c37a300d01cbef3c
parent b5dcf7d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}
+3 −0
Original line number Diff line number Diff line
@@ -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 {
+3 −0
Original line number Diff line number Diff line
@@ -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) {