class MediaBrowser2 extends MediaController2 {

    public void search(@NonNull String query, @Nullable Bundle extras) {
        MediaBrowserCompat browser = getBrowserCompat();
        if (browser == null) {
            return;
        }
        browser.search(query, extras, new MediaBrowserCompat.SearchCallback() {
            @Override
            public void onSearchResult(final String query, final Bundle extras,
                    final List<MediaItem> items) {
                getCallbackExecutor().execute(new Runnable() {
                    @Override
                    public void run() {
                        getCallback().onSearchResultChanged(
                                MediaBrowser2.this, query, items.size(), extras);
                    }
                });
            }

            @Override
            public void onError(final String query, final Bundle extras) {
                // Currently no way to tell failures in MediaBrowser2#search().
            }
        });
    }

    public  MediaBrowser2(@NonNull Context context, @NonNull SessionToken2 token,
            @NonNull /*@CallbackExecutor*/ Executor executor, @NonNull BrowserCallback callback);

}