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 | 9f832c148fdd3d9d3e4673e89d2d052c2bcd1efa (patch) | |
| tree | 8f407b3891ccd1d8e0eba1b97340fa2a4143c270 | |
| parent | f3221601bb9160de7909baa0b673f79c02a432d9 (diff) | |
| download | scrcpy-android-9f832c148fdd3d9d3e4673e89d2d052c2bcd1efa.tar.gz | |
treewide: correct stale comments
- MuxRecorder claimed minSdk 35; it is 31.
- Adb claimed API 34 is the current Android max, next to
compileSdk 35.
- Server claimed the openAbstract budget is wall-clock bounded below
the e2e deadline; the deadline is per stream, so the worst case is
not. Describe what actually holds instead.
- Pixhash contradicted itself about java.desktop availability.
| -rw-r--r-- | app/src/main/java/invalid/lena/scrcpy/Adb.java | 6 | ||||
| -rw-r--r-- | app/src/main/java/invalid/lena/scrcpy/MuxRecorder.java | 2 | ||||
| -rw-r--r-- | app/src/main/java/invalid/lena/scrcpy/Server.java | 9 | ||||
| -rw-r--r-- | test-rig/Pixhash.java | 6 |
4 files changed, 11 insertions, 12 deletions
diff --git a/app/src/main/java/invalid/lena/scrcpy/Adb.java b/app/src/main/java/invalid/lena/scrcpy/Adb.java index 2909156..8e04327 100644 --- a/app/src/main/java/invalid/lena/scrcpy/Adb.java +++ b/app/src/main/java/invalid/lena/scrcpy/Adb.java @@ -59,9 +59,9 @@ public final class Adb extends AbsAdbConnectionManager { // libadb-android's mApi is documented as "the target's API for protocol // negotiation". We don't know the target's API at construction time; - // pinning to the current Android max means the protocol stays at its - // latest version, which is what wireless-debugging Android-11+ targets - // expect. Bump when newer protocol versions ship. + // pinning a recent release (API 34) keeps the protocol at the newest + // version wireless-debugging Android-11+ targets expect. Bump when a + // newer protocol version ships. private static final int TARGET_API_HINT = android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE; // Singleton: Main and Mirror both want an Adb; building two would diff --git a/app/src/main/java/invalid/lena/scrcpy/MuxRecorder.java b/app/src/main/java/invalid/lena/scrcpy/MuxRecorder.java index d06551e..b8d4aaf 100644 --- a/app/src/main/java/invalid/lena/scrcpy/MuxRecorder.java +++ b/app/src/main/java/invalid/lena/scrcpy/MuxRecorder.java @@ -11,7 +11,7 @@ import java.nio.ByteBuffer; // MP4 muxer that taps the H.264/H.265/AV1 elementary stream coming // straight from the scrcpy server - no re-encode, the bytes go onto // disk verbatim. AV1 muxing into MP4 needs Android 11+ (MediaMuxer -// learned the codec there); we are minSdk 35 so that's fine. +// learned the codec there); we are minSdk 31 so that's fine. // // State machine: IDLE → (arm) → ARMED → (next keyframe) → RECORDING // → (stop) → IDLE diff --git a/app/src/main/java/invalid/lena/scrcpy/Server.java b/app/src/main/java/invalid/lena/scrcpy/Server.java index cc16b44..6ae752f 100644 --- a/app/src/main/java/invalid/lena/scrcpy/Server.java +++ b/app/src/main/java/invalid/lena/scrcpy/Server.java @@ -40,11 +40,10 @@ public final class Server { private static final int FILE_MODE = 0100644; // regular file, 0644 // Server forks a CleanUp helper before opening its abstract sockets; // on slow emulators that takes several seconds, so the budget needs - // to be generous. Wall-clock bounded: even if every attempt wedges - // for the full OPEN_ATTEMPT_TIMEOUT_MS, the total stays near - // OPEN_DEADLINE_MS - strictly below the e2e test deadline - // (test-rig/e2e.sh's E2E_DEADLINE, default 60 s), or the test - // would fail the wrong way. + // to be generous. The deadline is per stream: in practice only the + // first open waits (the server is still starting) and the other two + // dial instantly, so a healthy bring-up stays well below the e2e + // test deadline (test-rig/e2e.sh's E2E_DEADLINE, default 60 s). private static final long OPEN_DEADLINE_MS = 20_000; private static final int OPEN_BACKOFF_MS = 100; // Per-attempt timeout for adb.openAbstract. libadb-android's diff --git a/test-rig/Pixhash.java b/test-rig/Pixhash.java index 47ab8b8..b35a560 100644 --- a/test-rig/Pixhash.java +++ b/test-rig/Pixhash.java @@ -5,9 +5,9 @@ // java test-rig/Pixhash.java <png> # default min=5% // java test-rig/Pixhash.java <png> --min 1 // -// We avoid AWT's BufferedImage because some headless JDKs ship without -// it; ImageIO is in java.desktop which IS present in the openjdk-17-jdk -// package in our image, so it's fine. +// ImageIO/BufferedImage live in java.desktop, which the image's +// openjdk-17-jdk-headless package does ship (headless only disables +// display/input, not imaging) - no extra dependency needed. import java.io.File; import java.io.IOException; |