π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
rename to ComputeController
laurenspriemd9a4ffd8f752
diff --git a/mobile/lib/app.dart b/mobile/lib/app.dartindex 3b8e3346d8..19fe79fef7 100644--- a/mobile/lib/app.dart+++ b/mobile/lib/app.dart@@ -107,7 +107,7 @@ class _EnteAppState extends State<EnteApp> with WidgetsBindingObserver {if (Platform.isAndroid || kDebugMode) {return Listener(onPointerDown: (event) {- machineLearningController.onUserInteraction();+ computeController.onUserInteraction();},child: AdaptiveTheme(light: lightThemeData,@@ -142,7 +142,7 @@ class _EnteAppState extends State<EnteApp> with WidgetsBindingObserver {} else {return Listener(onPointerDown: (event) {- machineLearningController.onUserInteraction();+ computeController.onUserInteraction();},child: MaterialApp(title: "ente",diff --git a/mobile/lib/service_locator.dart b/mobile/lib/service_locator.dartindex 84e5eb6a18..bc96877eb2 100644--- a/mobile/lib/service_locator.dart+++ b/mobile/lib/service_locator.dart@@ -9,8 +9,8 @@ import "package:photos/services/account/billing_service.dart";import "package:photos/services/entity_service.dart";import "package:photos/services/filedata/filedata_service.dart";import "package:photos/services/location_service.dart";+import "package:photos/services/machine_learning/compute_controller.dart";import "package:photos/services/machine_learning/face_ml/face_recognition_service.dart";-import "package:photos/services/machine_learning/machine_learning_controller.dart";import "package:photos/services/magic_cache_service.dart";import "package:photos/services/memories_cache_service.dart";import "package:photos/services/permission/service.dart";@@ -142,10 +142,10 @@ BillingService get billingService {return _billingService!;}-MachineLearningController? _machineLearningController;-MachineLearningController get machineLearningController {- _machineLearningController ??= MachineLearningController();- return _machineLearningController!;+ComputeController? _computeController;+ComputeController get computeController {+ _computeController ??= ComputeController();+ return _computeController!;}FaceRecognitionService? _faceRecognitionService;diff --git a/mobile/lib/services/machine_learning/machine_learning_controller.dart b/mobile/lib/services/machine_learning/compute_controller.dartsimilarity index 98%rename from mobile/lib/services/machine_learning/machine_learning_controller.dartrename to mobile/lib/services/machine_learning/compute_controller.dartindex 7850c02e1c..2368f11579 100644--- a/mobile/lib/services/machine_learning/machine_learning_controller.dart+++ b/mobile/lib/services/machine_learning/compute_controller.dart@@ -10,7 +10,7 @@ import "package:photos/core/event_bus.dart";import "package:photos/events/machine_learning_control_event.dart";import "package:thermal/thermal.dart";-class MachineLearningController {+class ComputeController {final _logger = Logger("MachineLearningController");static const kMaximumTemperatureAndroid = 42; // 42 degree celsius@@ -31,7 +31,7 @@ class MachineLearningController {bool get isDeviceHealthy => _isDeviceHealthy;- MachineLearningController() {+ ComputeController() {_logger.info('MachineLearningController constructor');_startInteractionTimer(kDefaultInteractionTimeout);if (Platform.isIOS) {diff --git a/mobile/lib/ui/settings/ml/machine_learning_settings_page.dart b/mobile/lib/ui/settings/ml/machine_learning_settings_page.dartindex 5db7a028ac..82c81e3967 100644--- a/mobile/lib/ui/settings/ml/machine_learning_settings_page.dart+++ b/mobile/lib/ui/settings/ml/machine_learning_settings_page.dart@@ -54,7 +54,7 @@ class _MachineLearningSettingsPageStateenable: true,wakeLockFor: WakeLockFor.machineLearningSettingsScreen,);- machineLearningController.forceOverrideML(turnOn: true);+ computeController.forceOverrideML(turnOn: true);if (!MLIndexingIsolate.instance.areModelsDownloaded) {_timer = Timer.periodic(const Duration(seconds: 10), (timer) {if (mounted) {@@ -74,7 +74,7 @@ class _MachineLearningSettingsPageStateenable: false,wakeLockFor: WakeLockFor.machineLearningSettingsScreen,);- machineLearningController.forceOverrideML(turnOn: false);+ computeController.forceOverrideML(turnOn: false);_timer?.cancel();_advancedOptionsTimer?.cancel();}@@ -429,13 +429,13 @@ class MLStatusWidget extends StatefulWidget {class MLStatusWidgetState extends State<MLStatusWidget> {Timer? _timer;- bool _isDeviceHealthy = machineLearningController.isDeviceHealthy;+ bool _isDeviceHealthy = computeController.isDeviceHealthy;@overridevoid initState() {super.initState();_timer = Timer.periodic(const Duration(seconds: 10), (timer) {MLService.instance.triggerML();- _isDeviceHealthy = machineLearningController.isDeviceHealthy;+ _isDeviceHealthy = computeController.isDeviceHealthy;setState(() {});});}