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

Commit 33010b80 authored by Chong Zhang's avatar Chong Zhang Committed by Android Git Automerger
Browse files

am a911f51c: Pass subtitle track properties to getTrackInfo

* commit 'a911f51c':
  Pass subtitle track properties to getTrackInfo
parents fe2d2ac2 a911f51c
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));
        }
    }
}