public void surfaceDestroyed(SurfaceHolder holder) {
    thread.setMode(Mode.STOPPED);

    boolean retry = true;
    while (retry) {
      try {
        thread.join();
        retry = false;
      } catch (InterruptedException e) {
      }
    }
  }
 @Override
 public void surfaceDestroyed(SurfaceHolder holder) {
   boolean retry = true;
   drawThread.setRunning(false);
   while (retry) {
     try {
       drawThread.join();
       retry = false;
     } catch (InterruptedException e) {
     }
   }
 }
 public void surfaceDestroyed(SurfaceHolder holder) {
   boolean retry = true;
   thread.setRunning(false);
   while (retry) {
     try {
       thread.join();
       retry = false;
     } catch (InterruptedException e) {
       // we will try it again and again...
     }
   }
 }
Beispiel #4
0
    @Override
    public void surfaceDestroyed(SurfaceHolder arg0) {
      stop();
      _thread.setRunning(false);
      while (true) {
        try {
          _thread.join();
          break;
        } catch (InterruptedException e) {

        }
      }
    }
Beispiel #5
0
 @Override
 public void surfaceDestroyed(SurfaceHolder arg0) {
   // stop the drawThread properly
   boolean retry = true;
   while (retry) {
     try {
       // wait for it to finish
       if (drawThread != null && drawThread.isRunning()) drawThread.join();
       retry = false;
     } catch (InterruptedException e) {
       // ignore any error
       e.printStackTrace();
     }
   }
   // set it to null, so that a new one can be created in case of a resume
   drawThread = null;
 }