mirror of
https://github.com/androidx/media.git
synced 2025-05-08 08:00:49 +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);
|
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(
|
protected ParserException(
|
||||||
@Nullable String message,
|
@Nullable String message,
|
||||||
@Nullable Throwable cause,
|
@Nullable Throwable cause,
|
||||||
|
@ -1464,7 +1464,7 @@ public final class DashMediaSource extends BaseMediaSource {
|
|||||||
}
|
}
|
||||||
return timestampMs;
|
return timestampMs;
|
||||||
} catch (ParseException e) {
|
} 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());
|
return parseMediaPresentationDescription(xpp, uri.toString());
|
||||||
} catch (XmlPullParserException e) {
|
} 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);
|
int speedDivisor = 1 << (speedMode - 1);
|
||||||
segments.add(new SlowMotionData.Segment(startTimeMs, endTimeMs, speedDivisor));
|
segments.add(new SlowMotionData.Segment(startTimeMs, endTimeMs, speedDivisor));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new ParserException(e);
|
throw ParserException.createForMalformedContainer(/* message= */ null, /* cause= */ e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new SlowMotionData(segments);
|
return new SlowMotionData(segments);
|
||||||
|
@ -74,7 +74,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||||||
new SmoothStreamingMediaParser(null, uri.toString());
|
new SmoothStreamingMediaParser(null, uri.toString());
|
||||||
return (SsManifest) smoothStreamingMediaParser.parse(xmlParser);
|
return (SsManifest) smoothStreamingMediaParser.parse(xmlParser);
|
||||||
} catch (XmlPullParserException e) {
|
} 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 {
|
try {
|
||||||
return Integer.parseInt(value);
|
return Integer.parseInt(value);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new ParserException(e);
|
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
@ -266,7 +266,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||||||
try {
|
try {
|
||||||
return Integer.parseInt(value);
|
return Integer.parseInt(value);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new ParserException(e);
|
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new MissingFieldException(key);
|
throw new MissingFieldException(key);
|
||||||
@ -280,7 +280,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||||||
try {
|
try {
|
||||||
return Long.parseLong(value);
|
return Long.parseLong(value);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new ParserException(e);
|
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
@ -294,7 +294,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||||||
try {
|
try {
|
||||||
return Long.parseLong(value);
|
return Long.parseLong(value);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new ParserException(e);
|
throw ParserException.createForMalformedManifest(/* message= */ null, /* cause= */ e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new MissingFieldException(key);
|
throw new MissingFieldException(key);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user