Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23968,6 +23968,7 @@ package android.media { method @Nullable public long[] getThumbnailRange(); method public boolean hasAttribute(@NonNull String); method public boolean hasThumbnail(); method public static boolean isSupportedMimeType(@NonNull String); method public boolean isThumbnailCompressed(); method public void saveAttributes() throws java.io.IOException; method public void setAttribute(@NonNull String, @Nullable String); media/java/android/media/ExifInterface.java +32 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TimeZone; Loading Loading @@ -1450,6 +1451,37 @@ public class ExifInterface { loadAttributes(inputStream); } /** * Returns whether ExifInterface currently supports parsing data from the specified mime type * or not. * * @param mimeType the string value of mime type */ public static boolean isSupportedMimeType(@NonNull String mimeType) { if (mimeType == null) { throw new NullPointerException("mimeType shouldn't be null"); } switch (mimeType.toLowerCase(Locale.ROOT)) { case "image/jpeg": case "image/x-adobe-dng": case "image/x-canon-cr2": case "image/x-nikon-nef": case "image/x-nikon-nrw": case "image/x-sony-arw": case "image/x-panasonic-rw2": case "image/x-olympus-orf": case "image/x-pentax-pef": case "image/x-samsung-srw": case "image/x-fuji-raf": case "image/heic": case "image/heif": return true; default: return false; } } /** * Returns the EXIF attribute of the specified tag or {@code null} if there is no such tag in * the image file. Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23968,6 +23968,7 @@ package android.media { method @Nullable public long[] getThumbnailRange(); method public boolean hasAttribute(@NonNull String); method public boolean hasThumbnail(); method public static boolean isSupportedMimeType(@NonNull String); method public boolean isThumbnailCompressed(); method public void saveAttributes() throws java.io.IOException; method public void setAttribute(@NonNull String, @Nullable String);
media/java/android/media/ExifInterface.java +32 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TimeZone; Loading Loading @@ -1450,6 +1451,37 @@ public class ExifInterface { loadAttributes(inputStream); } /** * Returns whether ExifInterface currently supports parsing data from the specified mime type * or not. * * @param mimeType the string value of mime type */ public static boolean isSupportedMimeType(@NonNull String mimeType) { if (mimeType == null) { throw new NullPointerException("mimeType shouldn't be null"); } switch (mimeType.toLowerCase(Locale.ROOT)) { case "image/jpeg": case "image/x-adobe-dng": case "image/x-canon-cr2": case "image/x-nikon-nef": case "image/x-nikon-nrw": case "image/x-sony-arw": case "image/x-panasonic-rw2": case "image/x-olympus-orf": case "image/x-pentax-pef": case "image/x-samsung-srw": case "image/x-fuji-raf": case "image/heic": case "image/heif": return true; default: return false; } } /** * Returns the EXIF attribute of the specified tag or {@code null} if there is no such tag in * the image file. Loading