Fix background crash when FlutterView going appear while app goes background (flutter/engine#23175)

This commit is contained in:
pepsin
2021-01-22 07:34:02 +08:00
committed by GitHub
parent 95196058d2
commit 3e24724755

View File

@@ -664,8 +664,9 @@ static void sendFakeTouchEvent(FlutterEngine* engine,
TRACE_EVENT0("flutter", "viewDidAppear");
[self onUserSettingsChanged:nil];
[self onAccessibilityStatusChanged:nil];
[[_engine.get() lifecycleChannel] sendMessage:@"AppLifecycleState.resumed"];
if (UIApplication.sharedApplication.applicationState == UIApplicationStateActive) {
[[_engine.get() lifecycleChannel] sendMessage:@"AppLifecycleState.resumed"];
}
[super viewDidAppear:animated];
}