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

Commit a911f51c authored by Chong Zhang's avatar Chong Zhang
Browse files

Pass subtitle track properties to getTrackInfo

Bug: 10326117

Change-Id: I15fcc49ad02e26d7cc92e82ee670bafca62a09a7
parent c728c580
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -200,6 +200,13 @@ void M3UParser::MediaGroup::getTrackInfo(Parcel* reply) const {
        const Media &item = mMediaItems.itemAt(i);
        const char *lang = item.mLanguage.empty() ? "und" : item.mLanguage.c_str();
        reply->writeString16(String16(lang));

        if (mType == TYPE_SUBS) {
            // TO-DO: pass in a MediaFormat instead
            reply->writeInt32(!!(item.mFlags & MediaGroup::FLAG_AUTOSELECT));
            reply->writeInt32(!!(item.mFlags & MediaGroup::FLAG_DEFAULT));
            reply->writeInt32(!!(item.mFlags & MediaGroup::FLAG_FORCED));
        }
    }
}