private void hideUndoBar(boolean animate, MotionEvent event) { if (mUndoBar != null) { if (event != null && mUndoBar.isEventInToastBar(event)) { // Avoid touches inside the undo bar. return; } mUndoBar.hide(animate); } mDeletedAlarm = null; mUndoShowing = false; }