Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7f608cc authored by James Wei's avatar James Wei
Browse files

MTP: media info can not be retrieved via MTP

Under the new MtpStorageManager design of Android P,
media info like MP3 Track title, album and artist, Genre, etc
can not be retrieved via MTP
by Windows Media Player, Linux Rhythmbox and BMW Car Kit

Bug: 112635346
Test: Windows Media Player
Test: Linux Rhythmbox

Change-Id: Ibbdaff52a24fa36c6090e799323b767dd5692207
(cherry picked from commit 7784da12b9b3394beb791b16befcd33075668270)
parent 9aac06cc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -538,8 +538,13 @@ public class MtpDatabase implements AutoCloseable {
        MtpPropertyGroup propertyGroup;
        for (MtpStorageManager.MtpObject obj : objs) {
            if (property == 0xffffffff) {
                if (format == 0 && handle != 0 && handle != 0xffffffff) {
                    // return properties based on the object's format
                    format = obj.getFormat();
                }
                // Get all properties supported by this object
                propertyGroup = mPropertyGroupsByFormat.get(obj.getFormat());
                // format should be the same between get & put
                propertyGroup = mPropertyGroupsByFormat.get(format);
                if (propertyGroup == null) {
                    int[] propertyList = getSupportedObjectProperties(format);
                    propertyGroup = new MtpPropertyGroup(mMediaProvider, mVolumeName,