π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fixes
Prateek Sunal28a84125bf29
diff --git a/mobile/apps/photos/lib/main.dart b/mobile/apps/photos/lib/main.dartindex c9108ac6a8..8a2e560894 100644--- a/mobile/apps/photos/lib/main.dart+++ b/mobile/apps/photos/lib/main.dart@@ -137,7 +137,7 @@ Future<void> runBackgroundTask(// Check if foreground is recently active to avoid conflictsfinal isRunningInFG = await _isRunningInForeground();- // If FG was active recently, skip BG work+ // If FG was active in last 30 seconds, skip BG workif (isRunningInFG) {_logger.info("[BG TASK] Foreground recently active, skipping background work",diff --git a/mobile/apps/photos/lib/utils/image_ml_util.dart b/mobile/apps/photos/lib/utils/image_ml_util.dartindex 387cc80e38..519593b41a 100644--- a/mobile/apps/photos/lib/utils/image_ml_util.dart+++ b/mobile/apps/photos/lib/utils/image_ml_util.dart@@ -7,7 +7,6 @@ import "dart:ui";import "package:exif_reader/exif_reader.dart";import 'package:flutter/painting.dart' as paint show decodeImageFromList;import "package:flutter_image_compress/flutter_image_compress.dart";-import 'package:image/image.dart' as img_pkg;import "package:logging/logging.dart";import 'package:ml_linalg/linalg.dart';import "package:photos/models/ml/face/box.dart";@@ -54,46 +53,7 @@ Future<DecodedImage> decodeImageFromPath(String imagePath, {required bool includeRgbaBytes,required bool includeDartUiImage,- bool inBackground = false,}) async {- if (inBackground) {- if (includeDartUiImage) {- _logger.severe(- "Decoding image in background with Dart UI Image is not possible!",- );- throw Exception(- "Decoding image in background with Dart UI Image is not possible!",- );- }- if (!includeRgbaBytes) {- _logger.severe(- "Decoding image in background but not returning anything",- );- throw Exception(- "Decoding image in background but not returning anything",- );- }- final image = await img_pkg.decodeImageFile(imagePath);- final imageData = image?.data;- if (imageData == null) {- _logger.severe(- "Failed to decode image from file: $imagePath using image package",- );- throw Exception(- "Failed to decode image from file: $imagePath using image package",- );- }-- final bytes = imageData.getBytes(order: img_pkg.ChannelOrder.rgba);- final dimensions = Dimensions(- width: image!.width,- height: image.height,- );- return DecodedImage(- dimensions: dimensions,- rawRgbaBytes: bytes,- );- }final imageData = await File(imagePath).readAsBytes();final format = imagePath.split('.').last.toLowerCase();final bool skipExifRead = Platform.isIOS &&diff --git a/mobile/apps/photos/lib/utils/isolate/super_isolate.dart b/mobile/apps/photos/lib/utils/isolate/super_isolate.dartindex 2534133eb8..e4c476bb77 100644--- a/mobile/apps/photos/lib/utils/isolate/super_isolate.dart+++ b/mobile/apps/photos/lib/utils/isolate/super_isolate.dart@@ -128,8 +128,6 @@ abstract class SuperIsolate {final taskID = newIsolateTaskID(operation.name);_mainSendPort.send([taskID, operation.index, args, answerPort.sendPort]);- logger.info("Activity ${operation.name} started");-answerPort.listen((receivedMessage) {if (receivedMessage['taskID'] != taskID) {logger.severe("Received isolate message with wrong taskID");@@ -146,10 +144,8 @@ abstract class SuperIsolate {final exception = Exception(errorMessage);final stackTrace = StackTrace.fromString(errorStackTrace);completer.completeError(exception, stackTrace);- logger.severe("Activity ${operation.name} failed");} else {completer.complete(data);- logger.info("Activity ${operation.name} completed");}_activeTasks--;});diff --git a/mobile/apps/photos/lib/utils/ml_util.dart b/mobile/apps/photos/lib/utils/ml_util.dartindex 0745f9ac4e..7ae705f744 100644--- a/mobile/apps/photos/lib/utils/ml_util.dart+++ b/mobile/apps/photos/lib/utils/ml_util.dart@@ -9,7 +9,6 @@ import "package:photos/db/files_db.dart";import "package:photos/db/ml/db.dart";import "package:photos/db/ml/filedata.dart";import "package:photos/db/offline_files_db.dart";-import "package:photos/main.dart";import "package:photos/models/file/extensions/file_props.dart";import "package:photos/models/file/file.dart";import "package:photos/models/file/file_type.dart";@@ -543,7 +542,6 @@ Future<MLResult> analyzeImageStatic(Map args) async {imagePath,includeRgbaBytes: true,includeDartUiImage: false,- inBackground: isProcessBg,);final rawRgbaBytes = decodedImage.rawRgbaBytes!;final imageDimensions = decodedImage.dimensions;