Skip to content

Commit

Permalink
Fix some Javadoc warnings (flutter#3391)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Feb 4, 2017
1 parent cd34b0e commit 2466d31
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions shell/platform/android/io/flutter/app/FlutterActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public boolean loadIntent(Intent intent) {
/**
* Returns the Flutter view used by this activity, may be null before
* onCreate was called.
* @return The FlutterView.
*/
public FlutterView getFlutterView() {
return flutterView;
Expand Down
6 changes: 6 additions & 0 deletions shell/platform/android/io/flutter/view/FlutterMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public String getLogTag() {

/**
* Set the tag associated with Flutter app log messages.
* @param tag Log tag.
*/
public void setLogTag(String tag) {
logTag = tag;
Expand All @@ -129,13 +130,16 @@ public void setLogTag(String tag) {

/**
* Starts initialization of the native system.
* @param applicationContext The Android application context.
*/
public static void startInitialization(Context applicationContext) {
startInitialization(applicationContext, new Settings());
}

/**
* 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;
Expand All @@ -158,6 +162,8 @@ public static void startInitialization(Context applicationContext, Settings sett

/**
* 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) {
Expand Down
19 changes: 18 additions & 1 deletion shell/platform/android/io/flutter/view/FlutterView.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,10 @@ public void run() {
}
}

/** 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);
}
Expand Down Expand Up @@ -741,6 +744,9 @@ private boolean handleAccessibilityHoverEvent(MotionEvent event) {
* 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;
Expand All @@ -754,6 +760,9 @@ public void sendPlatformMessage(String channel, String message, MessageReplyCall
/**
* 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);
Expand All @@ -771,6 +780,8 @@ public interface MessageReplyCallback {
/**
* 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);
Expand All @@ -779,6 +790,8 @@ public void addOnMessageListener(String channel, OnMessageListener listener) {
/**
* 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);
Expand All @@ -787,6 +800,8 @@ public void addOnMessageListenerAsync(String channel, OnMessageListenerAsync lis
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);
Expand All @@ -795,6 +810,8 @@ public interface OnMessageListener {
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);
Expand Down

0 comments on commit 2466d31

Please sign in to comment.