AGP 9 compiles Kotlin itself (android.builtInKotlin=true in every app), and warns that applying the Kotlin Gradle Plugin will soon fail. flutter_web_auth_2 5.1.0, keyboard_height_plugin 0.3.0 and flutter_tts 4.2.5 still apply it unconditionally, so their pub releases are copied into third_party/ with only their android/build.gradle changed, and the root overrides them by path (third_party/README.md says when to drop each). The servers' images copy third_party/, as pub refuses an override whose path is missing. third_party/ isn't our own code: left out of the analysis and the format check. All four apps' APKs build without the warning. A Kotlin daemon's session file that slipped into Train's android/ goes, and every app's android/.gitignore keeps .kotlin/ out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
63 lines
1.5 KiB
Swift
63 lines
1.5 KiB
Swift
import AVFoundation
|
|
|
|
enum AudioModes: String {
|
|
case iosAudioModeDefault
|
|
case iosAudioModeGameChat
|
|
case iosAudioModeMeasurement
|
|
case iosAudioModeMoviePlayback
|
|
case iosAudioModeSpokenAudio
|
|
case iosAudioModeVideoChat
|
|
case iosAudioModeVideoRecording
|
|
case iosAudioModeVoiceChat
|
|
case iosAudioModeVoicePrompt
|
|
|
|
func toAVAudioSessionMode() -> AVAudioSession.Mode? {
|
|
switch self {
|
|
case .iosAudioModeDefault:
|
|
if #available(iOS 12.0, *) {
|
|
return .default
|
|
}
|
|
return nil
|
|
case .iosAudioModeGameChat:
|
|
if #available(iOS 12.0, *) {
|
|
return .gameChat
|
|
}
|
|
return nil
|
|
case .iosAudioModeMeasurement:
|
|
if #available(iOS 12.0, *) {
|
|
return .measurement
|
|
}
|
|
return nil
|
|
case .iosAudioModeMoviePlayback:
|
|
if #available(iOS 12.0, *) {
|
|
return .moviePlayback
|
|
}
|
|
return nil
|
|
case .iosAudioModeSpokenAudio:
|
|
if #available(iOS 12.0, *) {
|
|
return .spokenAudio
|
|
}
|
|
return nil
|
|
case .iosAudioModeVideoChat:
|
|
if #available(iOS 12.0, *) {
|
|
return .videoChat
|
|
}
|
|
return nil
|
|
case .iosAudioModeVideoRecording:
|
|
if #available(iOS 12.0, *) {
|
|
return .videoRecording
|
|
}
|
|
return nil
|
|
case .iosAudioModeVoiceChat:
|
|
if #available(iOS 12.0, *) {
|
|
return .voiceChat
|
|
}
|
|
return nil
|
|
case .iosAudioModeVoicePrompt:
|
|
if #available(iOS 12.0, *) {
|
|
return .voicePrompt
|
|
}
|
|
return nil
|
|
}
|
|
}
|
|
}
|