Repository navigation
Validate unreleased changes on Android emulator and iOS simulator - #79
Merged
Merged
Conversation
The video engine mapped fitCenter to MediaPlayer's SCALE_TO_FIT, which stretches the video to the surface. On a 1080x2400 emulator a 1280x720 video filled the whole screen out of proportion. Draw fitCenter videos through a SurfaceTexture with OpenGL ES 2 inside the aspect-preserving rectangle, on a black clear. The renderer has its own thread, is created and released with the player, and waits until the wallpaper surface is free on release. centerCrop keeps the direct MediaPlayer path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
preparePending held the repository's replacement lock while it copied the source stream. The wallpaper engine takes that lock on the main thread when its surface is created, so a large or slow video source blocked the main thread, and with it the Flutter UI, until the copy finished. On the emulator a 223 MB file parked the main thread for 2-4 s and skipped 220 frames. Serialize mutations with a separate mutation lock and take the replacement lock only for recovery, temporary cleanup, and the final renames. Readers still take only the replacement lock, so the video and its scale mode are still read from one snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bounded download transport streams into a temporary file named async-wallpaper-<UUID>.download and passed that URL to Photos. Photos validates a file resource by its extension, so every save failed with PHPhotosErrorDomain 3302 on the iOS 27 simulator. A uniformTypeIdentifier option alone did not help. After ImageIO validates the download, rename it with the preferred extension of the decoded type and give Photos that file. iOS 13 uses the MobileCoreServices lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main-thread promotion must not wait for a source copy in another plugin instance. Reject contention before changing repository state. Keep pending ownership across prepare and promote so a delayed preview cannot promote another instance’s video. Preserve persisted-pending recovery for fresh repository instances.
When renderer initialization exceeded its wait, create() returned null and the engine attached MediaPlayer to the wallpaper surface that EGL might still connect to. Throw instead, so the engine takes its player failure path and never attaches a second producer. Only a renderer that failed and released the surface falls back to the stretched path. Balance each successful eglInitialize with eglTerminate during teardown, as the shader wallpaper renderer does. Found by Codex review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the Android API 36/28 emulator and iOS 27 simulator results for the unreleased changes: devices and tools, scenario results, the bug ledger (B1-B3, C1-C4), observations left for later, environment limitations, and what still cannot be verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the 3.4.0 release gate. I ran the unreleased changes (
3.3.0..08933f1, PRs #77 and #78) on an Android 16 (API 36) emulator, an Android 9 (API 28) emulator, and an iOS 27 simulator. This PR fixes the three plugin bugs I found and records the results indoc/reliability-audit-2026-10.md→ Device validation. It does not bump the version, edit the## Unreleasedheading, tag, or publish.Bugs fixed
PHPhotosErrorDomain3302. The bounded transport saves toasync-wallpaper-<UUID>.download, and Photos validates a file resource by its extension. AuniformTypeIdentifieroption alone did not help.testPhotosFileIsNamedForTheDecodedImageType,testUndecodableDownloadIsNotRenamedForPhotosfitCentervideo live wallpapers were stretched to the screen. They mapped toMediaPlayer.VIDEO_SCALING_MODE_SCALE_TO_FIT, and MediaPlayer has no letterbox mode.VideoFitRenderer: SurfaceTexture → GLES2 quad inside the fitCenter rectangle on black. Used only for fitCenter; centerCrop keeps the direct MediaPlayer path.VideoFitViewportTestpreparePendingheld the replacement lock that the engine takes on the main thread. On the emulator, a 223 MB file parked the main thread for 2–4 s and skipped 220 frames.AtomicFileReplacementTest› a slow candidate copy does not block the wallpaper engine (timed out before the fix)Codex review fixes:
553698a): promotion rejects instead of waiting when another plugin instance is mutating, and pending-candidate ownership tokens stop stale promotions. Tests:AtomicFileReplacementTest,VideoPendingOwnershipTest.704cdad): a renderer init timeout no longer falls back onto a surface EGL may still own, and teardown balanceseglInitialize.I declined Codex's larger surface-lease design (about 500 new lines, not run on a device) as too much new concurrency for a release gate. The second Codex round found no actionable issues.
Verification
flutter test(60 package + 10 example),flutter analyze,dart format,tool/check_pigeon.sh:async_wallpaper:testDebugUnitTest: 135 tests in 21 suites:async_wallpaper:lintDebug: 0 errorsflutter build apk --debugflutter build ios --simulator --debugfails on this host with 3.41.4. Xcode 27'sliporejects the multi-arch-verify_archcall (E1), and Xcode 27 requires a 15.0 deployment target (E4). It passes with Flutter 3.47.5 and producesx86_64 arm64. CI'smacos-14job is not affected.Not verified
Six observations are left for follow-up (O1–O6 in the doc), for example
Uri.isAbsoluterejecting#fragmentURLs and OpenGL textures sampling upside down withv_uv.🤖 Generated with Claude Code