scrcpy/server
Anric 39d51ff2cc Use DisplayWindowListener for Android 14
On Android 14, DisplayListener may be broken (it never sends events).
This is fixed in recent Android 14 upgrades, but we can't really detect
it directly.

As a workaround, a RotationWatcher and DisplayFoldListener were
registered as a fallback, until a first "display changed" event was
triggered.

To simplify, on Android 14, register a DisplayWindowListener (introduced
in Android 11) to listen to configuration changes instead.

Refs #5455 comment <https://github.com/Genymobile/scrcpy/pull/5455#issuecomment-2481302084>
PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>

Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2024-11-19 21:31:04 +01:00
..
scripts Use "/usr/bin/env bash" for build-wrapper.sh 2020-09-15 13:44:02 +02:00
src Use DisplayWindowListener for Android 14 2024-11-19 21:31:04 +01:00
.gitignore Convert server to an Android project 2018-01-30 12:01:36 +01:00
build.gradle Upgrade Android SDK to 35 2024-10-20 15:26:19 +02:00
build_without_gradle.sh Add on-device OpenGL video filter architecture 2024-11-19 21:31:04 +01:00
meson.build Remove deprecated meson.source_root() 2022-08-28 15:16:31 +02:00
proguard-rules.pro Convert server to an Android project 2018-01-30 12:01:36 +01:00