History log of /frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
71827748105252791854b87da8e0e0c66ff0d2cb 23-Jan-2015 Mike Lockwood <lockwood@google.com> MTP: Fix partial implementation of 5 new audio specific properties

In change Ic5b3fb75309893caae1a4f4b56068a543847f1f7, we added partial
support for the MTP properties:

MTP_PROPERTY_AUDIO_WAVE_CODE,
MTP_PROPERTY_BITRATE_TYPE
MTP_PROPERTY_AUDIO_BITRATE
MTP_PROPERTY_NUMBER_OF_CHANNELS
MTP_PROPERTY_SAMPLE_RATE

However we were not returning any values for these properties in the result
of the MTP GetObjectPropList command. Strangely, this triggers a nasty bug
in Windows 7 that results in data loss. When copying a directory containing
several MP3 files from one location on the device to another, Windows will
copy only some of the files to the new location, but delete all of the originals.
Finishing the implementation of these new object properties for some unknown
reason stops this bad behavior in Windows 7.

Bug: 19018427
Change-Id: I5fd3b91a89b31827d3100686445cef6795fe0f3f
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
9c803fa52606aeb27d4d098161722fb111dd1b23 13-Nov-2014 Mike Lockwood <lockwood@google.com> MTP: Update JNI for new packet getters

Bug:18113092
Change-Id: I5d7473af1b57235fbc078c297a309e4a301c9fbd
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
63ffd78aaab0b0d04012312f0378b0c73b737a2a 24-Sep-2014 Mike Lockwood <lockwood@google.com> MtpDatabase: Increase size of string buffer in JNI code

Fixes problems handling files that have full path length > 255 characters

Bug: 17383223
Change-Id: I2a1ebedee8dd86b3060f14c2d1af636fc9bc95cb
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
9dc96cf0fc6261606495e5e56c0be7bee77d8895 02-Jun-2014 Mike Lockwood <lockwood@google.com> am a0183b02: am 8868d129: am 1c725866: Merge "MtpDatabase JNI: Fixed incorrect method name in ALOGE."

* commit 'a0183b02e4c6f53587519b445a546192b4a20146':
MtpDatabase JNI: Fixed incorrect method name in ALOGE.
307a37c2afc30190151285eb96ebd6a6940a96ec 02-Jun-2014 Mike Lockwood <lockwood@google.com> am 1ac54ec6: am 750e78bb: am 27eb205e: Merge "MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue()."

* commit '1ac54ec69bfcda2638b05c7daa4300ec5749e7b8':
MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue().
a0183b02e4c6f53587519b445a546192b4a20146 02-Jun-2014 Mike Lockwood <lockwood@google.com> am 8868d129: am 1c725866: Merge "MtpDatabase JNI: Fixed incorrect method name in ALOGE."

* commit '8868d1290afd96997fef671f4a7a4c7bbf94fa1a':
MtpDatabase JNI: Fixed incorrect method name in ALOGE.
1ac54ec69bfcda2638b05c7daa4300ec5749e7b8 02-Jun-2014 Mike Lockwood <lockwood@google.com> am 750e78bb: am 27eb205e: Merge "MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue()."

* commit '750e78bb7626e2e0d5c8feed4a6e4fbe7fe9b5da':
MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue().
8868d1290afd96997fef671f4a7a4c7bbf94fa1a 02-Jun-2014 Mike Lockwood <lockwood@google.com> am 1c725866: Merge "MtpDatabase JNI: Fixed incorrect method name in ALOGE."

* commit '1c725866da02c3e1f62fb416ea3450caed406f2a':
MtpDatabase JNI: Fixed incorrect method name in ALOGE.
750e78bb7626e2e0d5c8feed4a6e4fbe7fe9b5da 02-Jun-2014 Mike Lockwood <lockwood@google.com> am 27eb205e: Merge "MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue()."

* commit '27eb205e21e7715764084085f382d690e0406c63':
MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue().
986b46d17974f37b82a106094aa258fd707a4596 31-May-2014 Martin Blumenstingl <martin.blumenstingl@googlemail.com> MtpDatabase JNI: Fixed incorrect method name in ALOGE.

Change-Id: I46688cf79f1e7554b28162df2347c4dcb571b8a9
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
17a24c58bb2e86719f003c80f682beb66803f24d 31-May-2014 Martin Blumenstingl <martin.blumenstingl@googlemail.com> MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue().

The jstring "stringValue" was not never freed.
In the case where "str" was NULL the whole cleanup part (see "goto out")
was even skipped.
This patch makes getObjectPropertyValue() behave like
getObjectPropertyList().

Change-Id: I5a7ec3611036f5253a054b00064999bcd1d1c29e
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
293513a59d36cd96a3e474dde5981380d372d8c9 30-Apr-2014 Bill Yi <byi@google.com> Merge commit '0b62467b142b61ee1e449ba958ba37dfd961ef56' into HEAD
3fafb4ebf2572578c6d7df742593ee5ed17748a8 21-Apr-2014 Mike Lockwood <lockwood@google.com> am f82c83a8: am eaabdce0: am ca1f8f6d: am c4367721: MTP: Fix getThumbnail

* commit 'f82c83a8debb468027921e4b479bf80fe7f04ee1':
MTP: Fix getThumbnail
f82c83a8debb468027921e4b479bf80fe7f04ee1 21-Apr-2014 Mike Lockwood <lockwood@google.com> am eaabdce0: am ca1f8f6d: am c4367721: MTP: Fix getThumbnail

* commit 'eaabdce0ad556a91ccf731d042edfd9c5f249f5e':
MTP: Fix getThumbnail
eaabdce0ad556a91ccf731d042edfd9c5f249f5e 21-Apr-2014 Mike Lockwood <lockwood@google.com> am ca1f8f6d: am c4367721: MTP: Fix getThumbnail

* commit 'ca1f8f6d14a144dde64112cd471df5e9539ad521':
MTP: Fix getThumbnail
c436772120ceea1d6e3f5b388ef068c99c8bb7d6 21-Apr-2014 Mike Lockwood <lockwood@google.com> MTP: Fix getThumbnail

The thumbnail size was not being passed to the MTP stack so getThumbnail
was returning zero length data.

Bug: 13747419

Change-Id: I309d35b5c46ab5f631c0dcb5981f7896bb5a2ed5
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
0046b16ec7af940049344803afbb52953f100df3 26-Mar-2014 Mark Salyzyn <salyzyn@google.com> am 959bce3e: am 4e3abafc: am 5daf51c0: Merge "jni: 64-bit compile issue"

* commit '959bce3e69b4eb5dcba9ec48d92f21002f9c13b3':
jni: 64-bit compile issue
959bce3e69b4eb5dcba9ec48d92f21002f9c13b3 26-Mar-2014 Mark Salyzyn <salyzyn@google.com> am 4e3abafc: am 5daf51c0: Merge "jni: 64-bit compile issue"

* commit '4e3abafc9400eed38a1e76897b79e923acfaf8ed':
jni: 64-bit compile issue
aeb75fc5a3dc51bf9d5220647a68c48644c66ea8 20-Mar-2014 Mark Salyzyn <salyzyn@google.com> jni: 64-bit compile issue

- switch to PRId64
- some unused parameter warning suppression

Change-Id: Ia36bd1a247bb6e866a6b1050ab1362ebc9d31786
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
92b53bc2dd42a3c1d2d7708145099da2a5fe541e 13-Mar-2014 Mike Lockwood <lockwood@google.com> MTP: Add support for some audio specific object properties

This stops Windows 7 from putting up the
"Your device might not be able to play or view this file" dialog
when copying MP3 files to the device.

Bug: 3195286
Change-Id: Ic5b3fb75309893caae1a4f4b56068a543847f1f7
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
56c85244b9be0fc6f6c2baf5f9a53f2364d5ec5e 07-Mar-2014 Mike Lockwood <lockwood@google.com> MTP: Add support for battery level device property

Bug: 7342482

Change-Id: I810e55fe9695e2206816f57334ad14f65e9c641d
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
efae1ff25d51d3c7ff2def472e8eb0c56b1be33f 08-Mar-2014 Marco Nelissen <marcone@google.com> am ac875878: am 9823a170: Merge "Make MtpDatabase use libexif instead of libjhead" into klp-dev

* commit 'ac87587875f1dfade5e06a82ccc009d0f0170569':
Make MtpDatabase use libexif instead of libjhead
344251969929dcb37a33a3e3910121458f7dc38f 07-Mar-2014 Marco Nelissen <marcone@google.com> am ac875878: am 9823a170: Merge "Make MtpDatabase use libexif instead of libjhead" into klp-dev

* commit 'ac87587875f1dfade5e06a82ccc009d0f0170569':
Make MtpDatabase use libexif instead of libjhead
aefa427c27396bef64ee37d5c4d94e0a63cf7b05 10-Jan-2014 Marco Nelissen <marcone@google.com> Make MtpDatabase use libexif instead of libjhead

b/12203995

Change-Id: I0e0e6209be7a9d3e493abdcee8619cae6d4b9501
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
0937eed32fbe780182cb0349ac29680add7e492c 23-Jan-2014 Marco Nelissen <marcone@google.com> Check that the exif bits are actually there

b/12663599

Change-Id: If2af0ab20f29ab3264a8c6c8c4abf0ebeff6616c
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
3cd393c5051ce26c8030736f5524962d98abe849 10-Jan-2014 Marco Nelissen <marcone@google.com> Make MtpDatabase use libexif instead of libjhead

b/12203995

Change-Id: I0e0e6209be7a9d3e493abdcee8619cae6d4b9501
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
e2e59326f13cf291bf5b37989390fd2a55a94f0c 17-Dec-2013 Ashok Bhat <ashok.bhat@arm.com> AArch64: Use long for pointers in MTP classes

For storing pointers, long is used in MTP classes,
as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: I67805547251722e7b77611d47d0bb632a64d3e6d
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
87eac99a21772ae56018cb81db6966557b459554 10-Sep-2013 Ruben Brunk <rubenbrunk@google.com> Remove dependency on JNIHelp header side effects.

Bug: 10680559
Change-Id: I47870d6c48906e0a420c52b7bc5945ffe29c68a2
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
1341f1eee3493fc5e263494acb8adebb6f0180b6 01-Apr-2013 Mike Lockwood <lockwood@google.com> MTP: Implement date created field in GetObjectInfo

Bug: 8293874

Change-Id: I3e50ea1049f63e2ed3a1f849fef74a2fbf206fe8
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
f6f16614574767263fcd0073f72c099edaca0607 13-Sep-2012 Mike Lockwood <lockwood@google.com> MtpDatabase: Use actual file size instead of media database size column

Fixes problems with file transfer from device to host that can occur
if the database size value is wrong.

Bug: 6954446

Change-Id: I03c3dd4b75267d1f4613f0b588c8899ded9a70be
Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
3762c311729fe9f3af085c14c5c1fb471d994c03 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
c1b9bbb21c8ad5109978a4e9e770cd18b0257434 13-Jul-2011 Mike Lockwood <lockwood@android.com> Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build

Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
c89f22242b955ae748765b3465b819b40f70ee5f 25-Apr-2011 Mike Lockwood <lockwood@android.com> MTP: Implement GetThumb command

This allows the PC to access thumbnails in JPEG files over MTP/PTP

Bug: 3219495

Change-Id: I4964f8b4826dffb7f0f77464ec91bd2e97a2f007
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
9df53fae3afd1c6b5278216be2fd33a255602aef 22-Apr-2011 Mike Lockwood <lockwood@android.com> MTP: Add extended operations to support in-place editing of files

MTP does not support partial writes of files (the entire file must be transferred at once).
This makes it impossible to implement a FUSE file system for MTP
with acceptable performance.
To fix this problem, this change adds extended MTP operations to allow
partial writes to files:

SendPartialObject - allows writing a subset of a file, or appending to the end of a file

TruncateObject - allows changing the size of a file

BeginEditObject - must be called before using SendPartialObject and TruncateObject

EndEditObject - commits changes to a file after it has been edited with SendPartialObject or TruncateObject

We also add GetPartialObject64, which is the same as GetPartialObject
but has a 64 bit offset rather than 32.

Change-Id: I4b110748b97ae05cdc8aab02ecdbbbeb263f7840
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
15dd15fd572df6b6f785dff75f66e9b99f40322a 09-Apr-2011 Elliott Hughes <enh@google.com> Tidy up exception throwing in the media native code.

(I'm going through all of frameworks/base in multiple passes. This pass is just
for exception throwing.)

Change-Id: Ia14a5c720edae86ac780023be88e676aa1b3315d
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
3977472d9f3380a8323156dbc7d0090cf2f2d310 06-Apr-2011 James Dong <jdong@google.com> Handle the failure from GetStringUTFChars()

Change-Id: I9eb0f9f0fd2fa5116e7be80b1fa2ed4a95521b9d
related-to-bug: 4139926
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
f26a586c86b097f975e26fe526ead564ad011bd0 22-Jan-2011 Mike Lockwood <lockwood@android.com> Remove MTP related log spam

Change-Id: I9de1792cbeec07fa5ab42ff9a10813f0c3d30fc1
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
7a0bd17bceaf3efc3732e30c538fae420d3b742c 18-Jan-2011 Mike Lockwood <lockwood@android.com> MTP: Fix problems with modification dates for folders and non-media files

Also removed an unnecessary parameter to MtpDatabase.endSendobject()

BUG: 3352142

Change-Id: I6fd812dcba4814956bc8bc1cbd6bd5c868197790
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp
0cd0136d440cf6ad9d5fab430269116786e671ec 30-Dec-2010 Mike Lockwood <lockwood@android.com> Move MTP Java classes to android.mtp.* package.

Change-Id: Ib18bcaabf314241a95e517d0b93be5845d988e2c
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/jni/android_mtp_MtpDatabase.cpp