Merge "Add callback onProfileAudioStateChanged()" into pi-dev

am: a29957d518

Change-Id: I781527469bd558617dee57ed431d072ab629705d
This commit is contained in:
Ryan Lin
2018-03-31 06:39:49 +00:00
committed by android-build-merger
3 changed files with 7 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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 {

View File

@@ -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) {