From 73cec1a01e1f9fecb10ef25015f479ea2fd0c720 Mon Sep 17 00:00:00 2001 From: misha Date: Mon, 25 May 2026 08:07:20 +0300 Subject: [PATCH] feat(vide_calls): gms calls handling --- android/app/proguard-rules.pro | 3 + android/app/src/main/AndroidManifest.xml | 8 + ios/Runner.xcodeproj/project.pbxproj | 6 +- ios/Runner/AppDelegate.swift | 4 + ios/Runner/Info.plist | 1 + lib/core/di/cubit_registrations.dart | 8 +- .../chat/presentation/pages/chat_screen.dart | 9 - .../managers/video_call_manager.dart | 1091 +++++++++++++++++ .../managers/video_call_manager_snapshot.dart | 59 + .../video_call_session_cubit.dart | 677 ++-------- .../video_call_session_state.dart | 10 +- .../presentation/pages/video_call_screen.dart | 11 +- ...video_call_connecting_entrance_screen.dart | 46 +- .../widgets/video_call_global_pip_layer.dart | 4 + .../video_call_livekit_track_utils.dart | 5 + .../video_call_remote_video_stage.dart | 5 +- .../widgets/video_call_stage_layout.dart | 73 ++ .../video_call_audio_session_coordinator.dart | 77 ++ .../video_call_foreground_bootstrap.dart | 35 + .../video_call_foreground_coordinator.dart | 79 ++ .../video_call_lifecycle_binding.dart | 29 + .../video_call_notification_navigator.dart | 43 + .../services/video_call_task_handler.dart | 45 + lib/generated/intl/messages_en.dart | 15 + lib/generated/intl/messages_ru.dart | 15 + lib/generated/l10n.dart | 61 + lib/l10n/intl_en.arb | 7 +- lib/l10n/intl_ru.arb | 7 +- lib/main.dart | 36 +- pubspec.yaml | 2 + ..._call_manager_audio_interruption_test.dart | 173 +++ .../video_call_manager_lifecycle_test.dart | 89 ++ .../video_call_session_cubit_test.dart | 146 +++ .../video_call_remote_video_stage_test.dart | 23 +- .../widgets/video_call_stage_layout_test.dart | 4 +- 35 files changed, 2288 insertions(+), 618 deletions(-) create mode 100644 lib/features/video_calls/managers/video_call_manager.dart create mode 100644 lib/features/video_calls/managers/video_call_manager_snapshot.dart create mode 100644 lib/features/video_calls/services/video_call_audio_session_coordinator.dart create mode 100644 lib/features/video_calls/services/video_call_foreground_bootstrap.dart create mode 100644 lib/features/video_calls/services/video_call_foreground_coordinator.dart create mode 100644 lib/features/video_calls/services/video_call_lifecycle_binding.dart create mode 100644 lib/features/video_calls/services/video_call_notification_navigator.dart create mode 100644 lib/features/video_calls/services/video_call_task_handler.dart create mode 100644 test/features/video_calls/presentation/video_call_manager_audio_interruption_test.dart create mode 100644 test/features/video_calls/presentation/video_call_manager_lifecycle_test.dart create mode 100644 test/features/video_calls/presentation/video_call_session_cubit_test.dart diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index b657fa16..b20e2682 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -4,6 +4,9 @@ -keep class org.bouncycastle.** { *; } -dontwarn org.bouncycastle.** +-keep class com.pravera.flutter_foreground_task.** { *; } +-dontwarn com.pravera.flutter_foreground_task.** + -keep class io.flutter.** { *; } -dontwarn io.flutter.** diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 116b494b..d63acff8 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -4,6 +4,9 @@ + + + @@ -77,6 +80,11 @@ +