This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
shell/platform/android/io/flutter/app Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -501,8 +501,8 @@ class RuntimeController : public PlatformConfigurationClient {
501501 std::pair<bool , uint32_t > root_isolate_return_code_ = {false , 0 };
502502 const fml::closure isolate_create_callback_;
503503 const fml::closure isolate_shutdown_callback_;
504- fml::WeakPtrFactory<RuntimeController> weak_factory_;
505504 std::shared_ptr<const fml::Mapping> persistent_isolate_data_;
505+ fml::WeakPtrFactory<RuntimeController> weak_factory_;
506506
507507 PlatformConfiguration* GetPlatformConfigurationIfAvailable ();
508508
Original file line number Diff line number Diff line change 55package io .flutter .app ;
66
77import android .app .Activity ;
8+ import android .content .Context ;
89import android .app .Application ;
910import androidx .annotation .CallSuper ;
10- import com .google .android .play .core .splitcompat .SplitCompatApplication ;
11+ import com .google .android .play .core .splitcompat .SplitCompat ;
1112import io .flutter .FlutterInjector ;
1213
1314/**
1718 * <p>Using this {@link android.app.Application} is not required when using APIs in the package
1819 * {@code io.flutter.embedding.android} since they self-initialize on first use.
1920 */
20- public class FlutterApplication extends SplitCompatApplication {
21+ public class FlutterApplication extends Application {
2122 @ Override
2223 @ CallSuper
2324 public void onCreate () {
@@ -34,4 +35,12 @@ public Activity getCurrentActivity() {
3435 public void setCurrentActivity (Activity mCurrentActivity ) {
3536 this .mCurrentActivity = mCurrentActivity ;
3637 }
38+
39+ // This override allows split dynamic feature modules to work.
40+ @ Override
41+ protected void attachBaseContext (Context base ) {
42+ super .attachBaseContext (base );
43+ // Emulates installation of future on demand modules using SplitCompat.
44+ SplitCompat .install (this );
45+ }
3746}
You can’t perform that action at this time.
0 commit comments