mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
Remove ParserException(cause) constructor
PiperOrigin-RevId: 378635295
This commit is contained in:
parent
c728de9947
commit
b5dbadee0c
@ -123,18 +123,6 @@ public class ParserException extends IOException {
|
||||
this(message, /* cause= */ null, /* contentIsMalformed= */ true, C.DATA_TYPE_UNKNOWN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param cause The cause for the exception.
|
||||
* @deprecated Use a factory method which initializes {@link #contentIsMalformed}, and {@link
|
||||
* #dataType} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public ParserException(Throwable cause) {
|
||||
this(/* message= */ null, cause, /* contentIsMalformed= */ true, C.DATA_TYPE_UNKNOWN);
|
||||
}
|
||||
|
||||
protected ParserException(
|
||||
@Nullable String message,
|
||||
@Nullable Throwable cause,
|
||||
|
@ -1464,7 +1464,7 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
}
|
||||
return timestampMs;
|
||||
} catch (ParseException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class DashManifestParser extends DefaultHandler
|
||||
}
|
||||
return parseMediaPresentationDescription(xpp, uri.toString());
|
||||
} catch (XmlPullParserException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ import java.util.List;
|
||||
int speedDivisor = 1 << (speedMode - 1);
|
||||
segments.add(new SlowMotionData.Segment(startTimeMs, endTimeMs, speedDivisor));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedContainer(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
}
|
||||
return new SlowMotionData(segments);
|
||||
|
@ -74,7 +74,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
||||
new SmoothStreamingMediaParser(null, uri.toString());
|
||||
return (SsManifest) smoothStreamingMediaParser.parse(xmlParser);
|
||||
} catch (XmlPullParserException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,7 +253,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
||||
try {
|
||||
return Integer.parseInt(value);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
} else {
|
||||
return defaultValue;
|
||||
@ -266,7 +266,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
||||
try {
|
||||
return Integer.parseInt(value);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
} else {
|
||||
throw new MissingFieldException(key);
|
||||
@ -280,7 +280,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
||||
try {
|
||||
return Long.parseLong(value);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
} else {
|
||||
return defaultValue;
|
||||
@ -294,7 +294,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
||||
try {
|
||||
return Long.parseLong(value);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ParserException(e);
|
||||
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||
}
|
||||
} else {
|
||||
throw new MissingFieldException(key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user