private void dismissDialog() { if (mDecor == null || !mShowing) { return; } ViewRoot.mDialogCount -= 1; try { mWindowManager.removeView(mDecor); } finally { mDecor = null; mWindow.closeAllPanels(); onStop(); mShowing = false; sendDismissMessage(); } }
void dismissDialog() { if (mDecor == null || !mShowing) { return; } if (mWindow.isDestroyed()) { Log.e(TAG, "Tried to dismissDialog() but the Dialog's window was already destroyed!"); return; } try { mWindowManager.removeViewImmediate(mDecor); } finally { if (mActionMode != null) { mActionMode.finish(); } mDecor = null; mWindow.closeAllPanels(); onStop(); mShowing = false; Log.d(TAG, "dismissDialog"); sendDismissMessage(); } }