summaryrefslogtreecommitdiffstats
path: root/media/jni
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-11-16 17:38:43 -0500
committerMike Lockwood <lockwood@android.com>2010-11-17 16:43:24 -0500
commit413577d8600413bb1dca3730d4ccf20892b929b4 (patch)
tree84bf3826a161ef33df6a9b8dd79070f7c0774a80 /media/jni
parent6b2cc4a1263b01ae744a119271506dfa5a8614c6 (diff)
downloadframeworks_base-413577d8600413bb1dca3730d4ccf20892b929b4.zip
frameworks_base-413577d8600413bb1dca3730d4ccf20892b929b4.tar.gz
frameworks_base-413577d8600413bb1dca3730d4ccf20892b929b4.tar.bz2
MTP: Fixes to allow file transfers > 4 gigabytes
BUG: 3198248 Change-Id: I6f11c79a19d7bdd63718a7370939124b1262d221 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/jni')
-rw-r--r--media/jni/android_media_MtpDatabase.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/media/jni/android_media_MtpDatabase.cpp b/media/jni/android_media_MtpDatabase.cpp
index 5377af6..4525d1f 100644
--- a/media/jni/android_media_MtpDatabase.cpp
+++ b/media/jni/android_media_MtpDatabase.cpp
@@ -99,6 +99,7 @@ public:
virtual void endSendObject(const char* path,
MtpObjectHandle handle,
MtpObjectFormat format,
+ int64_t actualSize,
bool succeeded);
virtual MtpObjectHandleList* getObjectList(MtpStorageID storageID,
@@ -235,11 +236,11 @@ MtpObjectHandle MyMtpDatabase::beginSendObject(const char* path,
}
void MyMtpDatabase::endSendObject(const char* path, MtpObjectHandle handle,
- MtpObjectFormat format, bool succeeded) {
+ MtpObjectFormat format, int64_t actualSize, bool succeeded) {
JNIEnv* env = AndroidRuntime::getJNIEnv();
jstring pathStr = env->NewStringUTF(path);
env->CallVoidMethod(mDatabase, method_endSendObject, pathStr,
- (jint)handle, (jint)format, (jboolean)succeeded);
+ (jint)handle, (jint)format, (jlong)actualSize, (jboolean)succeeded);
if (pathStr)
env->DeleteLocalRef(pathStr);
@@ -1076,7 +1077,7 @@ int register_android_media_MtpDatabase(JNIEnv *env)
LOGE("Can't find beginSendObject");
return -1;
}
- method_endSendObject = env->GetMethodID(clazz, "endSendObject", "(Ljava/lang/String;IIZ)V");
+ method_endSendObject = env->GetMethodID(clazz, "endSendObject", "(Ljava/lang/String;IIJZ)V");
if (method_endSendObject == NULL) {
LOGE("Can't find endSendObject");
return -1;