Fixes #1994125. Ensures AbsListView's filter window is always dismissed.
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 777beed..eea97dc 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -1535,6 +1535,9 @@
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
+ // Dismiss the popup in case onSaveInstanceState() was not invoked
+ dismissPopup();
+
final ViewTreeObserver treeObserver = getViewTreeObserver();
if (treeObserver != null) {
treeObserver.removeOnTouchModeChangeListener(this);