Skip to content

Commit 7c67573

Browse files
author
Michael Klimushyn
authored
Fix multiline Javadoc code blocks (flutter#16565)
The formatter didn't understand what was going on here and broke the text. Changed these to use `<pre>{@code }</pre>` instead.
1 parent 13dce50 commit 7c67573

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

shell/platform/android/io/flutter/embedding/android/FlutterActivity.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@
107107
*
108108
* <p>The following illustrates how to pre-warm and cache a {@link FlutterEngine}:
109109
*
110-
* <p>{@code // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
111-
* FlutterEngine(context); flutterEngine .getDartExecutor()
112-
* .executeDartEntrypoint(DartEntrypoint.createDefault());
113-
*
114-
* <p>// Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
115-
* FlutterEngineCache.getInstance().put("my_engine", flutterEngine); }
110+
* <pre>{@code
111+
* // Create and pre-warm a FlutterEngine.
112+
* FlutterEngine flutterEngine = new FlutterEngine(context);
113+
* flutterEngine.getDartExecutor().executeDartEntrypoint(DartEntrypoint.createDefault());
114+
*
115+
* // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
116+
* FlutterEngineCache.getInstance().put("my_engine", flutterEngine);
117+
* }</pre>
116118
*
117119
* <p><strong>Alternatives to FlutterActivity</strong>
118120
*

shell/platform/android/io/flutter/embedding/android/FlutterFragment.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@
6767
*
6868
* <p>The following illustrates how to pre-warm and cache a {@link FlutterEngine}:
6969
*
70-
* <p>{@code // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
71-
* FlutterEngine(context); flutterEngine .getDartExecutor()
72-
* .executeDartEntrypoint(DartEntrypoint.createDefault());
70+
* <pre>{@code
71+
* // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
72+
* FlutterEngine(context);
73+
* flutterEngine.getDartExecutor().executeDartEntrypoint(DartEntrypoint.createDefault());
7374
*
74-
* <p>// Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
75-
* FlutterEngineCache.getInstance().put("my_engine", flutterEngine); }
75+
* // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
76+
* FlutterEngineCache.getInstance().put("my_engine", flutterEngine);
77+
* }</pre>
7678
*
7779
* <p>If Flutter is needed in a location that can only use a {@code View}, consider using a {@link
7880
* FlutterView}. Using a {@link FlutterView} requires forwarding some calls from an {@code

shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@
5656
* <p>To connect part of an Android app to Flutter's C/C++ engine, instantiate a {@code FlutterJNI}
5757
* and then attach it to the native side:
5858
*
59-
* <p>{@code // Instantiate FlutterJNI and attach to the native side. FlutterJNI flutterJNI = new
60-
* FlutterJNI(); flutterJNI.attachToNative();
59+
* <pre>{@code
60+
* // Instantiate FlutterJNI and attach to the native side.
61+
* FlutterJNI flutterJNI = new FlutterJNI();
62+
* flutterJNI.attachToNative();
6163
*
62-
* <p>// Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
64+
* // Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
6365
*
64-
* <p>// Destroy the connection to the native side and cleanup.
65-
* flutterJNI.detachFromNativeAndReleaseResources(); }
66+
* // Destroy the connection to the native side and cleanup.
67+
* flutterJNI.detachFromNativeAndReleaseResources();
68+
* }</pre>
6669
*
6770
* <p>To provide a visual, interactive surface for Flutter rendering and touch events, register a
6871
* {@link RenderSurface} with {@link #setRenderSurface(RenderSurface)}

0 commit comments

Comments
 (0)