public void surfaceDestroyed(SurfaceHolder arg0) { boolean retry = true; canvasThread.setRunning(false); while (retry) { try { canvasThread.join(); retry = false; } catch (InterruptedException e) { e.printStackTrace(); } } }
public void surfaceDestroyed(SurfaceHolder holder) { // TODO Auto-generated method stub boolean retry = true; canvasthread.setRunning(false); while (retry) { try { canvasthread.join(); retry = false; } catch (InterruptedException e) { // we will try it again and again... } } }
private void stopThread() { try { if (mainLoop != null) { boolean result = true; setRunning(false); while (result) { try { mainLoop.join(); result = false; } catch (InterruptedException e) { } } } } catch (Exception e) { } }