private void commitDiscard(long time,boolean allowDiscard){
  if (mDiscardingTab == null)   return;
  assert mStackTabs != null;
  StackTab discarded=mDiscardingTab;
  if (Math.abs(discarded.getDiscardAmount()) / getDiscardRange() > DISCARD_COMMIT_THRESHOLD && allowDiscard) {
    mLayout.uiRequestingCloseTab(time,discarded.getId());
    RecordUserAction.record("MobileStackViewSwipeCloseTab");
    RecordUserAction.record("MobileTabClosed");
  }
 else {
    startAnimation(time,OverviewAnimationType.UNDISCARD);
  }
  mDiscardingTab=null;
  requestUpdate();
}

private void commitDiscard ( long time , boolean allowDiscard ) { if ( mDiscardingTab == null ) return ; assert mStackTabs != null ; StackTab discarded = mDiscardingTab ; if ( Math . abs ( discarded . getDiscardAmount ( ) ) / getDiscardRange ( ) > DISCARD_COMMIT_THRESHOLD && allowDiscard ) { mLayout . uiRequestingCloseTab ( time , discarded . getId ( ) ) ; RecordUserAction . record ( "MobileStackViewSwipeCloseTab" ) ; RecordUserAction . record ( "MobileTabClosed" ) ; } else { startAnimation ( time , OverviewAnimationType . UNDISCARD ) ; } mDiscardingTab = null ; requestUpdate ( ) ; }
commits or release the that currently being considered for discard . this function also triggers the associated animations .
