Exemple #1
0
 public void startNextSpeaker() {
   if (mCurrentStage != null) {
     mTickTimer.purge();
     mCurrentStage.start(mTickTimer);
     mAlertManager.hideNotification(); // Hide if already showing
     mAlertManager.showNotification(mCurrentStage);
   }
 }
Exemple #2
0
 public void stop() {
   if (getDebateStatus() == DebateStatus.speaking) {
     if (mCurrentStage != null) {
       mAlertManager.hideNotification();
       mCurrentStage.cancel();
     }
   }
 }
Exemple #3
0
  public void release() {
    if (mAlertManager != null) {
      mAlertManager.hideNotification();
    }

    mCurrentStage = null;

    mTickTimer.cancel();
    mTickTimer.purge();
    mTickTimer = null;

    mStages = null;
  }
Exemple #4
0
  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();
  }