Show connecting hearing devices in A11y hearing devices page
We only show connected hearing devices in the hearing devices page now. When user pairing a device from pairing page and back to the hearing devices page after the device is bonded, it's confusing no device shown in the list because the device is still connecting to profiles. We should show the connecting device to avoid confusion. Bug: 283268686 Test: make RunSettingsRoboTests ROBOTEST_FILTER=DeviceListPreferenceFragmentTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableHearingDeviceUpdaterTest Change-Id: Id3b29c12b80c282736a3e6ca73bcf317e0652b89
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings.accessibility;
|
||||
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.bluetooth.AvailableMediaBluetoothDeviceUpdater;
|
||||
@@ -37,11 +36,9 @@ public class AvailableHearingDeviceUpdater extends AvailableMediaBluetoothDevice
|
||||
|
||||
@Override
|
||||
public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) {
|
||||
final BluetoothDevice device = cachedDevice.getDevice();
|
||||
final boolean isConnectedHearingAidDevice = (cachedDevice.isConnectedHearingAidDevice()
|
||||
&& (device.getBondState() == BluetoothDevice.BOND_BONDED));
|
||||
|
||||
return isConnectedHearingAidDevice && isDeviceInCachedDevicesList(cachedDevice);
|
||||
return cachedDevice.isHearingAidDevice()
|
||||
&& isDeviceConnected(cachedDevice)
|
||||
&& isDeviceInCachedDevicesList(cachedDevice);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user