Class ShadowMediaBrowserCompat

java.lang.Object
org.robolectric.shadows.support.v4.ShadowMediaBrowserCompat

@Implements(android.support.v4.media.MediaBrowserCompat.class)
@Deprecated
public class ShadowMediaBrowserCompat
extends Object
Deprecated.
This will mimic the connection to a MediaBrowserServiceCompat by creating and maintaining its own account of MediaBrowserCompat.MediaItems.
  • Constructor Summary

    Constructors 
    Constructor Description
    ShadowMediaBrowserCompat()
    Deprecated.
     
  • Method Summary

    Modifier and Type Method Description
    protected void __constructor__​(Context context, ComponentName serviceComponent, android.support.v4.media.MediaBrowserCompat.ConnectionCallback callback, Bundle rootHints)
    Deprecated.
     
    protected void connect()
    Deprecated.
     
    android.support.v4.media.MediaBrowserCompat.MediaItem createMediaItem​(String parentId, String mediaId, String title, int flag)
    Deprecated.
    Creates a MediaItem and returns it.
    protected void disconnect()
    Deprecated.
     
    Map<android.support.v4.media.MediaBrowserCompat.MediaItem,​List<android.support.v4.media.MediaBrowserCompat.MediaItem>> getCopyOfMediaItemChildren()
    Deprecated.
     
    protected void getItem​(String mediaId, android.support.v4.media.MediaBrowserCompat.ItemCallback cb)
    Deprecated.
     
    protected String getRoot()
    Deprecated.
     
    android.support.v4.media.session.MediaSessionCompat.Token getSessionToken()
    Deprecated.
     
    protected boolean isConnected()
    Deprecated.
     
    protected void search​(String query, Bundle extras, android.support.v4.media.MediaBrowserCompat.SearchCallback callback)
    Deprecated.
    This differs from real Android search logic.
    void setRootId​(String mediaId)
    Deprecated.
    Sets the root id.
    protected void subscribe​(String parentId, Bundle options, android.support.v4.media.MediaBrowserCompat.SubscriptionCallback callback)
    Deprecated.
     
    protected void subscribe​(String parentId, android.support.v4.media.MediaBrowserCompat.SubscriptionCallback callback)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • __constructor__

      @Implementation protected void __constructor__​(Context context, ComponentName serviceComponent, android.support.v4.media.MediaBrowserCompat.ConnectionCallback callback, Bundle rootHints)
      Deprecated.
    • connect

      @Implementation protected void connect()
      Deprecated.
    • disconnect

      @Implementation protected void disconnect()
      Deprecated.
    • isConnected

      @Implementation protected boolean isConnected()
      Deprecated.
    • getRoot

      @Implementation protected String getRoot()
      Deprecated.
    • getItem

      @Implementation protected void getItem​(@NonNull String mediaId, @NonNull android.support.v4.media.MediaBrowserCompat.ItemCallback cb)
      Deprecated.
    • subscribe

      @Implementation protected void subscribe​(@NonNull String parentId, @NonNull android.support.v4.media.MediaBrowserCompat.SubscriptionCallback callback)
      Deprecated.
    • subscribe

      @Implementation protected void subscribe​(@NonNull String parentId, @Nullable Bundle options, @NonNull android.support.v4.media.MediaBrowserCompat.SubscriptionCallback callback)
      Deprecated.
    • search

      @Implementation protected void search​(@NonNull String query, Bundle extras, @NonNull android.support.v4.media.MediaBrowserCompat.SearchCallback callback)
      Deprecated.
      This differs from real Android search logic. Search results will contain all MediaBrowserCompat.MediaItem's with a title that {@param query} is a substring of.
    • getSessionToken

      @Implementation public android.support.v4.media.session.MediaSessionCompat.Token getSessionToken()
      Deprecated.
    • setRootId

      public void setRootId​(String mediaId)
      Deprecated.
      Sets the root id. Can be called more than once.
      Parameters:
      mediaId - the id of the root MediaItem. This MediaItem should already have been created.
    • createMediaItem

      public android.support.v4.media.MediaBrowserCompat.MediaItem createMediaItem​(String parentId, String mediaId, String title, int flag)
      Deprecated.
      Creates a MediaItem and returns it.
      Parameters:
      parentId - the id of the parent MediaItem. If the MediaItem to be created will be the root, parentId should be null.
      mediaId - the id of the MediaItem to be created.
      title - the title of the MediaItem to be created.
      flag - says if the MediaItem to be created is browsable and/or playable.
      Returns:
      the newly created MediaItem.
    • getCopyOfMediaItemChildren

      public Map<android.support.v4.media.MediaBrowserCompat.MediaItem,​List<android.support.v4.media.MediaBrowserCompat.MediaItem>> getCopyOfMediaItemChildren()
      Deprecated.
      Returns:
      a copy of the internal Map that maps MediaBrowserCompat.MediaItems to their children.