refactor(alarm): make the ringing screen pure UI over a reduced native port
PantallaAlarmaSonando no longer owns any audio orchestration (fallback player, dB ramp, native handoff confirm, media-volume override/restore): it only calls EstadoAlarmas.finalizarEjecucion/posponerAlarma from Stop/Snooze/back, keeping the single-exit guard, PopScope back=Stop and dismiss semantics intact. The status line now reads directly from the alarm's static config (station name or a neutral label) instead of a live playback/handoff state. PuertoAlarmasAndroid drops confirmarAudioFlutter, forzarVolumenMediaParaAlarma and restaurarVolumenMedia, and app.dart no longer pre-starts a station before pushing the ring screen. This is the Dart half of moving to a single native ring-audio owner (WU1 of 2); the Kotlin service rebuild lands next and keeps this intermediate state shippable with no double audio.
This commit is contained in:
@@ -107,31 +107,4 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'forzarVolumenMediaParaAlarma invoca overrideMediaVolumeForRing con fraction',
|
||||
() async {
|
||||
final servicio = ServicioAlarmasAndroid(channel: channel);
|
||||
|
||||
await servicio.forzarVolumenMediaParaAlarma(1.0);
|
||||
|
||||
final llamada = llamadas.singleWhere(
|
||||
(c) => c.method == 'overrideMediaVolumeForRing',
|
||||
);
|
||||
expect(llamada.arguments, {'fraction': 1.0});
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'restaurarVolumenMedia invoca restoreMediaVolume sin argumentos',
|
||||
() async {
|
||||
final servicio = ServicioAlarmasAndroid(channel: channel);
|
||||
|
||||
await servicio.restaurarVolumenMedia();
|
||||
|
||||
final llamada = llamadas.singleWhere(
|
||||
(c) => c.method == 'restoreMediaVolume',
|
||||
);
|
||||
expect(llamada.arguments, <String, Object?>{});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user