From 453382b728f19faae06a44d87c06ccdb2b1ade7e Mon Sep 17 00:00:00 2001 From: FaizHashmi Date: Mon, 5 Oct 2026 11:13:58 +0300 Subject: [PATCH] Refactoring --- android/gradle.properties | 4 ++++ lib/main.dart | 6 +++++- lib/services/remote_config_service.dart | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index f47e3b3a..5e4be6c5 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -8,3 +8,7 @@ org.gradle.parallel=true org.gradle.configureondemand=true android.useAndroidX=true android.enableImpeller=false +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false +# This newDsl flag was added automatically by Flutter migrator +android.newDsl=false diff --git a/lib/main.dart b/lib/main.dart index ed2074c0..29d1647d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -143,7 +143,11 @@ Future callInitializations() async { // Initialize Security Service early to catch threats before app logic runs if (kReleaseMode) { - await getIt.get().initialize(); + try { + await getIt.get().initialize(); + } catch (e) { + getIt.get().logError('SecurityService.initialize failed, continuing app startup: $e'); + } } // Set up critical threat callback to navigate to unsafe device page diff --git a/lib/services/remote_config_service.dart b/lib/services/remote_config_service.dart index 568bd4e6..d16d9a68 100644 --- a/lib/services/remote_config_service.dart +++ b/lib/services/remote_config_service.dart @@ -41,7 +41,9 @@ class RemoteConfigServiceImp implements RemoteConfigService { fetchTimeout: const Duration(seconds: 10), // In debug builds, always fetch fresh values so you can test // Remote Config changes instantly without waiting/throttling. - // Release builds keep a sane 1-hour minimum interval. + // Release/profile builds keep a 1-hour minimum interval — + // balances timely occasion-theme rollout against not hammering + // Remote Config across the whole user base. minimumFetchInterval: kDebugMode ? Duration.zero : const Duration(hours: 1), ), );