/** * Remove and stop all sources in the pipeline. */ public void clearSources() { for (VehicleDataSource mSource : mSources) { (mSource).stop(); } mSources.clear(); }
/** * Remove a previously added source from the pipeline. * * Once removed, the source should no longer use this pipeline for its * callback. * * @param source if the value is null, it is ignored. */ public void removeSource(VehicleDataSource source) { if(source != null) { mSources.remove(source); source.stop(); } }