Commit 14026a5f by rohks Committed by Tofunmi Adigun-Hameed

Remove two deprecated `InvalidResponseCodeException` constructors

Use a non-deprecated constructor that accepts additional fields(`cause`, `responseBody`) to enhance error logging.

#minor-release

PiperOrigin-RevId: 532190896
(cherry picked from commit d73f7dd0be749f3a786c6559ac77e7f2b88ac2c0)
parent 6197b576
...@@ -21,7 +21,6 @@ import android.text.TextUtils; ...@@ -21,7 +21,6 @@ import android.text.TextUtils;
import androidx.annotation.IntDef; import androidx.annotation.IntDef;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.PlaybackException; import com.google.android.exoplayer2.PlaybackException;
import com.google.android.exoplayer2.util.Util;
import com.google.common.base.Ascii; import com.google.common.base.Ascii;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.CanIgnoreReturnValue;
...@@ -408,41 +407,6 @@ public interface HttpDataSource extends DataSource { ...@@ -408,41 +407,6 @@ public interface HttpDataSource extends DataSource {
/** The response body. */ /** The response body. */
public final byte[] responseBody; public final byte[] responseBody;
/**
* @deprecated Use {@link #InvalidResponseCodeException(int, String, IOException, Map, DataSpec,
* byte[])}.
*/
@Deprecated
public InvalidResponseCodeException(
int responseCode, Map<String, List<String>> headerFields, DataSpec dataSpec) {
this(
responseCode,
/* responseMessage= */ null,
/* cause= */ null,
headerFields,
dataSpec,
/* responseBody= */ Util.EMPTY_BYTE_ARRAY);
}
/**
* @deprecated Use {@link #InvalidResponseCodeException(int, String, IOException, Map, DataSpec,
* byte[])}.
*/
@Deprecated
public InvalidResponseCodeException(
int responseCode,
@Nullable String responseMessage,
Map<String, List<String>> headerFields,
DataSpec dataSpec) {
this(
responseCode,
responseMessage,
/* cause= */ null,
headerFields,
dataSpec,
/* responseBody= */ Util.EMPTY_BYTE_ARRAY);
}
public InvalidResponseCodeException( public InvalidResponseCodeException(
int responseCode, int responseCode,
@Nullable String responseMessage, @Nullable String responseMessage,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment