-
Notifications
You must be signed in to change notification settings - Fork 6k
[android] Make ExclusiveAppComponent accessible to FlutterFragment's subclasses similar to FlutterActivity's #30126
Conversation
| // FlutterActivity and FlutterFragment. See the FlutterActivityAndFragmentDelegate | ||
| // implementation for details about why it exists. | ||
| @VisibleForTesting @Nullable /* package */ FlutterActivityAndFragmentDelegate delegate; | ||
| @VisibleForTesting @Nullable protected FlutterActivityAndFragmentDelegate delegate; |
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.
See comment flutter/flutter#93905 (comment)
I don't think this is the right fix
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.
As stated in the comments flutter/flutter#93905 (comment), there are practical demands.
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.
Can we instead expose the method we actually need to subclasses.
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.
Can we instead expose the method we actually need to subclasses.
Thank you for your reply.
In this case, I think exposing the delegate of FlutterFragment as a protected member to subclasses is the least costly solution.
|
请尽快推进吧我们升级了 最新的flutter版本无法使用了 |
|
关注 |
|
mark |
|
same issue |
|
It seems like @blasten and @0xZOne are in disagreement about this approach and @dnfield has a suggested workaround. Since there is not consensus among reviewers about this being the right approach, I don't think progress here is possible. Closing. |
I admit @dnfield's suggested workaround is more elegant. ;) I have reworked. |
In the
FlutterActivitysubclass, we can access the instance ofFlutterActivityAndFragmentDelegatewhich isprotected, as below show.But, in
FlutterFragment, the instance ofFlutterActivityAndFragmentDelegateis package-level access. so we expect to modify thedelegatemember toprotected, similar toFlutterActivity. Make sure FlutterActivity/FlutterFragment subclasses can callflutterEngine.getActivityControlSurface().attachToActivity(delegate, getLifecycle()).Related issues: #issues/93905
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.