-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Add SurfaceProducer.Callback
lifecycle hooks
#53280
Add SurfaceProducer.Callback
lifecycle hooks
#53280
Conversation
shell/platform/android/build.gradle
Outdated
@@ -63,3 +63,7 @@ android { | |||
} | |||
} | |||
|
|||
dependencies { | |||
implementation 'androidx.lifecycle:lifecycle-process:2.2.0' |
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 shouldn't be necessary - do the new classes not resolve in android studio for you without it?
If they don't resolve without, I may need to revert #50840, I think something about that PR may have messed up how we resolve the android_embedding_dependencies jars
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.
You know, I'm not sure. I think this was auto-added by IntelliJ. Let me try removing and resyncing.
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.
It appears to work fine w/o, removing.
…ndererTest` (#53361) In #53280, I'm adding lifecycle-aware methods to `SurfaceProducer`. That means, in order to test that it WAI, we'll need to be running in a simulated activity, and be able to switch scenario states (i.e. to `RESUMED`). This was mentioned as well in flutter/flutter#133151 as being something we want to do. This PR adds a `FlutterEngineRule`, which allows the creation of a "real" `FlutterEngine` and an `Intent` that can power `AndroidScenarioRule<FlutterActivity>`. I felt bad doing all of this work for a single `@Test`, so I also refactored the rest of the file and cleaned things up a bit. That said, I'm happy to revert or make changes if we liked how things were setup before.
4865484
to
c8b4446
Compare
SurfaceProducer.setOnSurfaceRecreatedCallback
lifecycle hookSurfaceProducer.Callback
lifecycle hooks
void setCallback(Callback callback); | ||
|
||
/** Callback invoked by {@link #setCallback(Callback)}. */ | ||
interface Callback { |
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.
naming nit: Callbacks?
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.
Includes updates to Gradle lockfiles required by flutter/engine#53280
Includes updates to Gradle lockfiles required by flutter/engine#53280
Includes updates to Gradle lockfiles required by flutter/engine#53280
Includes updates to Gradle lockfiles required by flutter/engine#53280
Work towards flutter/flutter#148417.