-
Notifications
You must be signed in to change notification settings - Fork 6k
Android Embedding Refactor PR31: Integrate platform views with the new embedding and the plugin shim. #9206
Conversation
b9e4db1 to
458e938
Compare
| * <li>{@link #renderMode} defaults to {@link RenderMode#surface}.</li> | ||
| * <li>{@link #transparencyMode} defaults to {@link TransparencyMode#opaque}.</li> | ||
| * </ul> | ||
| * {@code FlutterView} requires an {@code Activity} instead of a generic {@code Context} |
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.
Should the signature be changed to actually take an Activity throughout?
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 thought the approach we were talking about last week was that we're keeping the PlatformViewController to have an ApplicationContext constructor but just that we're adding new APIs to it, something like onAttachToActivity. And you can only do presentation.show after you onAttachToActivity. But then FlutterView isn't involved in any of this. It's just between the fragment, which does flutterPluginRegistry.getPlatformViewsController.onAttachActivity(activity), and the PlatformViewsController.
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.
@mklim I tried that but compilation failed because apparently Android View subclasses need to declare exact replicas of superclass constructors (probably due to XML inflation concerns). So I backed out that change and left a comment.
@xster the reason this was a problem at all is because we can't use an application context. If you ever attempt to show() a dialog/presentation with an application context, the app will blow up. That's why the previous commit that used the application context had to be reverted, which sparked the conversation with the Android team, etc. So now we're doing what we have to do to give PlatformViewsController an Activity.
|
Can you reference a bug for remaining work in the platform view theme? |
xster
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.
So I went through the PR but I'm not sure I provided valuable feedback. I might not have understood how the various conceptual components connect together. Maybe describe in a few paragraphs a verbal sequence diagram of how this is supposed to work.
shell/platform/android/io/flutter/embedding/android/FlutterActivity.java
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterActivity.java
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterFragment.java
Outdated
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterFragment.java
Outdated
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterFragment.java
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterFragment.java
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterFragment.java
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterView.java
Outdated
Show resolved
Hide resolved
| * <li>{@link #renderMode} defaults to {@link RenderMode#surface}.</li> | ||
| * <li>{@link #transparencyMode} defaults to {@link TransparencyMode#opaque}.</li> | ||
| * </ul> | ||
| * {@code FlutterView} requires an {@code Activity} instead of a generic {@code Context} |
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 thought the approach we were talking about last week was that we're keeping the PlatformViewController to have an ApplicationContext constructor but just that we're adding new APIs to it, something like onAttachToActivity. And you can only do presentation.show after you onAttachToActivity. But then FlutterView isn't involved in any of this. It's just between the fragment, which does flutterPluginRegistry.getPlatformViewsController.onAttachActivity(activity), and the PlatformViewsController.
shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java
Show resolved
Hide resolved
I'm not sure what this is referring to? |
8d10bf9 to
08bd289
Compare
xster
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.
Please disregard my previous comments since I didn't understand the approach this PR was taking before our conversation today. Just essentially 1 comment left:
shell/platform/android/io/flutter/embedding/android/FlutterActivity.java
Show resolved
Hide resolved
| public void attachToFlutterEngine(@NonNull FlutterEngine flutterEngine) { | ||
| public void attachToFlutterEngine( | ||
| @NonNull FlutterEngine flutterEngine, | ||
| @NonNull PlatformViewsController platformViewsController |
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.
So now if I am just integrating via a FlutterView, I have to create a PlatformViewController too?
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.
Yeah, with the way PlatformViewsController is integrated with the embedding right now, it's a requirement. If we'd like to make it optional then we'd need to make that change within the platform views subsystem, itself, because right now I'm just matching how platform views integrates with the old embedding.
| this, | ||
| this.flutterEngine.getDartExecutor(), | ||
| null | ||
| platformViewsController |
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 see. Can we flip it around? Such that the FlutterView creates and owns the PlatformViewController and since the FlutterFragment only needs this in one place, it does
flutterEngine.getActivityControlSurface().attachToActivity(
getActivity(),
getLifecycle(),
flutterView.getPlatformViewsController(),
)Regarding the sequencing of onAttach->onCreate->onCreateView etc, I think we might want to tweak it a bit too. Otherwise it's a bit leaky that we're giving an Activity which hasn't yet finished initializing to an activity aware plugin. It's a bit like giving a reference to a partially constructed object to someone else in Android equivalent.
If the flutterEngine.getActivityControlSurface().attachToActivity() was on onActivityCreated() instead, then it's both cleaner and onCreateView would have been called by then, meaning you can get the PlatformViewController from the FlutterView.
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'll attempt to make this change and see how it goes.
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.
Actually, @xster, now I remember why the PlatformViewsController isn't created inside FlutterView - platform view functionality needs to outlive a given FlutterView, right? When the engine is detached from a view, we probably won't attempt to layout or render anything, but we probably can't just tear out the platform views subsystem just because we stopped rendering to the screen, can we?
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.
Doesn't this apply to the FlutterFragment (to which you're giving ownership of the platform view controller in this PR) as well?
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.
Also, I think moving flutterEngine.getActivityControlSurface().attachToActivity() from onAttach to onCreateView is onActivityCreated is a bit orthogonal. I just noticed it now but it wasn't really part of this PR. We should make it cleaner nevertheless either in this PR or in another one.
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.
@xster I just pushed a change that moves PlatformViewsController into FlutterEngine as a component. I think that conceptually makes sense since we've said that some notion of platform views needs to function even in the background. Let me know what you think.
WRT to onActivityCreated, we should chat about it. I looked up the Fragment lifecycle and I'm not convinced that there is a symmetric call. I think the question comes down to this: if I attach an existing Fragment to an existing Activity, will we get a call to onActivityCreated? If not, then I don't think we can use it.
shell/platform/android/io/flutter/embedding/android/FlutterActivity.java
Show resolved
Hide resolved
40b2a91 to
0666c02
Compare
amirh
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 for the platform views controller integration.
@matthew-carroll can you make sure to test accessibility and text input in your local webview sample before landing?
0666c02 to
6a1f257
Compare
|
Rebased to resolve conflicts and force pushed. Also added commit that implements a method needed for keyboard support. Verified that accessibility works the same way between the old and new embedding in the webview example project. |
xster
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 on the move.
We really need to fix flutter/flutter#32987 soon :S
| * {@link FlutterEngine}. | ||
| */ | ||
| public void attachToFlutterEngine(@NonNull FlutterEngine flutterEngine) { | ||
| public void attachToFlutterEngine( |
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.
This whole thing looks a lot cleaner now. Thanks!
…h the new embedding and the plugin shim. (flutter/engine#9206)
…h the new embedding and the plugin shim. (flutter/engine#9206)
…h the new embedding and the plugin shim. (flutter/engine#9206)
…h the new embedding and the plugin shim. (flutter/engine#9206)
…h the new embedding and the plugin shim. (flutter/engine#9206)
…h the new embedding and the plugin shim. (flutter/engine#9206)
flutter/engine@ffba2f6...7d3e722 git log ffba2f6..7d3e722 --no-merges --oneline 7d3e722 Roll buildroot to c5a493b. (flutter/engine#9649) 8deeb77 make EmbeddedViewParams a unique ptr (flutter/engine#9640) 7862af5 Roll src/third_party/skia bd3d8d39b3e7..215ff3325230 (4 commits) (flutter/engine#9648) a9ee687 iOS PlatformView clip path (flutter/engine#9478) c19b53c Roll src/third_party/skia effee2065796..bd3d8d39b3e7 (1 commits) (flutter/engine#9647) aeaa5ed Roll src/third_party/skia 2ef826576819..effee2065796 (1 commits) (flutter/engine#9646) 1cc1f04 Roll src/third_party/skia f2c52efce52b..2ef826576819 (2 commits) (flutter/engine#9645) 1c295b2 Roll src/third_party/skia 9fb7fa537d93..f2c52efce52b (1 commits) (flutter/engine#9644) 56a3f41 Android Embedding Refactor PR31: Integrate platform views with the new embedding and the plugin shim. (flutter/engine#9206) 8ac7cbd Fix warning about settings unavailable GN arg build_glfw_shell (flutter/engine#9642) f665717 Roll src/third_party/skia 21a486d04ae0..9fb7fa537d93 (21 commits) (flutter/engine#9639) fd24007 Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (flutter/engine#9638) 628b174 Fixes a plugin overwrite bug in the plugin shim system. (flutter/engine#9589) 345d350 Added Doxyfile. (flutter/engine#9632) 64b9eef Revert "Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (#9634)" (flutter/engine#9637) 45e1ad2 Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (flutter/engine#9634) da6475e Roll fuchsia/sdk/core/mac-amd64 from TRwIGIJLuznLNQzJk17zfboJrkErpe1XvGr0njCwemoC to byM-kyxL4bemlTYNqhKUfJfZoIUrCSzS6XzsFr4n9-MC (flutter/engine#9629) bee12e6 Roll fuchsia/sdk/core/mac-amd64 from MBS_xxNZ_O32DxW1bhOeJisJqYG9JY_FAtSa3ZYupg4C to TRwIGIJLuznLNQzJk17zfboJrkErpe1XvGr0njCwemoC (flutter/engine#9626) fea8fa6 Roll fuchsia/sdk/core/linux-amd64 from Efv1uHDvhLYgT8mvQmdAiJv7HiLix2L_kDRkK6P9ER4C to I2Qe1zxgckzIzMBTztvzeWYsDgcb9Fw-idSI16oIlx8C (flutter/engine#9625) e7f8ca1 [all] add fuchsia.{net.NameLookup,posix.socket.Provider} (flutter/engine#9546) a72a999 Roll fuchsia/sdk/core/mac-amd64 from B-JzM_H7hG5kOIRFjmUqI3uWBAV7no8BnCTknbd2wQ4C to MBS_xxNZ_O32DxW1bhOeJisJqYG9JY_FAtSa3ZYupg4C (flutter/engine#9624) b3fe3e9 Fix a race in the embedder accessibility unit test (flutter/engine#9585) 55818f6 Roll fuchsia/sdk/core/linux-amd64 from xtoj1ola0unTQOetly-V77CgpT6g8L1JUKWDqS8SuAQC to Efv1uHDvhLYgT8mvQmdAiJv7HiLix2L_kDRkK6P9ER4C (flutter/engine#9623) 37a54f2 Roll fuchsia/sdk/core/linux-amd64 from O1niQGtIRghvjuMMCmxevRA1Y6seUn6onOao6Wii9hQC to xtoj1ola0unTQOetly-V77CgpT6g8L1JUKWDqS8SuAQC (flutter/engine#9622) 458a764 Roll fuchsia/sdk/core/mac-amd64 from neDu8hWotIrKCQkxz1ScSJC4NoBva1_YVszr6wMbcZQC to B-JzM_H7hG5kOIRFjmUqI3uWBAV7no8BnCTknbd2wQ4C (flutter/engine#9621) 6e7b4ca Roll fuchsia/sdk/core/linux-amd64 from gMVpYn1cxQ0LeU-TSryUCg2o3rNcf7JWvlOqY6G00MYC to O1niQGtIRghvjuMMCmxevRA1Y6seUn6onOao6Wii9hQC (flutter/engine#9620) e4d354d Roll src/third_party/skia 161f47dfbf6a..21a486d04ae0 (2 commits) (flutter/engine#9619) 2802875 Roll fuchsia/sdk/core/mac-amd64 from tPyg8rqV40gsoXEhDf7VskccnbJGCh4_bZp71YOUinEC to neDu8hWotIrKCQkxz1ScSJC4NoBva1_YVszr6wMbcZQC (flutter/engine#9618) 8e405c1 Roll fuchsia/sdk/core/mac-amd64 from UkCx2sMZsCM-w9nEuQC2TRfnJ7wjJCxsCxSDEx2uPegC to tPyg8rqV40gsoXEhDf7VskccnbJGCh4_bZp71YOUinEC (flutter/engine#9615) 609a980 Fix uninitialized variables and put tests in flutter namespace. (flutter/engine#9613) 9807894 Roll fuchsia/sdk/core/linux-amd64 from ur0ah3sh2atct83EqYX28SjG3fKt-7Driu48GbpdxmMC to gMVpYn1cxQ0LeU-TSryUCg2o3rNcf7JWvlOqY6G00MYC (flutter/engine#9612) 4e344e6 Wire up custom event loop interop for the GLFW embedder. (flutter/engine#9089) 54c6226 Roll fuchsia/sdk/core/mac-amd64 from gyWAjP3BPfhpvHOOwaTusfA8JaGcY_UzjpoIGQnA_W0C to UkCx2sMZsCM-w9nEuQC2TRfnJ7wjJCxsCxSDEx2uPegC (flutter/engine#9611) c3f8cab Roll fuchsia/sdk/core/linux-amd64 from xmxDtsnD0sfj7wxUaiMMhUwh72prBvMcYHY07lgTotcC to ur0ah3sh2atct83EqYX28SjG3fKt-7Driu48GbpdxmMC (flutter/engine#9610) 6f1a748 Document various classes in //flutter/shell/common. (flutter/engine#9591) 4d36530 Roll fuchsia/sdk/core/mac-amd64 from 4PD6FCl4NvKCavA0AVsdKtZPB3G5K72KprkEH0mr064C to gyWAjP3BPfhpvHOOwaTusfA8JaGcY_UzjpoIGQnA_W0C (flutter/engine#9609) cf084bd Roll fuchsia/sdk/core/linux-amd64 from XRYatTY5OvCnQ-5rGC8AnYltKa68CBxmnEK8QO0fpvQC to xmxDtsnD0sfj7wxUaiMMhUwh72prBvMcYHY07lgTotcC (flutter/engine#9607) 8d05400 disable mysterious failing tests (flutter/engine#9608) aa817a9 Roll fuchsia/sdk/core/mac-amd64 from DeTFBSaxMBfZpfK0c7CifGpJbJLOrs3WtuCOaINwmrwC to 4PD6FCl4NvKCavA0AVsdKtZPB3G5K72KprkEH0mr064C (flutter/engine#9606) 4e988e0 Roll fuchsia/sdk/core/linux-amd64 from jXpdljb7CHe8PEpUGGYqGvx6vFar6QRUh6HmpxMoS9sC to XRYatTY5OvCnQ-5rGC8AnYltKa68CBxmnEK8QO0fpvQC (flutter/engine#9605) 84ae36a Roll fuchsia/sdk/core/mac-amd64 from IMr36r3rRLs1G7T5OtCudVMoWjPcjRbYGgyDg7LSxPwC to DeTFBSaxMBfZpfK0c7CifGpJbJLOrs3WtuCOaINwmrwC (flutter/engine#9604) 7135c8d Roll fuchsia/sdk/core/mac-amd64 from qcwCYvuT0PeU97HpvMVmC114EOKwfrk8PdFdZz_m6CIC to IMr36r3rRLs1G7T5OtCudVMoWjPcjRbYGgyDg7LSxPwC (flutter/engine#9602) 8f4df03 Roll fuchsia/sdk/core/linux-amd64 from Y3kUPtfq2frI60zx7VssO-WG733jtODCmnESyz0UGdEC to jXpdljb7CHe8PEpUGGYqGvx6vFar6QRUh6HmpxMoS9sC (flutter/engine#9601) 6c6a0d7 [trace clients] Remove fuchsia.tracelink.Registry (flutter/engine#9593) f931539 Roll fuchsia/sdk/core/mac-amd64 from UsrGfX7Fj96MljgqUFc_A-o_ufsa_FX3eaG14ZSDWMAC to qcwCYvuT0PeU97HpvMVmC114EOKwfrk8PdFdZz_m6CIC (flutter/engine#9600) ...
flutter/engine@ffba2f6...7d3e722 git log ffba2f6..7d3e722 --no-merges --oneline 7d3e722 Roll buildroot to c5a493b. (flutter/engine#9649) 8deeb77 make EmbeddedViewParams a unique ptr (flutter/engine#9640) 7862af5 Roll src/third_party/skia bd3d8d39b3e7..215ff3325230 (4 commits) (flutter/engine#9648) a9ee687 iOS PlatformView clip path (flutter/engine#9478) c19b53c Roll src/third_party/skia effee2065796..bd3d8d39b3e7 (1 commits) (flutter/engine#9647) aeaa5ed Roll src/third_party/skia 2ef826576819..effee2065796 (1 commits) (flutter/engine#9646) 1cc1f04 Roll src/third_party/skia f2c52efce52b..2ef826576819 (2 commits) (flutter/engine#9645) 1c295b2 Roll src/third_party/skia 9fb7fa537d93..f2c52efce52b (1 commits) (flutter/engine#9644) 56a3f41 Android Embedding Refactor PR31: Integrate platform views with the new embedding and the plugin shim. (flutter/engine#9206) 8ac7cbd Fix warning about settings unavailable GN arg build_glfw_shell (flutter/engine#9642) f665717 Roll src/third_party/skia 21a486d04ae0..9fb7fa537d93 (21 commits) (flutter/engine#9639) fd24007 Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (flutter/engine#9638) 628b174 Fixes a plugin overwrite bug in the plugin shim system. (flutter/engine#9589) 345d350 Added Doxyfile. (flutter/engine#9632) 64b9eef Revert &flutter#34;Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (flutter#9634)&flutter#34; (flutter/engine#9637) 45e1ad2 Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (flutter/engine#9634) da6475e Roll fuchsia/sdk/core/mac-amd64 from TRwIGIJLuznLNQzJk17zfboJrkErpe1XvGr0njCwemoC to byM-kyxL4bemlTYNqhKUfJfZoIUrCSzS6XzsFr4n9-MC (flutter/engine#9629) bee12e6 Roll fuchsia/sdk/core/mac-amd64 from MBS_xxNZ_O32DxW1bhOeJisJqYG9JY_FAtSa3ZYupg4C to TRwIGIJLuznLNQzJk17zfboJrkErpe1XvGr0njCwemoC (flutter/engine#9626) fea8fa6 Roll fuchsia/sdk/core/linux-amd64 from Efv1uHDvhLYgT8mvQmdAiJv7HiLix2L_kDRkK6P9ER4C to I2Qe1zxgckzIzMBTztvzeWYsDgcb9Fw-idSI16oIlx8C (flutter/engine#9625) e7f8ca1 [all] add fuchsia.{net.NameLookup,posix.socket.Provider} (flutter/engine#9546) a72a999 Roll fuchsia/sdk/core/mac-amd64 from B-JzM_H7hG5kOIRFjmUqI3uWBAV7no8BnCTknbd2wQ4C to MBS_xxNZ_O32DxW1bhOeJisJqYG9JY_FAtSa3ZYupg4C (flutter/engine#9624) b3fe3e9 Fix a race in the embedder accessibility unit test (flutter/engine#9585) 55818f6 Roll fuchsia/sdk/core/linux-amd64 from xtoj1ola0unTQOetly-V77CgpT6g8L1JUKWDqS8SuAQC to Efv1uHDvhLYgT8mvQmdAiJv7HiLix2L_kDRkK6P9ER4C (flutter/engine#9623) 37a54f2 Roll fuchsia/sdk/core/linux-amd64 from O1niQGtIRghvjuMMCmxevRA1Y6seUn6onOao6Wii9hQC to xtoj1ola0unTQOetly-V77CgpT6g8L1JUKWDqS8SuAQC (flutter/engine#9622) 458a764 Roll fuchsia/sdk/core/mac-amd64 from neDu8hWotIrKCQkxz1ScSJC4NoBva1_YVszr6wMbcZQC to B-JzM_H7hG5kOIRFjmUqI3uWBAV7no8BnCTknbd2wQ4C (flutter/engine#9621) 6e7b4ca Roll fuchsia/sdk/core/linux-amd64 from gMVpYn1cxQ0LeU-TSryUCg2o3rNcf7JWvlOqY6G00MYC to O1niQGtIRghvjuMMCmxevRA1Y6seUn6onOao6Wii9hQC (flutter/engine#9620) e4d354d Roll src/third_party/skia 161f47dfbf6a..21a486d04ae0 (2 commits) (flutter/engine#9619) 2802875 Roll fuchsia/sdk/core/mac-amd64 from tPyg8rqV40gsoXEhDf7VskccnbJGCh4_bZp71YOUinEC to neDu8hWotIrKCQkxz1ScSJC4NoBva1_YVszr6wMbcZQC (flutter/engine#9618) 8e405c1 Roll fuchsia/sdk/core/mac-amd64 from UkCx2sMZsCM-w9nEuQC2TRfnJ7wjJCxsCxSDEx2uPegC to tPyg8rqV40gsoXEhDf7VskccnbJGCh4_bZp71YOUinEC (flutter/engine#9615) 609a980 Fix uninitialized variables and put tests in flutter namespace. (flutter/engine#9613) 9807894 Roll fuchsia/sdk/core/linux-amd64 from ur0ah3sh2atct83EqYX28SjG3fKt-7Driu48GbpdxmMC to gMVpYn1cxQ0LeU-TSryUCg2o3rNcf7JWvlOqY6G00MYC (flutter/engine#9612) 4e344e6 Wire up custom event loop interop for the GLFW embedder. (flutter/engine#9089) 54c6226 Roll fuchsia/sdk/core/mac-amd64 from gyWAjP3BPfhpvHOOwaTusfA8JaGcY_UzjpoIGQnA_W0C to UkCx2sMZsCM-w9nEuQC2TRfnJ7wjJCxsCxSDEx2uPegC (flutter/engine#9611) c3f8cab Roll fuchsia/sdk/core/linux-amd64 from xmxDtsnD0sfj7wxUaiMMhUwh72prBvMcYHY07lgTotcC to ur0ah3sh2atct83EqYX28SjG3fKt-7Driu48GbpdxmMC (flutter/engine#9610) 6f1a748 Document various classes in //flutter/shell/common. (flutter/engine#9591) 4d36530 Roll fuchsia/sdk/core/mac-amd64 from 4PD6FCl4NvKCavA0AVsdKtZPB3G5K72KprkEH0mr064C to gyWAjP3BPfhpvHOOwaTusfA8JaGcY_UzjpoIGQnA_W0C (flutter/engine#9609) cf084bd Roll fuchsia/sdk/core/linux-amd64 from XRYatTY5OvCnQ-5rGC8AnYltKa68CBxmnEK8QO0fpvQC to xmxDtsnD0sfj7wxUaiMMhUwh72prBvMcYHY07lgTotcC (flutter/engine#9607) 8d05400 disable mysterious failing tests (flutter/engine#9608) aa817a9 Roll fuchsia/sdk/core/mac-amd64 from DeTFBSaxMBfZpfK0c7CifGpJbJLOrs3WtuCOaINwmrwC to 4PD6FCl4NvKCavA0AVsdKtZPB3G5K72KprkEH0mr064C (flutter/engine#9606) 4e988e0 Roll fuchsia/sdk/core/linux-amd64 from jXpdljb7CHe8PEpUGGYqGvx6vFar6QRUh6HmpxMoS9sC to XRYatTY5OvCnQ-5rGC8AnYltKa68CBxmnEK8QO0fpvQC (flutter/engine#9605) 84ae36a Roll fuchsia/sdk/core/mac-amd64 from IMr36r3rRLs1G7T5OtCudVMoWjPcjRbYGgyDg7LSxPwC to DeTFBSaxMBfZpfK0c7CifGpJbJLOrs3WtuCOaINwmrwC (flutter/engine#9604) 7135c8d Roll fuchsia/sdk/core/mac-amd64 from qcwCYvuT0PeU97HpvMVmC114EOKwfrk8PdFdZz_m6CIC to IMr36r3rRLs1G7T5OtCudVMoWjPcjRbYGgyDg7LSxPwC (flutter/engine#9602) 8f4df03 Roll fuchsia/sdk/core/linux-amd64 from Y3kUPtfq2frI60zx7VssO-WG733jtODCmnESyz0UGdEC to jXpdljb7CHe8PEpUGGYqGvx6vFar6QRUh6HmpxMoS9sC (flutter/engine#9601) 6c6a0d7 [trace clients] Remove fuchsia.tracelink.Registry (flutter/engine#9593) f931539 Roll fuchsia/sdk/core/mac-amd64 from UsrGfX7Fj96MljgqUFc_A-o_ufsa_FX3eaG14ZSDWMAC to qcwCYvuT0PeU97HpvMVmC114EOKwfrk8PdFdZz_m6CIC (flutter/engine#9600) ...
Android Embedding Refactor PR31: Integrate platform views with the new embedding and the plugin shim.
To test this change, I ported the WebView plugin locally to use the new Android embedding. It works as expected.
This PR adjusts where and when the
PlatformViewsControlleris created and attached to anActivityto respect the possibility that anActivitydoes not initially exist. It does so in a way that still allows theShimPluginRegistryto work as expected with existing plugins in a full-Flutter scenario.Additional investigation and work on
PlatformViewsControlleris still necessary, but that future work is not expected to require fundamental changes to the embedding APIs, so I've left it for future PRs. With this PR, we should be able to say that platform views are integrated with the new embedding, but without leaking anActivityand without crashing some bots.This PR should constitute the completion of known requirements for the core embedding + plugin API (minus any future decisions about plugin registration, etc.).