[Hide DCK devices] Hide DCK devices from settings app (other devices section).
Set preferences of DCK devices to be invisible in other devices section. Test: atest: com.android.settings.bluetooth.ConnectedBluetoothDeviceUpdaterTest Bug: 322285078 Change-Id: I13572250f6e1d6b1562a052a0c25e8af60eba9cd
This commit is contained in:
@@ -24,6 +24,8 @@ import android.util.Log;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.connecteddevice.DevicePreferenceCallback;
|
||||
import com.android.settings.flags.Flags;
|
||||
import com.android.settingslib.bluetooth.BluetoothUtils;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||
|
||||
/**
|
||||
@@ -95,6 +97,15 @@ public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater {
|
||||
cachedDevice.getName() + ", isFilterMatched : " + isFilterMatched);
|
||||
}
|
||||
}
|
||||
if (Flags.enableHideExclusivelyManagedBluetoothDevice()) {
|
||||
if (BluetoothUtils.isExclusivelyManagedBluetoothDevice(mContext,
|
||||
cachedDevice.getDevice())) {
|
||||
if (DBG) {
|
||||
Log.d(TAG, "isFilterMatched() hide BluetoothDevice with exclusive manager");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return isFilterMatched;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user