From c4e9e47a4f5a65e69706916b95a2cc6d6f546d41 Mon Sep 17 00:00:00 2001 From: JP Date: Sat, 30 May 2026 23:38:24 -0700 Subject: [PATCH] CI: reduce log noise, fix deprecations, and optimize emulator --- .github/workflows/android.yml | 1 + app/src/main/cpp/CMakeLists.txt | 11 +++++++++-- .../jpcottin/simpletorrent/ui/player/PlayerScreen.kt | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index da5d4dd..60b45cb 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -148,6 +148,7 @@ jobs: arch: x86_64 target: google_apis profile: pixel_6 + emulator-options: -no-window -no-snapshot -noaudio -no-boot-anim script: ./gradlew connectedDebugAndroidTest --no-daemon - name: Upload instrumented test results diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index 8311670..5356593 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -46,8 +46,15 @@ endif() # Clang 21 (NDK r29) triggers BOOST_ASIO_HAS_STD_ALIGNED_ALLOC auto-detection but the # Android sysroot doesn't expose std::aligned_alloc reliably; use Boost's own impl. -target_compile_options(torrent-rasterbar PRIVATE "-DBOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC") -target_compile_options(simpletorrent PRIVATE "-DBOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC") +# Also suppress C++17 deprecated redundant constexpr static member definitions. +target_compile_options(torrent-rasterbar PRIVATE + "-DBOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC" + "-Wno-deprecated-redundant-constexpr-static-def" +) +target_compile_options(simpletorrent PRIVATE + "-DBOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC" + "-Wno-deprecated-redundant-constexpr-static-def" +) target_link_libraries(simpletorrent PRIVATE diff --git a/app/src/main/java/com/jpcottin/simpletorrent/ui/player/PlayerScreen.kt b/app/src/main/java/com/jpcottin/simpletorrent/ui/player/PlayerScreen.kt index af270b9..7a8ee47 100644 --- a/app/src/main/java/com/jpcottin/simpletorrent/ui/player/PlayerScreen.kt +++ b/app/src/main/java/com/jpcottin/simpletorrent/ui/player/PlayerScreen.kt @@ -99,7 +99,7 @@ fun PlayerScreen(filePath: String, title: String, onBack: () -> Unit) { @Suppress("DEPRECATION") val format = group.getTrackFormat(j) val label = format.language?.let { lang -> - Locale(lang).displayLanguage.takeIf { it.isNotEmpty() } ?: lang + Locale.forLanguageTag(lang).displayLanguage.takeIf { it.isNotEmpty() } ?: lang } ?: format.label ?: "Track ${j + 1}" audioTrackOptions.add(AudioTrackOption(group, j, label)) }