From 90247abd5e724ba9895ecd53bc58252d15d3c623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rulong=20Chen=EF=BC=88=E9=99=88=E6=B1=9D=E9=BE=99=EF=BC=89?= Date: Wed, 18 Oct 2023 11:08:11 +0800 Subject: [PATCH] Fix typos in FlutterEngine.ets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rulong Chen(陈汝龙) --- .../src/main/ets/embedding/engine/FlutterEngine.ets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterEngine.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterEngine.ets index af5eecade4..4a16a419d9 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterEngine.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterEngine.ets @@ -76,7 +76,7 @@ export default class FlutterEngine implements EngineLifecycleListener{ * 2、初始化所有channel * 3、初始化plugin * 4、初始化flutterLoader - * 5、初始化flutterJNI + * 5、初始化flutterNapi * 6、engineLifecycleListeners */ constructor(context: common.Context, flutterLoader: FlutterLoader, flutterNapi: FlutterNapi, platformViewsController: PlatformViewsController) { @@ -125,7 +125,7 @@ export default class FlutterEngine implements EngineLifecycleListener{ this.flutterNapi.addEngineLifecycleListener(this); this.localizationPlugin = new LocalizationPlugin(context, this.localeChannel); - // It should typically be a fresh, unattached JNI. But on a spawned engine, the JNI instance + // It should typically be a fresh, unattached NAPI. But on a spawned engine, the NAPI instance // is already attached to a native shell. In that case, the Java FlutterEngine is created around // an existing shell. if (!this.flutterNapi.isAttached()) { @@ -137,7 +137,7 @@ export default class FlutterEngine implements EngineLifecycleListener{ } private attachToNapi(): void { - Log.d(TAG, "Attaching to JNI."); + Log.d(TAG, "Attaching to NAPI."); this.flutterNapi.attachToNative(); if (!this.isAttachedToNapi()) { @@ -157,7 +157,7 @@ export default class FlutterEngine implements EngineLifecycleListener{ "Spawn can only be called on a fully constructed FlutterEngine"); } - const newFlutterJNI = + const newFlutterNapi = this.flutterNapi.spawn( dartEntrypoint.dartEntrypointFunctionName, dartEntrypoint.dartEntrypointLibrary, @@ -166,7 +166,7 @@ export default class FlutterEngine implements EngineLifecycleListener{ const flutterEngine = new FlutterEngine( context, null, - newFlutterJNI, + newFlutterNapi, platformViewsController ); await flutterEngine.init(context, null, automaticallyRegisterPlugins, waitForRestorationData, null) -- Gitee