Revert "Queue encryption and decryption with work-manager"
This reverts commit 5000a0b3cd
.
This commit is contained in:
parent
1d2630ecb9
commit
7bd2ad19de
4 changed files with 5 additions and 16 deletions
|
@ -12,7 +12,6 @@ import 'package:photos/ui/home_widget.dart';
|
|||
import 'package:sentry/sentry.dart';
|
||||
import 'package:super_logging/super_logging.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:worker_manager/worker_manager.dart';
|
||||
|
||||
final logger = Logger("main");
|
||||
|
||||
|
@ -26,7 +25,6 @@ void main() async {
|
|||
}
|
||||
|
||||
void _main() async {
|
||||
await Executor().warmUp();
|
||||
await Configuration.instance.init();
|
||||
await PhotoSyncManager.instance.init();
|
||||
await MemoriesService.instance.init();
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:aes_crypt/aes_crypt.dart';
|
|||
import 'package:encrypt/encrypt.dart';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:worker_manager/worker_manager.dart';
|
||||
import 'package:flutter/foundation.dart' as foundation;
|
||||
|
||||
class CryptoUtil {
|
||||
static String getBase64EncodedSecureRandomString({int length = 32}) {
|
||||
|
@ -39,8 +39,7 @@ class CryptoUtil {
|
|||
args["key"] = key;
|
||||
args["source"] = sourcePath;
|
||||
args["destination"] = destinationPath;
|
||||
|
||||
return Executor().execute(arg1: args, fun1: runEncryptFileToFile);
|
||||
return foundation.compute(runEncryptFileToFile, args);
|
||||
}
|
||||
|
||||
static Future<String> encryptDataToFile(
|
||||
|
@ -49,7 +48,7 @@ class CryptoUtil {
|
|||
args["key"] = key;
|
||||
args["source"] = source;
|
||||
args["destination"] = destinationPath;
|
||||
return Executor().execute(arg1: args, fun1: runEncryptDataToFile);
|
||||
return foundation.compute(runEncryptDataToFile, args);
|
||||
}
|
||||
|
||||
static Future<void> decryptFileToFile(
|
||||
|
@ -58,14 +57,14 @@ class CryptoUtil {
|
|||
args["key"] = key;
|
||||
args["source"] = sourcePath;
|
||||
args["destination"] = destinationPath;
|
||||
return Executor().execute(arg1: args, fun1: runDecryptFileToFile);
|
||||
return foundation.compute(runDecryptFileToFile, args);
|
||||
}
|
||||
|
||||
static Future<Uint8List> decryptFileToData(String sourcePath, String key) {
|
||||
final args = Map<String, String>();
|
||||
args["key"] = key;
|
||||
args["source"] = sourcePath;
|
||||
return Executor().execute(arg1: args, fun1: runDecryptFileToData);
|
||||
return foundation.compute(runDecryptFileToData, args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -700,13 +700,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.4+2"
|
||||
worker_manager:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: worker_manager
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -58,7 +58,6 @@ dependencies:
|
|||
progress_dialog: ^1.2.4
|
||||
animate_do: ^1.7.2
|
||||
flutter_cache_manager: ^1.4.1
|
||||
worker_manager: ^3.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
Loading…
Add table
Reference in a new issue