diff options
author | 2021-11-05 13:54:22 +0000 | |
---|---|---|
committer | 2021-11-05 13:54:22 +0000 | |
commit | 35ebc79baf458dd616883917d052df1e8800567f (patch) | |
tree | b87283a2ff93b8c7dc984e05568d1aea2cb2126c | |
parent | 9fef807c68af956aaada762a0f42248fd083d2bf (diff) | |
parent | 02de5054c5691e9425305a73f6210ca2b1cef499 (diff) |
Merge "Ensure screenshot input monitor is always removed"
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java | 4 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java index a0118ab8a312..6e3d6a8cf782 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 3314c75b5a86..6e9f728cb927 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; |