Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@tvolkert
Copy link
Contributor

@tvolkert tvolkert commented Jun 7, 2017

This factors the functionality that was in FlutterActivity
to live in FlutterActivityDelegate. This will allow the creation of a
FlutterFragmentActivity that has the same core functionality, which in
turn unlocks certain Android plugins that choose to require the v4
support library (like Google Sign-In).

flutter/flutter#10072

* <p/>
* <h3>Usage:</h3>
* To wire this class up to your activity, simply forward the events defined
* in {@link ActivityEventDelegate} from your activity to an instance of this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be FlutterActivityEvents?

return null;
}
public class FlutterActivity extends Activity implements FlutterView.Provider, PluginRegistry, ViewFactory {
private final FlutterActivityDelegate delegate = new FlutterActivityDelegate(this, this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to declare this as the FlutterActivityEvents type?

Right now it looks like there's nothing that enforces that FlutterActivityEvents contains all activity overrides that are forwarded by FlutterActivity to the delegate.

FlutterActivity would also need FlutterView.Provider and PluginRegistry aliases for the delegate to call methods defined through those interfaces.

@Hixie
Copy link
Contributor

Hixie commented Jun 7, 2017

@tvolkert
Copy link
Contributor Author

tvolkert commented Jun 7, 2017

Is this a breaking change in any way?

No, it should be non-breaking. That's why I deprecated onFlutterReady() as opposed to removing it.

tvolkert added 2 commits June 7, 2017 10:59
This factors the functionality that was in `FlutterActivity`
to live in `FlutterActivityDelegate`. This will allow the creation of a
`FlutterFragmentActivity` that has the same core functionality, which in
turn unlocks certain Android plugins that choose to require the v4
support library (like Google Sign-In).

flutter/flutter#10072
@tvolkert
Copy link
Contributor Author

tvolkert commented Jun 7, 2017

Comments addressed - PTAL

@jason-simmons
Copy link
Member

LGTM

@Hixie
Copy link
Contributor

Hixie commented Jun 7, 2017

Please announce the deprecation to the list and schedule a date in the future to remove it. Thanks!

@tvolkert tvolkert merged commit ec8cbe0 into flutter:master Jun 7, 2017
@tvolkert tvolkert deleted the activity branch June 7, 2017 19:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants