refactor(alarm): make the ringing screen pure UI over a reduced native port
Build & Deploy PluriWave / Análisis de código (push) Successful in 36s
Build & Deploy PluriWave / Build APK + AAB release (push) Successful in 2m40s

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:
2026-07-12 11:36:31 +02:00
parent 836fb44adb
commit bd7f883118
8 changed files with 73 additions and 635 deletions
@@ -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?>{});
},
);
}