Skip to content

fix: Private Space launch crash and local cover retriever timeout - #1389

Merged
A-EDev merged 3 commits into
mainfrom
fix/widget-preview-retriever-crashes
Oct 21, 2026
Merged

A-EDev merged 3 commits into
mainfrom
fix/widget-preview-retriever-crashes

Conversation

@A-EDev

@A-EDev A-EDev commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Widget picker previews: a profile that rejects Flow's own widget providers (such as a Private Space) made setWidgetPreviews throw IllegalArgumentException on the main thread at launch. The rejection is now caught and logged, and previews are retried on a later run.
  • Local covers and video thumbnails: song cover loads (MediaStoreThumbnailFetcher) and Coil's VideoFrameDecoder ran with no concurrency bound, so dozens of MediaMetadataRetriever instances could be live at once. Their release and finalizer share one native lock, which kept the finalizer daemon waiting past its 10 s watchdog. Both now run on PerformanceDispatcher.mediaRetriever (Dispatchers.IO.limitedParallelism(2)), the decoder through a small MediaRetrieverDecoderFactory wrapper.
  • Nightly note added.

Related issue

Closes #1357
Closes #1353

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

  • ./gradlew :app:assembleGithubDebug
  • ./gradlew :app:testGithubDebugUnitTest
  • I ran any additional flavor-specific build or test tasks affected by this change.
  • I manually tested the affected behavior on an Android device or emulator.

Also ran ./gradlew ktlintCheck, :app:compileGithubDebugKotlin and :app:compileFossDebugKotlin (all passed) and python3 .github/scripts/nightly_notes.py --check (valid).

On device:

  • [Bug]: IllegalArgumentException in Parcel.java:3359 #1357: an instrumentation test disabled an unplaced widget receiver and called GlanceAppWidgetManager.setWidgetPreviews 120 ms later, which threw the same ... is not a valid AppWidget provider exception as the report, so Glance passes it through to the call now wrapped.
  • [Bug]: crash, TimeoutException in Native Method #1353: a temporary in-flight counter around MediaStoreThumbnails.load, 22 fast flings over Local Media › Music (202 songs): main peaked at 19 concurrent loads (202 loads), this branch at 2 (193 loads). Covers and video thumbnails render the same.

Test device and Android version: Xiaomi 2311DRK48G, Android 16 (HyperOS 3)

Screenshots or recordings

Risk and compatibility

No migrations, permissions or network changes. Local cover and video-frame loads are capped at two at a time; on the test device a fast scroll finished a comparable number of loads.

  • The change does not introduce secrets, private data, or unexpected telemetry.
  • New user-facing text uses Android string resources.
  • Dependency and lockfile changes are intentional and limited to this PR.
  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
  • Breaking changes and upgrade steps are clearly documented.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 21, 2026
@A-EDev
A-EDev merged commit 6a3def7 into main Oct 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: IllegalArgumentException in Parcel.java:3359 [Bug]: crash, TimeoutException in Native Method

2 participants