summaryrefslogtreecommitdiffstats
path: root/media/jni/android_mtp_MtpDatabase.cpp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2015-01-23 10:50:08 -0800
committerMike Lockwood <lockwood@google.com>2015-01-23 10:58:38 -0800
commit71827748105252791854b87da8e0e0c66ff0d2cb (patch)
treee3ffca39288af31a6eeef44a75e74a9571549fdf /media/jni/android_mtp_MtpDatabase.cpp
parent06ab0ca4812450ec297722957e18b34cbfa733b2 (diff)
downloadframeworks_base-71827748105252791854b87da8e0e0c66ff0d2cb.zip
frameworks_base-71827748105252791854b87da8e0e0c66ff0d2cb.tar.gz
frameworks_base-71827748105252791854b87da8e0e0c66ff0d2cb.tar.bz2
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
Diffstat (limited to 'media/jni/android_mtp_MtpDatabase.cpp')
-rw-r--r--media/jni/android_mtp_MtpDatabase.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/media/jni/android_mtp_MtpDatabase.cpp b/media/jni/android_mtp_MtpDatabase.cpp
index b8e850a..8b2e203 100644
--- a/media/jni/android_mtp_MtpDatabase.cpp
+++ b/media/jni/android_mtp_MtpDatabase.cpp
@@ -930,6 +930,11 @@ static const PropertyTableEntry kObjectPropertyTable[] = {
{ MTP_PROPERTY_COMPOSER, MTP_TYPE_STR },
{ MTP_PROPERTY_DURATION, MTP_TYPE_UINT32 },
{ MTP_PROPERTY_DESCRIPTION, MTP_TYPE_STR },
+ { MTP_PROPERTY_AUDIO_WAVE_CODEC, MTP_TYPE_UINT32 },
+ { MTP_PROPERTY_BITRATE_TYPE, MTP_TYPE_UINT16 },
+ { MTP_PROPERTY_AUDIO_BITRATE, MTP_TYPE_UINT32 },
+ { MTP_PROPERTY_NUMBER_OF_CHANNELS,MTP_TYPE_UINT16 },
+ { MTP_PROPERTY_SAMPLE_RATE, MTP_TYPE_UINT32 },
};
static const PropertyTableEntry kDevicePropertyTable[] = {