diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java index a0118ab8a312b..6e3d6a8cf7820 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java @@ -776,6 +776,10 @@ public class ScreenshotController { } mWindowManager.removeViewImmediate(decorView); } + // Ensure that we remove the input monitor + if (mScreenshotView != null) { + mScreenshotView.stopInputListening(); + } } /** diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java index 3314c75b5a867..6e9f728cb9271 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java @@ -314,7 +314,7 @@ public class ScreenshotView extends FrameLayout implements }); } - private void stopInputListening() { + void stopInputListening() { if (mInputMonitor != null) { mInputMonitor.dispose(); mInputMonitor = null;