commit | d3a70c7dfb3292c72f9bee4cd47a632fc01d5231 | [log] [tgz] |
---|---|---|
author | Chris Banes <chrisbanes@google.com> | Wed Oct 21 15:02:25 2015 +0100 |
committer | Chris Banes <chrisbanes@google.com> | Thu Oct 22 09:07:29 2015 +0000 |
tree | 5dbc4f94885e4d60afe2b799967f72dcdaf4804b | |
parent | f5b80dfabde5ee072d8e679c4f81a402b1b93505 [diff] |
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; }