diff --git a/api/current.txt b/api/current.txt index 82497e0971a55..9eeccd0640b6e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -20138,6 +20138,7 @@ package android.media { method public int getAttributeInt(java.lang.String, int); method public boolean getLatLong(float[]); method public byte[] getThumbnail(); + method public long[] getThumbnailRange(); method public boolean hasThumbnail(); method public void saveAttributes() throws java.io.IOException; method public void setAttribute(java.lang.String, java.lang.String); diff --git a/api/system-current.txt b/api/system-current.txt index 12c908be6a036..2bec431d951ae 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -21630,6 +21630,7 @@ package android.media { method public int getAttributeInt(java.lang.String, int); method public boolean getLatLong(float[]); method public byte[] getThumbnail(); + method public long[] getThumbnailRange(); method public boolean hasThumbnail(); method public void saveAttributes() throws java.io.IOException; method public void setAttribute(java.lang.String, java.lang.String); diff --git a/api/test-current.txt b/api/test-current.txt index f6e7b4332d4ce..411d22a5b3f56 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -20203,6 +20203,7 @@ package android.media { method public int getAttributeInt(java.lang.String, int); method public boolean getLatLong(float[]); method public byte[] getThumbnail(); + method public long[] getThumbnailRange(); method public boolean hasThumbnail(); method public void saveAttributes() throws java.io.IOException; method public void setAttribute(java.lang.String, java.lang.String); diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java index cd2d51d4dd790..9cad00552f3d0 100644 --- a/media/java/android/media/ExifInterface.java +++ b/media/java/android/media/ExifInterface.java @@ -1079,12 +1079,16 @@ public class ExifInterface { * * @return two-element array, the offset in the first value, and length in * the second, or {@code null} if no thumbnail was found. - * @hide */ public long[] getThumbnailRange() { + if (!mHasThumbnail) { + return null; + } + long[] range = new long[2]; range[0] = mThumbnailOffset; range[1] = mThumbnailLength; + return range; }