Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
Member
|
Thanks, this looks good at b1146ea. The framework-owned chooser and resolver windows now come back as a system surface, and the test covers both owners. There are no conflicts. The systemui coverage comment is fixed and can be resolved. Not blocking:
|
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.
Summary
On Android 13 and older (and Waydroid's LineageOS image), the share sheet is the framework's
ChooserActivityorResolverActivity. It runs in an application window (type 1) owned by theandroidpackage, while the app that opened it still owns the task. The snapshot classifier countsandroidnodes as system UI but only treats non-application windows as a system surface, so the sheet's content counts toward neither bucket and every snapshot fails with "Android snapshot helper returned insufficient foreground app content". The agent cannot see the sheet, so it cannot act on it or get back to the app.An active application window whose root belongs to
androidorcom.android.systemuinow counts as a system surface, and a capture where every application window is framework-owned is returned assystem-surface-only, the same path the notification shade takes. Application windows from other packages are classified as before.Observed diagnostics from a real capture (share sheet over a React Native app on Waydroid, agent-device 0.21.31):
Validation
snapshot-content-recovery.test.ts: an active application window owned byandroidor bycom.android.systemui, over a foreground app, returnssystem-surface-only. Both cases fail without the change.pnpm exec vitest run packages/platform-android: 135 files, 1,367 tests passed.pnpm run typecheck,oxlint --deny-warningsandoxfmt --checkon the changed files are clean.am start -a android.intent.action.SEND -t text/plainover the app,snapshot -ifailed every time before the change. With the same classifier change applied to the published 0.21.32 dist, it returns the resolver's options ("Just once", "Always", the target list) with the system-surface note.Separately, on that Waydroid image
ResolverActivityignores the Back key, so reopening the app is the reliable way out; that is a device quirk, not part of this change.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.