diff options
| author | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
| commit | ff7acf898b48359275a5b09b82ed926a945233f8 (patch) | |
| tree | 5e45b04be22cb1531f075ec35eb6f91518e09165 /app/src/debug/res/layout/mirror.xml | |
| parent | bddc306de0cebde44f99b3a9c4ddba130946bef3 (diff) | |
| download | scrcpy-android-ff7acf898b48359275a5b09b82ed926a945233f8.tar.gz | |
app: fix session lifecycle, teardown, and opus playback
Opus playback never worked: feed() called dequeueInputBuffer() on a
codec in async-callback mode, which always throws, so every packet
was silently dropped. Feed input through the async callback with a
bounded pending queue instead.
Make bring-up transactional: roll back partially opened streams and
the server shell on failure, join reader threads on stop, and close
the owning ADB streams before releasing sinks. Replace the
openAbstract watchdog thread with a real timeout in the vendored
AdbConnection.open(), which also removes the half-open stream from
the lookup table on failure.
Harden the activity: release owned Surfaces, gate callbacks on a
destroyed flag and a session generation, serialize reconnect, and
handle target replacement via singleTask + onNewIntent. Propagate
device-list write failures instead of swallowing them, bound the
clipboard payload and the video pending queue against hostile
peers, and discard incomplete recordings instead of keeping corrupt
files.
Use the mediaPlayback foreground-service type; Android 15 stops
dataSync services after six hours. Drop the unused
ACCESS_NETWORK_STATE permission.
Diffstat (limited to 'app/src/debug/res/layout/mirror.xml')
0 files changed, 0 insertions, 0 deletions