public void shutdown() { if (camera != null) { camera.stopPreview(); camera.release(); detectThread.stop(); camera = null; } user.onEyeStopped(); }