Swallow exception caused by dismissing action mode

BUG: 23467286
Change-Id: I3057e7cc772a6fd40609fa41a5de38d3f25342a5
diff --git a/v7/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java b/v7/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java
index 72f2af7..fbc56ab 100644
--- a/v7/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java
+++ b/v7/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java
@@ -1652,7 +1652,12 @@
         if (mActionModePopup != null) {
             mWindowDecor.removeCallbacks(mShowActionModePopup);
             if (mActionModePopup.isShowing()) {
-                mActionModePopup.dismiss();
+                try {
+                    mActionModePopup.dismiss();
+                } catch (IllegalArgumentException e) {
+                    // Pre-v18, there are times when the Window will remove the popup before us.
+                    // In these cases we need to swallow the resulting exception.
+                }
             }
             mActionModePopup = null;
         }