AudioDeviceInventory: fix devices role management
AudioDeviceInventory.setDevicesRole() implementation was wrong when trying to merge devices selection for a given <role|strategy> and also systematically clearing an existing selection before applying a new one. setDevicesRoles() is used only for non additive scenario where a set of devices will replace the existing one if any. If the desired behavior is to add devices to an existing preference, then addDevicesRole() should be used. This causes the unwanted systematic reset of call route to default when switching from one route to another. Bug: 307161477 Test: repro steps in the bug Test: AudioCommunicationDeviceTest Change-Id: I09dd9a6c4ad2425b2d9a281e17f112789baeef17
Loading
Please register or sign in to comment