public void stop() { if (getDebateStatus() == DebateStatus.speaking) { if (mCurrentStage != null) { mAlertManager.hideNotification(); mCurrentStage.cancel(); } } }
public void reset() { // Stop current stage timer, if on if (mCurrentStage != null) { mCurrentStage.cancel(); } mCurrentStage = null; mTickTimer.purge(); mTickTimer.cancel(); mTickTimer = new Timer(); mAlertManager.hideNotification(); ListIterator<AlarmChain> stageIterator = mStages.listIterator(); while (stageIterator.hasNext()) { AlarmChain stage = stageIterator.next(); stage.cancel(); stageIterator.set(stage.newCopy()); } mStageIterator = mStages.iterator(); }
public boolean prepareNextSpeaker() { if (mStageIterator.hasNext()) { if (mCurrentStage != null) { mCurrentStage.cancel(); } mCurrentStage = mStageIterator.next(); return true; } else { mCurrentStage = null; } return false; }