Merge "Ensure screenshot input monitor is always removed" into sc-v2-dev

This commit is contained in:
Miranda Kephart
2021-11-08 15:56:28 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 1 deletions

View File

@@ -780,6 +780,10 @@ public class ScreenshotController {
}
mWindowManager.removeViewImmediate(decorView);
}
// Ensure that we remove the input monitor
if (mScreenshotView != null) {
mScreenshotView.stopInputListening();
}
}
/**

View File

@@ -315,7 +315,7 @@ public class ScreenshotView extends FrameLayout implements
});
}
private void stopInputListening() {
void stopInputListening() {
if (mInputMonitor != null) {
mInputMonitor.dispose();
mInputMonitor = null;