fix(devices): cache platform device names, dedupe placeholder ids, purge collided EQ entries
Dart half of bt-device-identity. EstadoEcualizador now caches each device's platform-reported name in memory so the settings screen shows the device's own Bluetooth name instead of its raw id when no custom rename exists, and skips auto-creating preset entries for the composite-placeholder sentinel. Enabling multi-device EQ triggers the Bluetooth permission request through the new channel contract. A flag-guarded one-time migration purges only entries keyed by the exact literal placeholder id from the three per-device preference maps, since those collided entries cannot be attributed to a device. Work unit 2/2 of bt-device-identity (Dart state + migration).
This commit is contained in:
@@ -78,5 +78,17 @@ void main() {
|
||||
test('dispose closes the stream without error', () async {
|
||||
await expectLater(fake.dispose(), completes);
|
||||
});
|
||||
|
||||
// bt-device-identity Task 2.5: interface-completeness — every concrete
|
||||
// ServicioDispositivoAudio must implement solicitarPermisoBluetooth.
|
||||
test(
|
||||
'solicitarPermisoBluetooth increments the call counter and returns '
|
||||
'the configured value',
|
||||
() async {
|
||||
final granted = await fake.solicitarPermisoBluetooth();
|
||||
expect(granted, isTrue);
|
||||
expect(fake.solicitarPermisoBluetoothCalls, equals(1));
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user