From 72e298e3267cbcf39cda4b4b8e49fbbf78b6270b Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 22 Jul 2020 16:41:06 -0700 Subject: [PATCH] Add missing MouseCursorPlugin destroy call Fixes https://github.com/flutter/flutter/issues/61558 --- .../android/io/flutter/embedding/android/FlutterView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterView.java b/shell/platform/android/io/flutter/embedding/android/FlutterView.java index 8cf69c24cf568..4a1517f9f3665 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterView.java @@ -936,6 +936,10 @@ public void detachFromFlutterEngine() { textInputPlugin.getInputMethodManager().restartInput(this); textInputPlugin.destroy(); + if (mouseCursorPlugin != null) { + mouseCursorPlugin.destroy(); + } + // Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface. FlutterRenderer flutterRenderer = flutterEngine.getRenderer(); isFlutterUiDisplayed = false;