mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix some Javadoc warnings (#3391)
This commit is contained in:
parent
cd34b0ef39
commit
2466d31edf
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user