Package org.robolectric.shadows
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtensionMimeTypeMapping
(String extension, String mimeType) Deprecated.Adds a mapping between an extension and a mime type.void
Deprecated.Will clear all built-in mime type mappings, so future calls to APIS like getExtensionFromMimeType will only return data provided manually via addExtensionMimeTypeMapping.protected String
getExtensionFromMimeType
(String mimeType) Deprecated.protected String
getMimeTypeFromExtension
(String extension) Deprecated.protected static MimeTypeMap
Deprecated.protected boolean
hasExtension
(String extension) Deprecated.protected boolean
hasMimeType
(String mimeType) Deprecated.
-
Constructor Details
-
ShadowMimeTypeMap
public ShadowMimeTypeMap()Deprecated.
-
-
Method Details
-
getSingleton
Deprecated. -
getMimeTypeFromExtension
Deprecated. -
getExtensionFromMimeType
Deprecated. -
addExtensionMimeTypeMapping
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
Deprecated. -
hasMimeType
Deprecated.
-