Class ShadowMimeTypeMap

java.lang.Object
org.robolectric.shadows.ShadowMimeTypeMap

@Deprecated @Implements(android.webkit.MimeTypeMap.class) public class ShadowMimeTypeMap extends Object
Deprecated.
run on Android APIs >= S, which allows the real Android mime type data to be used
Shadow for webkit's MimeTypeMap.

Only needed for APIs < 31. Above that the real mime type mappings are used.

  • Constructor Details

    • ShadowMimeTypeMap

      public ShadowMimeTypeMap()
      Deprecated.
  • Method Details

    • getSingleton

      @Implementation protected static MimeTypeMap getSingleton()
      Deprecated.
    • getMimeTypeFromExtension

      @Implementation protected String getMimeTypeFromExtension(String extension)
      Deprecated.
    • getExtensionFromMimeType

      @Implementation protected String getExtensionFromMimeType(String mimeType)
      Deprecated.
    • addExtensionMimeTypeMapping

      public void addExtensionMimeTypeMapping(String extension, String mimeType)
      Deprecated.
      Adds a mapping between an extension and a mime type.

      Will be ignored when running on SDKs >= S, where a full mime type mapping is already present.

    • clearMappings

      public void clearMappings()
      Deprecated.
      Will clear all built-in mime type mappings, so future calls to APIS like getExtensionFromMimeType will only return data provided manually via addExtensionMimeTypeMapping.

      Use of this API is not recommended! It is only present to support legacy, improperly written tests that fail with valid mime type mappings.

    • hasExtension

      @Implementation protected boolean hasExtension(String extension)
      Deprecated.
    • hasMimeType

      @Implementation protected boolean hasMimeType(String mimeType)
      Deprecated.