diff --git a/lib/services/analysis_service.dart b/lib/services/analysis_service.dart index 3118e2b44..22389e6dd 100644 --- a/lib/services/analysis_service.dart +++ b/lib/services/analysis_service.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:ui'; import 'package:aves/l10n/l10n.dart'; +import 'package:aves/model/device.dart'; import 'package:aves/model/settings/settings.dart'; import 'package:aves/model/source/analysis_controller.dart'; import 'package:aves/model/source/enums/enums.dart'; @@ -47,6 +48,7 @@ Future _init() async { initPlatformServices(); await androidFileUtils.init(); await metadataDb.init(); + await device.init(); await mobileServices.init(); await settings.init(monitorPlatformSettings: false); FijkLog.setLevel(FijkLogLevel.Warn); diff --git a/plugins/aves_report_console/lib/aves_report_platform.dart b/plugins/aves_report_console/lib/aves_report_platform.dart index 3f1237d65..8cc4f1f81 100644 --- a/plugins/aves_report_console/lib/aves_report_platform.dart +++ b/plugins/aves_report_console/lib/aves_report_platform.dart @@ -11,7 +11,7 @@ class PlatformReportService extends ReportService { Future log(String message) async => debugPrint('Report log with message=$message'); @override - Future recordError(exception, StackTrace? stack) async => debugPrint('Report error with exception=$exception, stack=$stack'); + Future recordError(dynamic exception, StackTrace? stack) async => debugPrint('Report error with exception=$exception, stack=$stack'); @override Future recordFlutterError(FlutterErrorDetails flutterErrorDetails) async => debugPrint('Report Flutter error with details=$flutterErrorDetails'); diff --git a/test/fake/report_service.dart b/test/fake/report_service.dart index bead6f09b..898c9462c 100644 --- a/test/fake/report_service.dart +++ b/test/fake/report_service.dart @@ -21,7 +21,7 @@ class FakeReportService extends ReportService { Future setCustomKeys(Map map) => SynchronousFuture(null); @override - Future recordError(exception, StackTrace? stack) => SynchronousFuture(null); + Future recordError(dynamic exception, StackTrace? stack) => SynchronousFuture(null); @override Future recordFlutterError(FlutterErrorDetails flutterErrorDetails) => SynchronousFuture(null);