media/src/main/java/android/support/v4/media/session/MediaControllerCompat.java
public void registerCallback(@NonNull Callback callback, Handler handler) {
        if (callback == null) {
            throw new IllegalArgumentException("callback must not be null");
        }
        if (handler == null) {
            handler = new Handler();
        }
        callback.setHandler(handler);
        mImpl.registerCallback(callback, handler);
        mRegisteredCallbacks.add(callback);
    }
/**
     * Adds a callback to receive updates from the session. Updates will be
     * posted on the specified handler's thread.
     *
     * @param callback The callback object, must not be null.
     * @param handler The handler to post updates on. If null the callers thread
     *            will be used.
     */
Adds a callback to receive updates from the session. Updates will be
posted on the specified handler's thread.

@param callback The callback object, must not be null.
@param handler The handler to post updates on. If null the callers thread
will be used.
Adds a callback to receive updates from the session . Updates will be posted on the specified handler ' s thread . @param callback The callback object must not be null . @param handler The handler to post updates on . If null the callers thread will be used .
public void registerCallback(@NonNull Callback callback, Handler handler) {
        if (callback == null) {
            throw new IllegalArgumentException("callback must not be null");
        }
        if (handler == null) {
            handler = new Handler();
        }
        callback.setHandler(handler);
        mImpl.registerCallback(callback, handler);
        mRegisteredCallbacks.add(callback);
    }
public void registerCallback ( @ NonNull Callback callback , Handler handler ) { if ( callback == null ) { throw new IllegalArgumentException ( "callback must not be null" ) ; } if ( handler == null ) { handler = new Handler ( ) ; } callback . setHandler ( handler ) ; mImpl . registerCallback ( callback , handler ) ; mRegisteredCallbacks . add ( callback ) ; }
Adds a callback to receive updates from the session.
Adds a callback to receive updates from the session .