summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpDataPacket.cpp
diff options
context:
space:
mode:
authorYin Liu <yin2.liu@sonymobile.com>2012-12-04 09:19:53 +0100
committerZoran Jovanovic <zoran.jovanovic@sonymobile.com>2013-12-20 20:56:12 +0100
commit014897f5aece2c6212418934bd4618326979f17a (patch)
tree7875866e28fecefccf204bfcfe157e4ed0e74552 /media/mtp/MtpDataPacket.cpp
parent1f95555c69219180f792ac742cc0e386496c29e6 (diff)
downloadframeworks_av-014897f5aece2c6212418934bd4618326979f17a.zip
frameworks_av-014897f5aece2c6212418934bd4618326979f17a.tar.gz
frameworks_av-014897f5aece2c6212418934bd4618326979f17a.tar.bz2
Long mp3 metadata displays as corrupted file after transfer
Cut the metadata to 1 Byte and return in function getObjectPropertyList in order to show it properly on a PC. Change-Id: Iefacf9fa86c20ece2572e6d95d35877a94066fe7
Diffstat (limited to 'media/mtp/MtpDataPacket.cpp')
-rw-r--r--media/mtp/MtpDataPacket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp
index 930f0b0..c4f87a0 100644
--- a/media/mtp/MtpDataPacket.cpp
+++ b/media/mtp/MtpDataPacket.cpp
@@ -331,7 +331,7 @@ void MtpDataPacket::putString(const char* s) {
void MtpDataPacket::putString(const uint16_t* string) {
int count = 0;
- for (int i = 0; i < 256; i++) {
+ for (int i = 0; i <= MTP_STRING_MAX_CHARACTER_NUMBER; i++) {
if (string[i])
count++;
else