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... } } }
public void setDrawPriority(int drawPriority) { if (drawPriority >= 0 && drawPriority <= 10) { this.drawPriority = drawPriority; if (mainLoop != null) { try { mainLoop.setPriority(drawPriority); } catch (Exception e) { } } } }
public final Bitmap getImage() { if (handler != null && !LSystem.AUTO_REPAINT && handler.getRepaintMode() == Screen.SCREEN_NOT_REPAINT) { return currentScreen; } else { if (mainLoop != null) { mainLoop.updateCapture(currentScreen); } return currentScreen; } }
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) { } }
public void startDrawImage() { canvasThread.setRunning(true); canvasThread.start(); }
public void surfaceCreated(SurfaceHolder holder) { // TODO Auto-generated method stub canvasthread.setRunning(true); canvasthread.start(); }