@Override
    public void addListener(LifecycleListener listener) {
        lifecycleListeners.add(listener);

        if (isDestroyed) {
            listener.onDestroy();
        } else if (isStarted) {
            listener.onStart();
        } else {
            listener.onStop();
        }
    }
Adds the given listener to the list of listeners to be notified on each lifecycle event.

<p>
    The latest lifecycle event will be called on the given listener synchronously in this method. If the
    activity or fragment is stopped, {@link LifecycleListener#onStop()}} will be called, and same for onStart and
    onDestroy.
</p>

<p>
    Note - {@link LifecycleListener}s that are added more than once will have their
    lifecycle methods called more than once. It is the caller's responsibility to avoid adding listeners
    multiple times.
</p>
core/src/main/java/com/bumptech/glide/manager/ActivityFragmentLifecycle.java