diff options
author | Mike Lockwood <lockwood@android.com> | 2010-09-22 12:33:35 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-09-22 12:33:35 -0700 |
commit | 5a08b50e8029b7f11f998246bbae1a99d806789c (patch) | |
tree | d0f610d6bdae8e216cde74f5fb0b23458f290a28 /media/java/android | |
parent | d0259a47fc90a0a3c69724a686580b29b4c36e69 (diff) | |
parent | f1f5361e328c13be80e3760d8cc2170d70c9d0ba (diff) | |
download | frameworks_base-5a08b50e8029b7f11f998246bbae1a99d806789c.zip frameworks_base-5a08b50e8029b7f11f998246bbae1a99d806789c.tar.gz frameworks_base-5a08b50e8029b7f11f998246bbae1a99d806789c.tar.bz2 |
Merge "MTP host: Use Java longs for storage and object IDs"
Diffstat (limited to 'media/java/android')
-rw-r--r-- | media/java/android/media/MtpClient.java | 16 | ||||
-rw-r--r-- | media/java/android/media/MtpCursor.java | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/media/java/android/media/MtpClient.java b/media/java/android/media/MtpClient.java index f7c0ce2..98da1f6 100644 --- a/media/java/android/media/MtpClient.java +++ b/media/java/android/media/MtpClient.java @@ -57,20 +57,20 @@ public class MtpClient { native_stop(); } - public boolean deleteObject(int deviceID, int objectID) { + public boolean deleteObject(int deviceID, long objectID) { return native_delete_object(deviceID, objectID); } - public int getParent(int deviceID, int objectID) { + public long getParent(int deviceID, long objectID) { return native_get_parent(deviceID, objectID); } - public int getStorageID(int deviceID, int objectID) { + public long getStorageID(int deviceID, long objectID) { return native_get_storage_id(deviceID, objectID); } // create a file descriptor for reading the contents of an object over MTP - public ParcelFileDescriptor openFile(int deviceID, int objectID) { + public ParcelFileDescriptor openFile(int deviceID, long objectID) { return native_open_file(deviceID, objectID); } @@ -101,8 +101,8 @@ public class MtpClient { private native final void native_finalize(); private native boolean native_start(); private native void native_stop(); - private native boolean native_delete_object(int deviceID, int objectID); - private native int native_get_parent(int deviceID, int objectID); - private native int native_get_storage_id(int deviceID, int objectID); - private native ParcelFileDescriptor native_open_file(int deviceID, int objectID); + private native boolean native_delete_object(int deviceID, long objectID); + private native long native_get_parent(int deviceID, long objectID); + private native long native_get_storage_id(int deviceID, long objectID); + private native ParcelFileDescriptor native_open_file(int deviceID, long objectID); } diff --git a/media/java/android/media/MtpCursor.java b/media/java/android/media/MtpCursor.java index d4142d8..b9dd03e 100644 --- a/media/java/android/media/MtpCursor.java +++ b/media/java/android/media/MtpCursor.java @@ -43,8 +43,8 @@ public final class MtpCursor extends AbstractWindowedCursor { private int mQueryType; private int mDeviceID; - private int mStorageID; - private int mQbjectID; + private long mStorageID; + private long mQbjectID; /** The names of the columns in the projection */ private String[] mColumns; @@ -54,7 +54,7 @@ public final class MtpCursor extends AbstractWindowedCursor { private final MtpClient mClient; - public MtpCursor(MtpClient client, int queryType, int deviceID, int storageID, int objectID, + public MtpCursor(MtpClient client, int queryType, int deviceID, long storageID, long objectID, String[] projection) { mClient = client; @@ -220,7 +220,7 @@ public final class MtpCursor extends AbstractWindowedCursor { private int mNativeContext; private native final void native_setup(MtpClient client, int queryType, - int deviceID, int storageID, int objectID, int[] columns); + int deviceID, long storageID, long objectID, int[] columns); private native final void native_finalize(); private native void native_wait_for_event(); private native int native_fill_window(CursorWindow window, int startPos); |