paging/common/src/main/java/androidx/paging/PagedList.java
@SuppressWarnings("WeakerAccess")
    public void removeWeakCallback(@NonNull Callback callback) {
        for (int i = mCallbacks.size() - 1; i >= 0; i--) {
            Callback currentCallback = mCallbacks.get(i).get();
            if (currentCallback == null || currentCallback == callback) {
                // found callback, or empty weak ref
                mCallbacks.remove(i);
            }
        }
    }
/**
     * Removes a previously added callback.
     *
     * @param callback Callback, previously added.
     * @see #addWeakCallback(List, Callback)
     */
Removes a previously added callback.
@param callback Callback, previously added.
Removes a previously added callback . @param callback Callback previously added .
@SuppressWarnings("WeakerAccess")
    public void removeWeakCallback(@NonNull Callback callback) {
        for (int i = mCallbacks.size() - 1; i >= 0; i--) {
            Callback currentCallback = mCallbacks.get(i).get();
            if (currentCallback == null || currentCallback == callback) {
                mCallbacks.remove(i);
            }
        }
    }
@ SuppressWarnings ( "WeakerAccess" ) public void removeWeakCallback ( @ NonNull Callback callback ) { for ( int i = mCallbacks . size ( ) - 1 ; i >= 0 ; i -- ) { Callback currentCallback = mCallbacks . get ( i ) . get ( ) ; if ( currentCallback == null || currentCallback == callback ) { mCallbacks . remove ( i ) ; } } }
Removes a previously added callback.
Removes a previously added callback .
// found callback, or empty weak ref