public void stopAnimation() { Log.d(LOG_TAG, "stopAnimation"); if (dt != null) { dt.flag = false; Thread t = dt; dt = null; t.interrupt(); } }
public void surfaceDestroyed(SurfaceHolder holder) { if (dt != null) { dt.flag = false; dt = null; } }