transcoding: Fix a bug in ApplicationMediaCapabilites.

The creater have not parsed the unsupported codec/hdr types.

Bug: 176993974
Test: atest  CtsMediaTranscodingTestCases:ApplicationMediaCapabilitiesTest
Change-Id: Id6a692ae468948ea5672e22f0b3af0b6e50ecfad
This commit is contained in:
hkuang
2021-01-19 19:19:12 -08:00
parent 792c798caf
commit 6594cb8a07

View File

@@ -192,12 +192,25 @@ public final class ApplicationMediaCapabilities implements Parcelable {
for (int readCount = 0; readCount < count; ++readCount) {
builder.addSupportedVideoMimeType(in.readString());
}
// Parse unsupported video codec mime types.
count = in.readInt();
for (int readCount = 0; readCount < count; ++readCount) {
builder.addUnsupportedVideoMimeType(in.readString());
}
// Parse supported hdr types.
count = in.readInt();
for (int readCount = 0; readCount < count; ++readCount) {
builder.addSupportedHdrType(in.readString());
}
// Parse unsupported hdr types.
count = in.readInt();
for (int readCount = 0; readCount < count; ++readCount) {
builder.addUnsupportedHdrType(in.readString());
}
boolean supported = in.readBoolean();
builder.setSlowMotionSupported(supported);