π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Revert "[mob][photos] Fix: audio not playing on iOS when in silent mode"
ashilknb6a1a77bf728
diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lockindex d76dd0c63d..c7c387c2f1 100644--- a/mobile/ios/Podfile.lock+++ b/mobile/ios/Podfile.lock@@ -35,7 +35,7 @@ PODS:- FirebaseCore (11.8.1):- FirebaseCoreInternal (~> 11.8.0)- GoogleUtilities/Environment (~> 8.0)- - GoogleUtilities/Logger (~> 8.0)+ - GoogleUtilities/Logger (~> 8.0- FirebaseCoreInternal (11.8.0):- "GoogleUtilities/NSData+zlib (~> 8.0)"- FirebaseInstallations (11.8.0):diff --git a/mobile/ios/Runner/AppDelegate.swift b/mobile/ios/Runner/AppDelegate.swiftindex 728fbf48f9..911716e2fd 100644--- a/mobile/ios/Runner/AppDelegate.swift+++ b/mobile/ios/Runner/AppDelegate.swift@@ -3,7 +3,7 @@ import Flutterimport UIKitimport app_links-@main+@UIApplicationMain@objc class AppDelegate: FlutterAppDelegate {override func application(_ application: UIApplication,@@ -14,20 +14,6 @@ import app_linksUNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate}- let controller: FlutterViewController = window?.rootViewController as! FlutterViewController- let audioSessionChannel = FlutterMethodChannel(- name: "io.ente.frame/audio_session",- binaryMessenger: controller.binaryMessenger)-- audioSessionChannel.setMethodCallHandler({- (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in- if call.method == "setAudioSessionCategory" {- self.setAudioSessionCategory(result: result)- } else {- result(FlutterMethodNotImplemented)- }- })-GeneratedPluginRegistrant.register(with: self)// Retrieve the link from parameters@@ -40,21 +26,6 @@ import app_linksreturn super.application(application, didFinishLaunchingWithOptions: launchOptions)}- private func setAudioSessionCategory(result: @escaping FlutterResult) {- do {- try AVAudioSession.sharedInstance().setCategory(- .playback, mode: .default, options: [.mixWithOthers, .defaultToSpeaker])- try AVAudioSession.sharedInstance().setActive(true)- result(nil)- } catch {- result(- FlutterError(- code: "AUDIO_SESSION_ERROR",- message: "Failed to set audio session category",- details: error.localizedDescription))- }- }-override func applicationDidBecomeActive(_ application: UIApplication) {signal(SIGPIPE, SIG_IGN)}diff --git a/mobile/lib/audio_session_handler.dart b/mobile/lib/audio_session_handler.dartdeleted file mode 100644index 8aede31b12..0000000000--- a/mobile/lib/audio_session_handler.dart+++ /dev/null@@ -1,16 +0,0 @@-import "package:flutter/services.dart";-import "package:logging/logging.dart";--class AudioSessionHandler {- static final _logger = Logger("AudioSessionHandler");- static const MethodChannel _channel =- MethodChannel('io.ente.frame/audio_session');-- static Future<void> setAudioSessionCategory() async {- try {- await _channel.invokeMethod('setAudioSessionCategory');- } on PlatformException catch (e) {- _logger.warning("Failed to set audio session category: '${e.message}'.");- }- }-}diff --git a/mobile/lib/main.dart b/mobile/lib/main.dartindex f3db763290..04d08e9898 100644--- a/mobile/lib/main.dart+++ b/mobile/lib/main.dart@@ -16,7 +16,6 @@ import "package:media_kit/media_kit.dart";import "package:package_info_plus/package_info_plus.dart";import 'package:path_provider/path_provider.dart';import 'package:photos/app.dart';-import "package:photos/audio_session_handler.dart";import 'package:photos/core/configuration.dart';import 'package:photos/core/constants.dart';import 'package:photos/core/error-reporting/super_logging.dart';@@ -67,10 +66,6 @@ const kFGTaskDeathTimeoutInMicroseconds = 5000000;void main() async {debugRepaintRainbowEnabled = false;WidgetsFlutterBinding.ensureInitialized();- //For audio to work on vidoes in iOS when in silent mode.- if (Platform.isIOS) {- unawaited(AudioSessionHandler.setAudioSessionCategory());- }MediaKit.ensureInitialized();final savedThemeMode = await AdaptiveTheme.getThemeMode();