|
@@ -3,6 +3,7 @@ import "dart:io";
|
|
|
|
|
|
import "package:battery_info/battery_info_plugin.dart";
|
|
|
import "package:battery_info/model/android_battery_info.dart";
|
|
|
+import "package:flutter/foundation.dart" show kDebugMode;
|
|
|
import "package:logging/logging.dart";
|
|
|
import "package:photos/core/event_bus.dart";
|
|
|
import "package:photos/events/machine_learning_control_event.dart";
|
|
@@ -17,7 +18,8 @@ class MachineLearningController {
|
|
|
|
|
|
static const kMaximumTemperature = 42; // 42 degree celsius
|
|
|
static const kMinimumBatteryLevel = 20; // 20%
|
|
|
- static const kDefaultInteractionTimeout = Duration(seconds: 15);
|
|
|
+ static const kDefaultInteractionTimeout =
|
|
|
+ kDebugMode ? Duration(seconds: 1) : Duration(seconds: 5);
|
|
|
static const kUnhealthyStates = ["over_heat", "over_voltage", "dead"];
|
|
|
|
|
|
bool _isDeviceHealthy = true;
|