Skip to content

Call getContext instead of getActivity in FlutterActivityAndFragmentDelegate.onCreateView #85326

@ajmalk

Description

@ajmalk

Use case

We want to embed Flutter in a Fragment that's not hosted by an Activity. But FlutterActivityAndFragmentDelegate.onCreateView unsafely calling getActivity is preventing us from doing that right now. getContext should be equivalent here since that's likely all it needs so this should be a quick fix.

Proposal

Replace getActivity with getContext in FlutterActivityAndFragmentDelegate.onCreateView

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listcustomer: googleVarious Google teamsengineflutter/engine related. See also e: labels.platform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions