private void finished(){
  mViewCountdown.clearAnimation();
  animationStarted=false;
  mViewCountdown.setTextColor(Color.WHITE);
  mViewCountdown.setTypeface(Typeface.DEFAULT);
  if (mViewPlayAgainBackground.getVisibility() != View.VISIBLE && !wasPaused) {
    wasPaused=true;
    submitScore(MatchingGameConstants.LEADERBOARDS_GUMBALL,mMatchScore);
    if (mBackgroundMusic != null) {
      mBackgroundMusic.stop();
      mBackgroundMusic.release();
      mBackgroundMusic=null;
    }
    mViewPlayAgainScore.setText(String.valueOf(mMatchScore));
    mViewPlayAgainBackground.startAnimation(mAnimationPlayAgainBackground);
    mViewPlayAgainMain.startAnimation(mAnimationPlayAgainMain);
    mViewPlayAgainBackground.setVisibility(View.VISIBLE);
    mViewPlayAgainMain.setVisibility(View.VISIBLE);
    mViewMainMenuButton.setVisibility(View.VISIBLE);
    mViewInviteButton.setVisibility(View.VISIBLE);
    setSignInButtonVisibility(true);
    mSoundPool.play(mSoundGameOver,.2f,.2f,0,0,1.0f);
  }
  cancel();
}

private void finished ( ) { mViewCountdown . clearAnimation ( ) ; animationStarted = false ; mViewCountdown . setTextColor ( Color . WHITE ) ; mViewCountdown . setTypeface ( Typeface . DEFAULT ) ; if ( mViewPlayAgainBackground . getVisibility ( ) != View . VISIBLE && ! wasPaused ) { wasPaused = true ; submitScore ( MatchingGameConstants . LEADERBOARDS_GUMBALL , mMatchScore ) ; if ( mBackgroundMusic != null ) { mBackgroundMusic . stop ( ) ; mBackgroundMusic . release ( ) ; mBackgroundMusic = null ; } mViewPlayAgainScore . setText ( String . valueOf ( mMatchScore ) ) ; mViewPlayAgainBackground . startAnimation ( mAnimationPlayAgainBackground ) ; mViewPlayAgainMain . startAnimation ( mAnimationPlayAgainMain ) ; mViewPlayAgainBackground . setVisibility ( View . VISIBLE ) ; mViewPlayAgainMain . setVisibility ( View . VISIBLE ) ; mViewMainMenuButton . setVisibility ( View . VISIBLE ) ; mViewInviteButton . setVisibility ( View . VISIBLE ) ; setSignInButtonVisibility ( true ) ; mSoundPool . play ( mSoundGameOver , .2f , .2f , 0 , 0 , 1.0f ) ; } cancel ( ) ; }
shut down the count down timer . cancel all pending animations and display the ' play again ' screen .
