From c3befe008b47c2158d4614adbcd0b8024780681c Mon Sep 17 00:00:00 2001 From: Michael Klimushyn Date: Wed, 12 Feb 2020 13:56:36 -0800 Subject: [PATCH] Fix multiline Javadoc code blocks The formatter didn't understand what was going on here and broke the text. Changed these to use `
{@code }
` instead. --- .../flutter/embedding/android/FlutterActivity.java | 14 ++++++++------ .../flutter/embedding/android/FlutterFragment.java | 12 +++++++----- .../io/flutter/embedding/engine/FlutterJNI.java | 13 ++++++++----- 3 files changed, 23 insertions(+), 16 deletions(-) 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)}