Skip to content

Commit 86aa014

Browse files
authored
Fix platform views channel regression (#9185)
This regression was introduced in #7847. The PlatformViewsChannel method call handler was always setting the result to `notImplemented` even after handling a result, this resulted in a "Reply already submitted" exception being thrown. Note that the method channel code is swallowing this exception and logging an error, so we didn't crash instead we were logging an error(this is why the integration test didn't fail). Filed #33863 to make sure tests fail when such exceptions are thrown. This PR also cleans up an unused `NoSuchPlatformViewException` that was introduced in #7847. #33866
1 parent bd358e7 commit 86aa014

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public void onMethodCall(MethodCall call, MethodChannel.Result result) {
5151
case "setDirection":
5252
setDirection(call, result);
5353
break;
54+
default:
55+
result.notImplemented();
5456
}
55-
result.notImplemented();
5657
}
5758

5859
private void create(MethodCall call, MethodChannel.Result result) {
@@ -429,9 +430,4 @@ public static class PlatformViewTouch {
429430
this.flags = flags;
430431
}
431432
}
432-
433-
/**
434-
* The provided platform view ID does not correspond to any existing platform view.
435-
*/
436-
public static class NoSuchPlatformViewException extends IllegalStateException {}
437433
}

0 commit comments

Comments
 (0)