public void waitForStop(){
synchronized (mStopLock) {
    while (!mStopped) {
      try {
        mStopLock.wait();
      }
 catch (      InterruptedException ie) {
      }
    }
  }
}

public void waitForStop ( ) { synchronized ( mStopLock ) { while ( ! mStopped ) { try { mStopLock . wait ( ) ; } catch ( InterruptedException ie ) { } } } }
wait for the player to stop . < p > called from any thread other than the playtask thread .
