Merge "To show hearing aids device in the available devices group"

This commit is contained in:
TreeHugger Robot
2018-06-12 17:03:12 +00:00
committed by Android (Google) Code Review
4 changed files with 65 additions and 0 deletions

View File

@@ -97,6 +97,11 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
if (DBG) {
Log.d(TAG, "isFilterMatched() current audio profile : " + currentAudioProfile);
}
// If device is Hearing Aid, it is compatible with HFP and A2DP.
// It would show in Available Devices group.
if (cachedDevice.isConnectedHearingAidDevice()) {
return true;
}
// According to the current audio profile type,
// this page will show the bluetooth device that have corresponding profile.
// For example:

View File

@@ -101,6 +101,11 @@ public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater {
if (DBG) {
Log.d(TAG, "isFilterMatched() current audio profile : " + currentAudioProfile);
}
// If device is Hearing Aid, it is compatible with HFP and A2DP.
// It would not show in Connected Devices group.
if (cachedDevice.isConnectedHearingAidDevice()) {
return false;
}
// According to the current audio profile type,
// this page will show the bluetooth device that doesn't have corresponding profile.
// For example: