public void registerProgressListener(@NonNull ProgressListener listener){
  progressListenersLock.lock();
  progressListeners.add(new WeakReference<>(listener));
  progressListenersLock.unlock();
}

public void registerProgressListener ( @ NonNull ProgressListener listener ) { progressListenersLock . lock ( ) ; progressListeners . add ( new WeakReference < > ( listener ) ) ; progressListenersLock . unlock ( ) ; }
registers the listener to be notified of progress updates .
