-
Notifications
You must be signed in to change notification settings - Fork 6k
Conversation
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 approach looks good to me given that setFrameworkHandlesBack
is only relevant in particular places. Just left suggestions on expanding the documentation to make that fact clearer to the reader!
* <p>Relevant for registering and unregistering the app's OnBackInvokedCallback for the | ||
* Predictive Back feature. | ||
*/ | ||
default void setFrameworkHandlesBack(boolean frameworkHandlesBack) {} |
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 think this works as a good alternative to the empty implementation in FlutterFragment
. Maybe the doc can expand on where this is currently relevant (FlutterActivity
alone now I suppose)?
@@ -517,7 +517,7 @@ public interface PlatformMessageHandler { | |||
void setSystemUiOverlayStyle(@NonNull SystemChromeStyle systemUiOverlayStyle); | |||
|
|||
/** The Flutter application would or would not like to handle navigation pop events itself. */ | |||
void setFrameworkHandlesBack(boolean frameworkHandlesBack); | |||
default void setFrameworkHandlesBack(boolean frameworkHandlesBack) {} |
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 makes sense to me since it is only used in a particular place. I'd suggest expanding the doc to mention where exactly this is relevant currently (FlutterActivity
), just so it's clear we don't expect it to work or be used elsewhere.
…128754) flutter/engine@f67ed35...d02b15e 2023-06-12 jonahwilliams@google.com [Impeller] Fix text jitter on Vulkan. (flutter/engine#42792) 2023-06-12 jmccandless@google.com Predictive back breakage fix (flutter/engine#42789) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR attempts to fix breakage(s) caused by #39208.
b/286627757
Main problem
There were breakages in Google's code where classes that implemented PlatformMessageHandler did not provide an implementation of setFrameworkHandlesBack.
I've tried to fix this by adding a default empty implementation to PlatformMessageHandler. Is that ok to do there, even though other nearby methods don't have default implementations there?
Also, I noticed that I could probably do the same thing to avoid my empty implementation in FlutterFragment, so I added one to PlatformPluginDelegate as well. That did allow me to remove the implementation in FlutterFragment. Is that ok as well? Do I need to provide both empty implementations?
Other cleanup
I noticed that when I renamed frameworkHandlesBacks to frameworkHandlesBack, I forgot to rename some cases, which I've cleaned up here.