-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[android] release background image readers on <= Android 14 #171193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @matanlurey - I expect I'll request your review on this as you reviewed the original #165942. Do you happen to have any idea of what a test would look like for this? I can go figure it out if not, but I'm not sure what type of tests we've commonly written in these device specific cases (for devices we don't have on ci). |
|
Also, I expected this to break background video playing on <14, as #165942 is listed as fixing it. But I'm still able to run background video on android 10, from what I can tell (unless I don't understand the way in which it was broken): background_play.webm |
|
I'd have to spend more time reloading the full context, but as far as I remember it:
The confusing part of this PR is that you're changing how/when platform views are released ( I would get an initial review and potentially pair with @camsim99 on this first, or @reidbaker for platform views - Camille has been working diligently on trying to fix bugs / improve functionality related to |
Hmm, I'm not testing for Image textures though, am I? If you look at the video I'm testing for video players platform view mode, which makes a platform view https://github.com/flutter/packages/blob/2c52f245e232d6722530e5538bc61b12e5cbf6cd/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/platformview/PlatformVideoView.java
This is related because the linked bug is related to platform views, and also because it is a direct bisect of Jonah's original PR which caused the regression. It was also Jonah's suggestion when I mentioned the regression to him. The video here is just to make sure that in fixing the regression from Jonah's change, we aren't also introducing a new regression (because the initial change Jonah made was intended to fix background video playing) |
mboetger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the @config annotations - use the minSDK and maxSDK where you can.
...tter/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java
Outdated
Show resolved
Hide resolved
mboetger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@gmackall can you include in the pr description the bisected change that was at fault and the issue that pr was attempting to solve? |
| private static PlatformViewRenderTarget makePlatformViewRenderTarget( | ||
| TextureRegistry textureRegistry) { | ||
| if (enableSurfaceProducerRenderTarget && Build.VERSION.SDK_INT >= API_LEVELS.API_29) { | ||
| TextureRegistry.SurfaceLifecycle lifecycle = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider a comment with what information you used to determine that manual surface lifecycle made sense on api 35 and above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't make any decision on >= 35 here, but there have been no crashes on that level those levels so I'd prefer to leave it alone, considering this is likely to be cherry picked
added the original pr to the description |
|
Failed to create CP due to merge conflicts. |
1 similar comment
|
Failed to create CP due to merge conflicts. |
Also (I realized I forgot to reply here) FYI I did try but did not encounter this issue, so I hopefully that means the fix did not regress what the original change was meant to fix. |
flutter/flutter@28a4e85...adffe24 2025-07-08 [email protected] Roll Skia from 0669913308d3 to e159882c6ce0 (1 revision) (flutter/flutter#171766) 2025-07-08 [email protected] Roll Skia from 36b1f71fc14f to 0669913308d3 (4 revisions) (flutter/flutter#171756) 2025-07-08 [email protected] Roll Skia from f35536730dea to 36b1f71fc14f (3 revisions) (flutter/flutter#171751) 2025-07-08 [email protected] Roll Skia from 05374bbe5377 to f35536730dea (1 revision) (flutter/flutter#171744) 2025-07-08 [email protected] Roll Skia from 4968a30d721c to 05374bbe5377 (2 revisions) (flutter/flutter#171742) 2025-07-08 [email protected] Roll Skia from ad5c330487f7 to 4968a30d721c (8 revisions) (flutter/flutter#171739) 2025-07-08 [email protected] feat: Use engine_stamp.json in flutter tool (flutter/flutter#171454) 2025-07-08 [email protected] [ Tool ] Remove long-deprecated `make-host-app-editable` (flutter/flutter#171715) 2025-07-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (#171399)" (flutter/flutter#171736) 2025-07-07 [email protected] Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (flutter/flutter#171399) 2025-07-07 [email protected] [android] release background image readers on <= Android 14 (flutter/flutter#171193) 2025-07-07 [email protected] [ Tool ] Fix crash when SIGQUIT is sent to enable the VM service for `flutter analyze --watch` (flutter/flutter#171713) 2025-07-07 [email protected] Roll Skia from 47a5693d191a to ad5c330487f7 (2 revisions) (flutter/flutter#171716) 2025-07-07 [email protected] Run hot_reload_web_test.dart on Mac/Windows (flutter/flutter#171279) 2025-07-07 [email protected] Roll Fuchsia Linux SDK from 2DeZD1utFrnSwUfVT... to AinHuT0vgOelA1g7_... (flutter/flutter#171700) 2025-07-07 [email protected] [ Tool ] Prepare for enabling `omit_obvious_*_types` and `specify_nonobvious_*_types` (flutter/flutter#171651) 2025-07-07 [email protected] Roll Packages from e4fd6c0 to 2c52f24 (1 revision) (flutter/flutter#171705) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…171737) CP of #171193. Template: - Impacted Users (Approximately who will hit this issue, ex. all Flutter devs, Windows developers, all end-customers, apps using X framework feature). All end users on Android 10-13 (inclusive) using an app with platform views. - Impact Description (What is the impact? ex. visual jank on Samsung phones, app crash, cannot ship an iOS app. Does it impact development? ex. flutter doctor crashes when Android Studio is installed. Or shipping a production app? ex. the app crashes on launch). Full app crash when backgrounding and then bringing the app back up. - Workaround (Is there a workaround for this issue?) No workaround. - Risk (What is the risk level of this cherry-pick?) Medium - Test Coverage (Are you confident that your fix is well-tested by automated tests?) No - Validation Steps (What are the steps to validate that this fix works?) Launch an app with platform views on these api levels and background them, and then bring the app back up.
…171193) Fixes the version of flutter#162147 that repros on 3.32 (but not the version that the original submitter experiences on 3.27 - I've not been able to reproduce that issue). See flutter#162147 (comment) Result of bisecting flutter#162147 to flutter#165942 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Gray Mackall <[email protected]>
…171193) Fixes the version of flutter#162147 that repros on 3.32 (but not the version that the original submitter experiences on 3.27 - I've not been able to reproduce that issue). See flutter#162147 (comment) Result of bisecting flutter#162147 to flutter#165942 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Gray Mackall <[email protected]>
…r#9580) flutter/flutter@28a4e85...adffe24 2025-07-08 [email protected] Roll Skia from 0669913308d3 to e159882c6ce0 (1 revision) (flutter/flutter#171766) 2025-07-08 [email protected] Roll Skia from 36b1f71fc14f to 0669913308d3 (4 revisions) (flutter/flutter#171756) 2025-07-08 [email protected] Roll Skia from f35536730dea to 36b1f71fc14f (3 revisions) (flutter/flutter#171751) 2025-07-08 [email protected] Roll Skia from 05374bbe5377 to f35536730dea (1 revision) (flutter/flutter#171744) 2025-07-08 [email protected] Roll Skia from 4968a30d721c to 05374bbe5377 (2 revisions) (flutter/flutter#171742) 2025-07-08 [email protected] Roll Skia from ad5c330487f7 to 4968a30d721c (8 revisions) (flutter/flutter#171739) 2025-07-08 [email protected] feat: Use engine_stamp.json in flutter tool (flutter/flutter#171454) 2025-07-08 [email protected] [ Tool ] Remove long-deprecated `make-host-app-editable` (flutter/flutter#171715) 2025-07-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (#171399)" (flutter/flutter#171736) 2025-07-07 [email protected] Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (flutter/flutter#171399) 2025-07-07 [email protected] [android] release background image readers on <= Android 14 (flutter/flutter#171193) 2025-07-07 [email protected] [ Tool ] Fix crash when SIGQUIT is sent to enable the VM service for `flutter analyze --watch` (flutter/flutter#171713) 2025-07-07 [email protected] Roll Skia from 47a5693d191a to ad5c330487f7 (2 revisions) (flutter/flutter#171716) 2025-07-07 [email protected] Run hot_reload_web_test.dart on Mac/Windows (flutter/flutter#171279) 2025-07-07 [email protected] Roll Fuchsia Linux SDK from 2DeZD1utFrnSwUfVT... to AinHuT0vgOelA1g7_... (flutter/flutter#171700) 2025-07-07 [email protected] [ Tool ] Prepare for enabling `omit_obvious_*_types` and `specify_nonobvious_*_types` (flutter/flutter#171651) 2025-07-07 [email protected] Roll Packages from e4fd6c0 to 2c52f24 (1 revision) (flutter/flutter#171705) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…171193) Fixes the version of flutter#162147 that repros on 3.32 (but not the version that the original submitter experiences on 3.27 - I've not been able to reproduce that issue). See flutter#162147 (comment) Result of bisecting flutter#162147 to flutter#165942 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Gray Mackall <[email protected]>
Fixes the version of #162147 that repros on 3.32 (but not the version that the original submitter experiences on 3.27 - I've not been able to reproduce that issue). See #162147 (comment)
Result of bisecting #162147 to #165942
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.