diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java index 6b6be2e0af14c..31105bea8139f 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java @@ -107,12 +107,14 @@ * *
The following illustrates how to pre-warm and cache a {@link FlutterEngine}: * - *
{@code // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new - * FlutterEngine(context); flutterEngine .getDartExecutor() - * .executeDartEntrypoint(DartEntrypoint.createDefault()); - * - *
// Cache the pre-warmed FlutterEngine in the FlutterEngineCache. - * FlutterEngineCache.getInstance().put("my_engine", flutterEngine); } + *
{@code
+ * // Create and pre-warm a FlutterEngine.
+ * FlutterEngine flutterEngine = new FlutterEngine(context);
+ * flutterEngine.getDartExecutor().executeDartEntrypoint(DartEntrypoint.createDefault());
+ *
+ * // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
+ * FlutterEngineCache.getInstance().put("my_engine", flutterEngine);
+ * }
*
* Alternatives to FlutterActivity * diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java b/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java index be3e3a6fc1284..70bf2b5b76a17 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java @@ -67,12 +67,14 @@ * *
The following illustrates how to pre-warm and cache a {@link FlutterEngine}: * - *
{@code // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new - * FlutterEngine(context); flutterEngine .getDartExecutor() - * .executeDartEntrypoint(DartEntrypoint.createDefault()); + *
{@code
+ * // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
+ * FlutterEngine(context);
+ * flutterEngine.getDartExecutor().executeDartEntrypoint(DartEntrypoint.createDefault());
*
- * // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
- * FlutterEngineCache.getInstance().put("my_engine", flutterEngine); }
+ * // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
+ * FlutterEngineCache.getInstance().put("my_engine", flutterEngine);
+ * }
*
* If Flutter is needed in a location that can only use a {@code View}, consider using a {@link * FlutterView}. Using a {@link FlutterView} requires forwarding some calls from an {@code diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java index 514f94d24c0be..183f42c615943 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java @@ -56,13 +56,16 @@ *
To connect part of an Android app to Flutter's C/C++ engine, instantiate a {@code FlutterJNI} * and then attach it to the native side: * - *
{@code // Instantiate FlutterJNI and attach to the native side. FlutterJNI flutterJNI = new - * FlutterJNI(); flutterJNI.attachToNative(); + *
{@code
+ * // Instantiate FlutterJNI and attach to the native side.
+ * FlutterJNI flutterJNI = new FlutterJNI();
+ * flutterJNI.attachToNative();
*
- * // Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
+ * // Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
*
- *
// Destroy the connection to the native side and cleanup.
- * flutterJNI.detachFromNativeAndReleaseResources(); }
+ * // Destroy the connection to the native side and cleanup.
+ * flutterJNI.detachFromNativeAndReleaseResources();
+ * }
*
* To provide a visual, interactive surface for Flutter rendering and touch events, register a * {@link RenderSurface} with {@link #setRenderSurface(RenderSurface)}