From 645ef546e358ac9b7a8c08bcc23c0753a8c4ef86 Mon Sep 17 00:00:00 2001 From: Jia Hao Goh Date: Wed, 20 Jul 2022 12:44:53 +0800 Subject: [PATCH 1/4] Javadoc for background platform chnanels --- .../io/flutter/plugin/common/MethodChannel.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java index c13f82d2beb1f..4cb5ea494e635 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java @@ -173,8 +173,10 @@ public interface MethodCallHandler { *

Any uncaught exception thrown by this method will be caught by the channel implementation * and logged, and an error result will be sent back to Flutter. * - *

The handler is called on the platform thread (Android main thread). For more details see - * Threading in + *

The handler is called on the platform thread (Android main thread) by default, or + * otherwise on the thread specified by the task queue provided to the associated {@link + * MethodChannel} when it was created. See also Threading in * the Flutter Engine. * * @param call A {@link MethodCall}. @@ -190,10 +192,7 @@ public interface MethodCallHandler { * Flutter methods provide implementations of this interface for handling results received from * Flutter. * - *

All methods of this class must be called on the platform thread (Android main thread). For - * more details see Threading in the - * Flutter Engine. + *

All methods of this class can be invoked on any thread. */ public interface Result { /** From a0ec5ec30ef147a7d9b064110641030d72bec523 Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Fri, 22 Jul 2022 07:25:46 +0800 Subject: [PATCH 2/4] Update broken link --- .../android/io/flutter/plugin/common/MethodChannel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java index 4cb5ea494e635..dc56b6cfddf92 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java @@ -176,7 +176,7 @@ public interface MethodCallHandler { *

The handler is called on the platform thread (Android main thread) by default, or * otherwise on the thread specified by the task queue provided to the associated {@link * MethodChannel} when it was created. See also Threading in + * href="https://github.com/flutter/flutter/wiki/The-Engine-architecture#threading>Threading in * the Flutter Engine. * * @param call A {@link MethodCall}. From 93e817e6813f6304b9a75c95d7addf902b01c06a Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Fri, 22 Jul 2022 08:00:58 +0800 Subject: [PATCH 3/4] Fix typo --- .../android/io/flutter/plugin/common/MethodChannel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java index dc56b6cfddf92..4e72bf9c41f5c 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java @@ -176,7 +176,7 @@ public interface MethodCallHandler { *

The handler is called on the platform thread (Android main thread) by default, or * otherwise on the thread specified by the task queue provided to the associated {@link * MethodChannel} when it was created. See also Threading in * the Flutter Engine. * * @param call A {@link MethodCall}. From 63bd65f9012b58076ee4b26ab259df1ccd9ea01a Mon Sep 17 00:00:00 2001 From: Jia Hao Goh Date: Mon, 1 Aug 2022 18:02:17 +0800 Subject: [PATCH 4/4] Link to TaskQueue --- .../android/io/flutter/plugin/common/MethodChannel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java index 4e72bf9c41f5c..9949167a7ce03 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java @@ -174,8 +174,8 @@ public interface MethodCallHandler { * and logged, and an error result will be sent back to Flutter. * *

The handler is called on the platform thread (Android main thread) by default, or - * otherwise on the thread specified by the task queue provided to the associated {@link - * MethodChannel} when it was created. See also Threading in * the Flutter Engine. *