fix: alinear permisos, paywall y grabacion con lo que la app hace de verdad
Revision previa al envio a produccion. Cada punto se verifico en el codigo antes de tocarlo; lo que ya estaba bien se dejo como estaba. Ubicacion: se declaraba precision fina sin usarla El unico consumidor de ubicacion pide `LocationAccuracy.low` y se queda solo con el codigo ISO del pais, asi que `ACCESS_FINE_LOCATION` no aportaba nada. Y contradecia la declaracion de Seguridad de los datos ya aprobada en Play, que dice ubicacion APROXIMADA: declarar una cosa y pedir otra es precisamente lo que se penaliza en revision. Verificado que los manifiestos de geolocator_android y geocoding_android no declaran permisos propios, asi que el merge no lo reinyecta y no hace falta `tools:node="remove"`. El plugin construye su peticion en tiempo de ejecucion a partir de lo declarado, de modo que con COARSE pide COARSE. Sin cambio funcional: la deteccion de pais sigue igual. El paywall vendia Android Auto como exclusivo, y ya no lo es La etiqueta era literalmente "Android Auto", a secas. Pero el tier gratuito recibio una carpeta navegable con emisoras reproducibles cuando hubo que cumplir las guias del coche, asi que esa frase dejo de ser cierta. Ahora dice que PRO añade el catalogo completo, favoritos, mis emisoras y musica local, y aclara que gratis tiene las destacadas. Un paywall que promete lo que el tier gratuito ya tiene expone a reclamacion y a que se cite en revision. Microfono: se pide al activar el visualizador, no antes Con una explicacion previa en los 13 idiomas, en vez de aparecer sin contexto. Grabacion: uso privado de verdad, no solo en el aviso La pantalla de grabaciones entregaba el fichero a cualquier aplicacion con `Share.shareXFiles`. La intencion era abrirlo en un reproductor del propio telefono, no redistribuirlo, y una cosa es copia privada y la otra no. Ahora usa el `openFile` que ya existia -- FileProvider + ACTION_VIEW -- y avisa cuando ningun reproductor del dispositivo puede abrirla, en vez de fallar en silencio. Se añade ademas el aviso de uso privado en esa pantalla. `recordingActionShare` la usaban DOS botones con significados distintos: el de grabaciones, que mandaba el audio, y el del reproductor, que comparte el nombre y la url de la emisora. Una clave, dos sentidos, y esa ambiguedad basto para que al leer el codigo pareciera que solo se compartian enlaces. Separadas en `stationActionShare` y `recordingActionOpenIn`. La grabacion sigue siendo PRO. Lo que reduce el riesgo es que la copia no salga del dispositivo, no regalar la funcion: los anuncios tambien son monetizacion. Suite completa: 1587 pasan, 2 omitidos. flutter analyze mantiene los 5 avisos preexistentes.
This commit is contained in:
@@ -15,16 +15,16 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
/// WU15: the recordings library screen — storage usage, browsable rows
|
||||
/// (name/date/duration/size) with inline playback, and a "⋮" menu
|
||||
/// constrained to exactly Rename/Share/Delete.
|
||||
/// constrained to exactly Rename/Open-in-another-app/Delete.
|
||||
///
|
||||
/// [ReproductorGrabaciones] is always injected with a fake here:
|
||||
/// constructing a real `just_audio.AudioPlayer` needs platform
|
||||
/// `MethodChannel`s this suite does not mock — the same documented
|
||||
/// constraint `cola_local_test.dart` records for `PluriWaveAudioHandler`.
|
||||
/// Likewise, `compartir` is always injected with a fake recorder instead of
|
||||
/// the real `share_plus` call, since this suite does not mock that channel
|
||||
/// either (see `pantalla_ajustes_backup_test.dart`'s note on the same
|
||||
/// constraint).
|
||||
/// Likewise, `abrirEnOtraApp` is always injected with a fake recorder
|
||||
/// instead of the real `pluriwave/file_actions` round trip, since this suite
|
||||
/// does not mock that channel either (see `pantalla_ajustes_backup_test.dart`
|
||||
/// for the same constraint).
|
||||
///
|
||||
/// Pre-existing project constraint (see `pantalla_ajustes_test.dart`):
|
||||
/// PluriGlassSurface paints a background over ListTile's ink layer, which
|
||||
@@ -72,7 +72,7 @@ void main() {
|
||||
Widget buildScreen({
|
||||
required EstadoGrabacion estado,
|
||||
required ReproductorGrabaciones reproductor,
|
||||
Future<void> Function(String ruta)? compartir,
|
||||
Future<bool> Function(String ruta)? abrirEnOtraApp,
|
||||
}) {
|
||||
return ListenableProvider<EstadoGrabacion>.value(
|
||||
value: estado,
|
||||
@@ -82,7 +82,7 @@ void main() {
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
home: PantallaGrabaciones(
|
||||
reproductor: reproductor,
|
||||
compartir: compartir ?? (_) async {},
|
||||
abrirEnOtraApp: abrirEnOtraApp ?? (_) async => true,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -117,6 +117,66 @@ void main() {
|
||||
expect(find.text('My recordings'), findsOneWidget);
|
||||
});
|
||||
|
||||
group('aviso de uso privado', () {
|
||||
/// Recording a broadcast is defensible as a private copy, and stops
|
||||
/// being defensible the moment the product reads as a redistribution
|
||||
/// tool. The library screen had no such statement at all, while the
|
||||
/// manifest already exposes the recordings folder to the system file
|
||||
/// manager, so the notice states the intended use in plain words.
|
||||
testWidgets(
|
||||
'la biblioteca muestra el aviso de uso personal con la lista vacia',
|
||||
(tester) async {
|
||||
final estado = EstadoGrabacion(
|
||||
esPremium: () => true,
|
||||
servicio: _FakeServicioGrabacionConArchivos(
|
||||
const [],
|
||||
maxBytesFijo: 200 * 1024 * 1024,
|
||||
),
|
||||
);
|
||||
addTearDown(estado.dispose);
|
||||
|
||||
await tester.pumpWidget(
|
||||
buildScreen(
|
||||
estado: estado,
|
||||
reproductor: _ReproductorGrabacionesFake(const {}),
|
||||
),
|
||||
);
|
||||
await pumpStable(tester);
|
||||
|
||||
final l10n = AppLocalizations.of(
|
||||
tester.element(find.byType(PantallaGrabaciones)),
|
||||
);
|
||||
expect(find.text(l10n.recordingsPrivateUseNotice), findsOneWidget);
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('el aviso sigue presente con grabaciones en la lista', (
|
||||
tester,
|
||||
) async {
|
||||
final estado = EstadoGrabacion(
|
||||
esPremium: () => true,
|
||||
servicio: _FakeServicioGrabacionConArchivos([
|
||||
fijaA,
|
||||
fijaB,
|
||||
], maxBytesFijo: 200 * 1024 * 1024),
|
||||
);
|
||||
addTearDown(estado.dispose);
|
||||
|
||||
await tester.pumpWidget(
|
||||
buildScreen(
|
||||
estado: estado,
|
||||
reproductor: _ReproductorGrabacionesFake(const {}),
|
||||
),
|
||||
);
|
||||
await pumpStable(tester);
|
||||
|
||||
final l10n = AppLocalizations.of(
|
||||
tester.element(find.byType(PantallaGrabaciones)),
|
||||
);
|
||||
expect(find.text(l10n.recordingsPrivateUseNotice), findsOneWidget);
|
||||
});
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'WU15b: tapping the settings icon pushes the folder/size settings '
|
||||
'screen (PantallaAjustesGrabaciones stays reachable, now from within '
|
||||
@@ -379,9 +439,12 @@ void main() {
|
||||
expect(find.byIcon(Icons.pause_circle_filled_rounded), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('15.3: the "⋮" menu exposes exactly Rename, Share, Delete', (
|
||||
tester,
|
||||
) async {
|
||||
// The middle entry used to be Share, which handed the audio file to the
|
||||
// system share sheet. It is now a LOCAL open: play your own recording in
|
||||
// another app on the same device. The exact-count assertion is the guard
|
||||
// that no off-device action creeps back in beside it.
|
||||
testWidgets('15.3: the "⋮" menu exposes exactly Rename, Open in another '
|
||||
'app, Delete', (tester) async {
|
||||
final estado = EstadoGrabacion(
|
||||
esPremium: () => true,
|
||||
servicio: _FakeServicioGrabacionConArchivos([
|
||||
@@ -405,7 +468,10 @@ void main() {
|
||||
find.widgetWithText(PopupMenuItem<String>, 'Rename'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.widgetWithText(PopupMenuItem<String>, 'Share'), findsOneWidget);
|
||||
expect(
|
||||
find.widgetWithText(PopupMenuItem<String>, 'Open in another app'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
find.widgetWithText(PopupMenuItem<String>, 'Delete'),
|
||||
findsOneWidget,
|
||||
@@ -555,10 +621,15 @@ void main() {
|
||||
skip: true,
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
'15.4-C: Share invokes the injected share callback with the file path',
|
||||
(tester) async {
|
||||
final compartidos = <String>[];
|
||||
/// The row menu used to hand the audio file to the system share sheet,
|
||||
/// which is redistribution of someone else's broadcast. What the owner
|
||||
/// actually wanted is to play your own recording in another app on the
|
||||
/// same device, so the action is a local ACTION_VIEW instead.
|
||||
group('15.4-C: abrir la grabacion en otra app del dispositivo', () {
|
||||
testWidgets('invoca el seam de apertura local con la ruta del archivo', (
|
||||
tester,
|
||||
) async {
|
||||
final abiertos = <String>[];
|
||||
final estado = EstadoGrabacion(
|
||||
esPremium: () => true,
|
||||
servicio: _FakeServicioGrabacionConArchivos([
|
||||
@@ -571,21 +642,68 @@ void main() {
|
||||
buildScreen(
|
||||
estado: estado,
|
||||
reproductor: _ReproductorGrabacionesFake(const {}),
|
||||
compartir: (ruta) async {
|
||||
compartidos.add(ruta);
|
||||
abrirEnOtraApp: (ruta) async {
|
||||
abiertos.add(ruta);
|
||||
return true;
|
||||
},
|
||||
),
|
||||
);
|
||||
await pumpStable(tester);
|
||||
|
||||
final l10n = AppLocalizations.of(
|
||||
tester.element(find.byType(PantallaGrabaciones)),
|
||||
);
|
||||
await tester.tap(find.byIcon(Icons.more_vert_rounded));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.widgetWithText(PopupMenuItem<String>, 'Share'));
|
||||
await tester.tap(
|
||||
find.widgetWithText(PopupMenuItem<String>, l10n.recordingActionOpenIn),
|
||||
);
|
||||
await pumpStable(tester);
|
||||
|
||||
expect(compartidos, [fijaA.ruta]);
|
||||
},
|
||||
);
|
||||
expect(abiertos, [fijaA.ruta]);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'si ningun reproductor del dispositivo puede abrirla, lo dice en vez '
|
||||
'de fallar en silencio',
|
||||
(tester) async {
|
||||
final estado = EstadoGrabacion(
|
||||
esPremium: () => true,
|
||||
servicio: _FakeServicioGrabacionConArchivos([
|
||||
fijaA,
|
||||
], maxBytesFijo: 200 * 1024 * 1024),
|
||||
);
|
||||
addTearDown(estado.dispose);
|
||||
|
||||
await tester.pumpWidget(
|
||||
buildScreen(
|
||||
estado: estado,
|
||||
reproductor: _ReproductorGrabacionesFake(const {}),
|
||||
abrirEnOtraApp: (_) async => false,
|
||||
),
|
||||
);
|
||||
await pumpStable(tester);
|
||||
|
||||
final l10n = AppLocalizations.of(
|
||||
tester.element(find.byType(PantallaGrabaciones)),
|
||||
);
|
||||
await tester.tap(find.byIcon(Icons.more_vert_rounded));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(
|
||||
find.widgetWithText(
|
||||
PopupMenuItem<String>,
|
||||
l10n.recordingActionOpenIn,
|
||||
),
|
||||
);
|
||||
await pumpStable(tester);
|
||||
|
||||
expect(
|
||||
find.widgetWithText(SnackBar, l10n.recordingOpenNoAppError),
|
||||
findsOneWidget,
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// ── Infrastructure ──────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user