import com.android.camera.app.CameraApp;
import com.android.camera.app.CameraServices;
+import com.android.camera.session.CaptureSession;
import com.android.camera.session.CaptureSessionManager;
/**
Log.e(TAG, "Reference to ProcessingTask is null");
return;
}
- task.process(this, getServices(),
- mSessionManager.createNewSession(task.getName(), task.getLocation()));
+ CaptureSession session = task.getSession();
+ if (session == null) {
+ session = mSessionManager.createNewSession(task.getName(), task.getLocation());
+ }
+ task.process(this, getServices(), session);
}
/**
*/
public Location getLocation();
+ /**
+ * @return The CaptureSession if it has been created, or null.
+ */
+ public CaptureSession getSession();
+
/** Sets a listener that is informed when this task is done processing. */
public void setDoneListener(ProcessingTaskDoneListener listener);
}