Repository navigation
fix: EPT-6335: Fix USB permission broadcast dropped on Android 14+ and blocking permission wait - #21
Merged
Merged
Conversation
…d remove blocking permission wait
The permission PendingIntent wrapped an implicit intent, so on apps
targeting API 34+ the permission result broadcast was silently dropped
and searchUsbDevices() spun forever in its delay loop, hanging the
search stream ("No stream event" timeouts) and blocking reconnection
after any USB drop. Make the intent explicit (setPackage) with
FLAG_MUTABLE, and make permission handling non-blocking: unpermitted
devices trigger a request and are picked up by a later search poll.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
==========================================
+ Coverage 73.55% 73.68% +0.12%
==========================================
Files 10 10
Lines 208 209 +1
==========================================
+ Hits 153 154 +1
Misses 55 55 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
luiges90
approved these changes
Sep 2, 2026
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.
EPT-6335
Summary
PendingIntentwrapped an implicit intent, so on apps targeting Android 14+ (TSA is now targetSdk 36) the permission result broadcast was silently dropped —searchUsbDevices()then spun forever in itswhile/delayloop, hanging the search stream ("No stream event" timeouts in TSA) and blocking reconnection after any USB drop.Intent(...).setPackage(...)+FLAG_MUTABLE(system must attach result extras), and non-blocking permission handling: devices without permission trigger one request and are picked up by a later search poll once granted.Note: this branch is based on
ea4b6e5(the revision TSA production resolves), not current main tip, because main's rxdart ^0.28.0 bump is incompatible with TSA's rxdart ^0.27.7. Merge may need a trivial rebase.Companion PR: gogovan/flutter-iot#23 (same fix for the label printer searcher + scale disconnect fix).
Test plan
🤖 Generated with Claude Code