1. 30 1月, 2020 6 次提交
  2. 29 1月, 2020 12 次提交
  3. 28 1月, 2020 13 次提交
  4. 27 1月, 2020 4 次提交
  5. 26 1月, 2020 2 次提交
  6. 25 1月, 2020 3 次提交
    • M
      Register plugins at the right time, once (#15979) · 6fa1fcda
      Michael Klimushyn 提交于
      Currently we're automatically registering plugins both when the
      FlutterEngine is constructed and in the `flutter create` template, when
      FlutterActivity#configureFlutterEngine is called. The initial
      registration is too early to contain a reference to the activity and the
      second registration can cause problems in some plugins.
      
      This alters the flow so automatic registration happens in two discrete
      places, and contains the `activity` in its first and only call for most
      apps.
      
      1. We're no longer automatically registering plugins on `FlutterEngine`
      in any of our activities/fragments at construction time. But since the
      FlutterEngine default constructor still automatically registers plugins,
      anyone constructing the engine themselves (for example, in a service) is
      still going to get automatic registration at `FlutterEngine`
      instantiation time.
      2. We now automatically register plugins in the base `FlutterActivity`'s
      `configureFlutterEngine` hook. Anyone using `FlutterActivity` (or
      `FlutterFragment`) should be automatically registered once that hook is
      called. Right now the `flutter create` template overrides the base class
      method with a subclass that registers everything manually in the same
      spot. But with this in place we can safely recommend to remove the
      subclass and rely on this hook to automatically register going forward.
      Registering at this time means `activity` is set correctly.
      6fa1fcda
    • F
      f30ff4fc
    • G