Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -23126,6 +23126,7 @@ package android.mtp { field public static final int OPERATION_GET_OBJECT_PROP_VALUE = 38915; // 0x9803 field public static final int OPERATION_GET_OBJECT_REFERENCES = 38928; // 0x9810 field public static final int OPERATION_GET_PARTIAL_OBJECT = 4123; // 0x101b field public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 38337; // 0x95c1 field public static final int OPERATION_GET_STORAGE_INFO = 4101; // 0x1005 field public static final int OPERATION_GET_STORAGE_I_DS = 4100; // 0x1004 field public static final int OPERATION_GET_THUMB = 4106; // 0x100a Loading Loading @@ -23163,6 +23164,7 @@ package android.mtp { method public android.mtp.MtpObjectInfo getObjectInfo(int); method public long getParent(int); method public long getPartialObject(int, long, long, byte[]) throws java.io.IOException; method public long getPartialObject64(int, long, long, byte[]) throws java.io.IOException; method public long getStorageId(int); method public int[] getStorageIds(); method public android.mtp.MtpStorageInfo getStorageInfo(int); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -24545,6 +24545,7 @@ package android.mtp { field public static final int OPERATION_GET_OBJECT_PROP_VALUE = 38915; // 0x9803 field public static final int OPERATION_GET_OBJECT_REFERENCES = 38928; // 0x9810 field public static final int OPERATION_GET_PARTIAL_OBJECT = 4123; // 0x101b field public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 38337; // 0x95c1 field public static final int OPERATION_GET_STORAGE_INFO = 4101; // 0x1005 field public static final int OPERATION_GET_STORAGE_I_DS = 4100; // 0x1004 field public static final int OPERATION_GET_THUMB = 4106; // 0x100a Loading Loading @@ -24582,6 +24583,7 @@ package android.mtp { method public android.mtp.MtpObjectInfo getObjectInfo(int); method public long getParent(int); method public long getPartialObject(int, long, long, byte[]) throws java.io.IOException; method public long getPartialObject64(int, long, long, byte[]) throws java.io.IOException; method public long getStorageId(int); method public int[] getStorageIds(); method public android.mtp.MtpStorageInfo getStorageInfo(int); api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -23135,6 +23135,7 @@ package android.mtp { field public static final int OPERATION_GET_OBJECT_PROP_VALUE = 38915; // 0x9803 field public static final int OPERATION_GET_OBJECT_REFERENCES = 38928; // 0x9810 field public static final int OPERATION_GET_PARTIAL_OBJECT = 4123; // 0x101b field public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 38337; // 0x95c1 field public static final int OPERATION_GET_STORAGE_INFO = 4101; // 0x1005 field public static final int OPERATION_GET_STORAGE_I_DS = 4100; // 0x1004 field public static final int OPERATION_GET_THUMB = 4106; // 0x100a Loading Loading @@ -23172,6 +23173,7 @@ package android.mtp { method public android.mtp.MtpObjectInfo getObjectInfo(int); method public long getParent(int); method public long getPartialObject(int, long, long, byte[]) throws java.io.IOException; method public long getPartialObject64(int, long, long, byte[]) throws java.io.IOException; method public long getStorageId(int); method public int[] getStorageIds(); method public android.mtp.MtpStorageInfo getStorageInfo(int); media/java/android/mtp/MtpConstants.java +2 −0 Original line number Diff line number Diff line Loading @@ -690,4 +690,6 @@ public final class MtpConstants { public static final int OPERATION_SET_OBJECT_REFERENCES = 0x9811; /** Operation code for Skip */ public static final int OPERATION_SKIP = 0x9820; /** Operation code for GetPartialObject64 */ public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 0x95C1; } media/java/android/mtp/MtpDevice.java +23 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,27 @@ public final class MtpDevice { return native_get_partial_object(objectHandle, offset, size, buffer); } /** * Obtains object bytes in the specified range and writes it to an array. * This call may block for an arbitrary amount of time depending on the size * of the data and speed of the devices. * * This is a vender-extended operation supported by Android that enables us to pass * unsigned 64-bit offset. Check if the MTP device supports the operation by using * {@link MtpDeviceInfo#getOperationsSupported()}. * * @param objectHandle handle of the object to read * @param offset Start index of reading range. It must be a non-negative value. * @param size Size of reading range. It must be a non-negative value at most 0xffffffff. * @param buffer Array to write data. * @return Size of bytes that are actually read. * @see MtpConstants#OPERATION_GET_PARTIAL_OBJECT_64 */ public long getPartialObject64(int objectHandle, long offset, long size, byte[] buffer) throws IOException { return native_get_partial_object_64(objectHandle, offset, size, buffer); } /** * Returns the thumbnail data for an object as a byte array. * The size and format of the thumbnail data can be determined via Loading Loading @@ -347,6 +368,8 @@ public final class MtpDevice { private native byte[] native_get_object(int objectHandle, long objectSize); private native long native_get_partial_object( int objectHandle, long offset, long objectSize, byte[] buffer) throws IOException; private native int native_get_partial_object_64( int objectHandle, long offset, long objectSize, byte[] buffer) throws IOException; private native byte[] native_get_thumbnail(int objectHandle); private native boolean native_delete_object(int objectHandle); private native int native_get_parent(int objectHandle); Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -23126,6 +23126,7 @@ package android.mtp { field public static final int OPERATION_GET_OBJECT_PROP_VALUE = 38915; // 0x9803 field public static final int OPERATION_GET_OBJECT_REFERENCES = 38928; // 0x9810 field public static final int OPERATION_GET_PARTIAL_OBJECT = 4123; // 0x101b field public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 38337; // 0x95c1 field public static final int OPERATION_GET_STORAGE_INFO = 4101; // 0x1005 field public static final int OPERATION_GET_STORAGE_I_DS = 4100; // 0x1004 field public static final int OPERATION_GET_THUMB = 4106; // 0x100a Loading Loading @@ -23163,6 +23164,7 @@ package android.mtp { method public android.mtp.MtpObjectInfo getObjectInfo(int); method public long getParent(int); method public long getPartialObject(int, long, long, byte[]) throws java.io.IOException; method public long getPartialObject64(int, long, long, byte[]) throws java.io.IOException; method public long getStorageId(int); method public int[] getStorageIds(); method public android.mtp.MtpStorageInfo getStorageInfo(int);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -24545,6 +24545,7 @@ package android.mtp { field public static final int OPERATION_GET_OBJECT_PROP_VALUE = 38915; // 0x9803 field public static final int OPERATION_GET_OBJECT_REFERENCES = 38928; // 0x9810 field public static final int OPERATION_GET_PARTIAL_OBJECT = 4123; // 0x101b field public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 38337; // 0x95c1 field public static final int OPERATION_GET_STORAGE_INFO = 4101; // 0x1005 field public static final int OPERATION_GET_STORAGE_I_DS = 4100; // 0x1004 field public static final int OPERATION_GET_THUMB = 4106; // 0x100a Loading Loading @@ -24582,6 +24583,7 @@ package android.mtp { method public android.mtp.MtpObjectInfo getObjectInfo(int); method public long getParent(int); method public long getPartialObject(int, long, long, byte[]) throws java.io.IOException; method public long getPartialObject64(int, long, long, byte[]) throws java.io.IOException; method public long getStorageId(int); method public int[] getStorageIds(); method public android.mtp.MtpStorageInfo getStorageInfo(int);
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -23135,6 +23135,7 @@ package android.mtp { field public static final int OPERATION_GET_OBJECT_PROP_VALUE = 38915; // 0x9803 field public static final int OPERATION_GET_OBJECT_REFERENCES = 38928; // 0x9810 field public static final int OPERATION_GET_PARTIAL_OBJECT = 4123; // 0x101b field public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 38337; // 0x95c1 field public static final int OPERATION_GET_STORAGE_INFO = 4101; // 0x1005 field public static final int OPERATION_GET_STORAGE_I_DS = 4100; // 0x1004 field public static final int OPERATION_GET_THUMB = 4106; // 0x100a Loading Loading @@ -23172,6 +23173,7 @@ package android.mtp { method public android.mtp.MtpObjectInfo getObjectInfo(int); method public long getParent(int); method public long getPartialObject(int, long, long, byte[]) throws java.io.IOException; method public long getPartialObject64(int, long, long, byte[]) throws java.io.IOException; method public long getStorageId(int); method public int[] getStorageIds(); method public android.mtp.MtpStorageInfo getStorageInfo(int);
media/java/android/mtp/MtpConstants.java +2 −0 Original line number Diff line number Diff line Loading @@ -690,4 +690,6 @@ public final class MtpConstants { public static final int OPERATION_SET_OBJECT_REFERENCES = 0x9811; /** Operation code for Skip */ public static final int OPERATION_SKIP = 0x9820; /** Operation code for GetPartialObject64 */ public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 0x95C1; }
media/java/android/mtp/MtpDevice.java +23 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,27 @@ public final class MtpDevice { return native_get_partial_object(objectHandle, offset, size, buffer); } /** * Obtains object bytes in the specified range and writes it to an array. * This call may block for an arbitrary amount of time depending on the size * of the data and speed of the devices. * * This is a vender-extended operation supported by Android that enables us to pass * unsigned 64-bit offset. Check if the MTP device supports the operation by using * {@link MtpDeviceInfo#getOperationsSupported()}. * * @param objectHandle handle of the object to read * @param offset Start index of reading range. It must be a non-negative value. * @param size Size of reading range. It must be a non-negative value at most 0xffffffff. * @param buffer Array to write data. * @return Size of bytes that are actually read. * @see MtpConstants#OPERATION_GET_PARTIAL_OBJECT_64 */ public long getPartialObject64(int objectHandle, long offset, long size, byte[] buffer) throws IOException { return native_get_partial_object_64(objectHandle, offset, size, buffer); } /** * Returns the thumbnail data for an object as a byte array. * The size and format of the thumbnail data can be determined via Loading Loading @@ -347,6 +368,8 @@ public final class MtpDevice { private native byte[] native_get_object(int objectHandle, long objectSize); private native long native_get_partial_object( int objectHandle, long offset, long objectSize, byte[] buffer) throws IOException; private native int native_get_partial_object_64( int objectHandle, long offset, long objectSize, byte[] buffer) throws IOException; private native byte[] native_get_thumbnail(int objectHandle); private native boolean native_delete_object(int objectHandle); private native int native_get_parent(int objectHandle); Loading