From 2466d31edfb7de79d1380d978e7e6be030391bc3 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Fri, 3 Feb 2017 16:25:25 -0800 Subject: [PATCH] Fix some Javadoc warnings (#3391) --- .../io/flutter/app/FlutterActivity.java | 1 + .../android/io/flutter/view/FlutterMain.java | 6 ++++++ .../android/io/flutter/view/FlutterView.java | 19 ++++++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/app/FlutterActivity.java b/shell/platform/android/io/flutter/app/FlutterActivity.java index 0eed3c317c9..0d4f3c77ca5 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivity.java +++ b/shell/platform/android/io/flutter/app/FlutterActivity.java @@ -146,6 +146,7 @@ public class FlutterActivity extends Activity { /** * Returns the Flutter view used by this activity, may be null before * onCreate was called. + * @return The FlutterView. */ public FlutterView getFlutterView() { return flutterView; diff --git a/shell/platform/android/io/flutter/view/FlutterMain.java b/shell/platform/android/io/flutter/view/FlutterMain.java index 20b90351f2d..0939d3b039d 100644 --- a/shell/platform/android/io/flutter/view/FlutterMain.java +++ b/shell/platform/android/io/flutter/view/FlutterMain.java @@ -121,6 +121,7 @@ public class FlutterMain { /** * Set the tag associated with Flutter app log messages. + * @param tag Log tag. */ public void setLogTag(String tag) { logTag = tag; @@ -129,6 +130,7 @@ public class FlutterMain { /** * Starts initialization of the native system. + * @param applicationContext The Android application context. */ public static void startInitialization(Context applicationContext) { startInitialization(applicationContext, new Settings()); @@ -136,6 +138,8 @@ public class FlutterMain { /** * Starts initialization of the native system. + * @param applicationContext The Android application context. + * @param settings Configuration settings. */ public static void startInitialization(Context applicationContext, Settings settings) { sSettings = settings; @@ -158,6 +162,8 @@ public class FlutterMain { /** * Blocks until initialization of the native system has completed. + * @param applicationContext The Android application context. + * @param args Flags sent to the Flutter runtime. */ public static void ensureInitializationComplete(Context applicationContext, String[] args) { if (sInitialized) { diff --git a/shell/platform/android/io/flutter/view/FlutterView.java b/shell/platform/android/io/flutter/view/FlutterView.java index 91d7ce1a604..7615563f4c3 100644 --- a/shell/platform/android/io/flutter/view/FlutterView.java +++ b/shell/platform/android/io/flutter/view/FlutterView.java @@ -519,7 +519,10 @@ public class FlutterView extends SurfaceView } } - /** Return the most recent frame as a bitmap. */ + /** + * Return the most recent frame as a bitmap. + * @return A bitmap. + */ public Bitmap getBitmap() { return nativeGetBitmap(mNativePlatformView); } @@ -741,6 +744,9 @@ public class FlutterView extends SurfaceView * Send a message to the Flutter application. The Flutter application can * register a platform message handler that will receive these messages with * the PlatformMessages object. + * @param channel Name of the channel that will receive this message. + * @param message Message payload. + * @param callback Callback that receives a reply from the application. */ public void sendPlatformMessage(String channel, String message, MessageReplyCallback callback) { int responseId = 0; @@ -754,6 +760,9 @@ public class FlutterView extends SurfaceView /** * Send a message to the Flutter application. The Flutter Dart code can register a * host message handler that will receive these messages. + * @param channel Name of the channel that will receive this message. + * @param message Message payload. + * @param callback Callback that receives a reply from the application. */ public void sendToFlutter(String channel, String message, MessageReplyCallback callback) { sendPlatformMessage(channel, message, callback); @@ -771,6 +780,8 @@ public class FlutterView extends SurfaceView /** * Register a callback to be invoked when the Flutter application sends a message * to its host. + * @param channel Name of the channel used by the application. + * @param listener Called when messages arrive. */ public void addOnMessageListener(String channel, OnMessageListener listener) { mOnMessageListeners.put(channel, listener); @@ -779,6 +790,8 @@ public class FlutterView extends SurfaceView /** * Register a callback to be invoked when the Flutter application sends a message * to its host. The reply to the message can be provided asynchronously. + * @param channel Name of the channel used by the application. + * @param listener Called when messages arrive. */ public void addOnMessageListenerAsync(String channel, OnMessageListenerAsync listener) { mAsyncOnMessageListeners.put(channel, listener); @@ -787,6 +800,8 @@ public class FlutterView extends SurfaceView public interface OnMessageListener { /** * Called when a message is received from the Flutter app. + * @param view The Flutter view hosting the app. + * @param message Message payload. * @return the reply to the message (can be null) */ String onMessage(FlutterView view, String message); @@ -795,6 +810,8 @@ public class FlutterView extends SurfaceView public interface OnMessageListenerAsync { /** * Called when a message is received from the Flutter app. + * @param view The Flutter view hosting the app. + * @param message Message payload. * @param response Used to send a reply back to the app. */ void onMessage(FlutterView view, String message, MessageResponse response);