π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] add device trash service to fetch trashed files on Android
Priyanshu Dangare71800cb557eb
diff --git a/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/flutter/DeviceHealthChannelAdapter.kt b/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/flutter/DeviceHealthChannelAdapter.ktindex 87c70b433a..8dc7f2cb09 100644--- a/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/flutter/DeviceHealthChannelAdapter.kt+++ b/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/flutter/DeviceHealthChannelAdapter.kt@@ -12,31 +12,31 @@ import io.flutter.plugin.common.EventChannelimport io.flutter.plugin.common.MethodCallimport io.flutter.plugin.common.MethodChannel-internal class DeviceHealthChannelAdapter :- MethodChannel.MethodCallHandler,- EventChannel.StreamHandler {- private lateinit var methodChannel: MethodChannel+internal class DeviceHealthChannelAdapter : EventChannel.StreamHandler {private lateinit var eventChannel: EventChannelprivate lateinit var service: DeviceHealthServiceprivate var eventSink: EventChannel.EventSink? = nullfun attach(binding: FlutterPlugin.FlutterPluginBinding) {service = DeviceHealthService(binding.applicationContext)- methodChannel = MethodChannel(binding.binaryMessenger, METHOD_CHANNEL)eventChannel = EventChannel(binding.binaryMessenger, EVENT_CHANNEL)- methodChannel.setMethodCallHandler(this)eventChannel.setStreamHandler(this)}- override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {+ fun handleMethodCall(call: MethodCall, result: MethodChannel.Result): Boolean =when (call.method) {- "deviceHealth.getSnapshot" -> result.success(service.snapshot().toChannelMap())- "deviceHealth.getMemorySnapshot" ->+ "deviceHealth.getSnapshot" -> {+ result.success(service.snapshot().toChannelMap())+ true+ }++ "deviceHealth.getMemorySnapshot" -> {result.success(service.memorySnapshot().toMemoryChannelMap())+ true+ }- else -> result.notImplemented()+ else -> false}- }override fun onListen(arguments: Any?, events: EventChannel.EventSink) {eventSink = events@@ -53,7 +53,6 @@ internal class DeviceHealthChannelAdapter :fun detach() {eventSink = nullservice.stopObserving()- methodChannel.setMethodCallHandler(null)eventChannel.setStreamHandler(null)}@@ -128,7 +127,6 @@ internal class DeviceHealthChannelAdapter :}private companion object {- const val METHOD_CHANNEL = "io.ente.photos.platform"const val EVENT_CHANNEL = "io.ente.photos.platform/device_health_events"}}