Code formatting
This commit is contained in:
parent
a509033a5c
commit
41a56daab7
@ -142,15 +142,17 @@ public final class DrmUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a Http Post Request to the supplied {@link StatsDataSource} with retry handling and
|
* Executes a HTTP POST request with retry handling and returns the entire response in a byte
|
||||||
* returns the entire response in a byte buffer.
|
* buffer.
|
||||||
*
|
*
|
||||||
* @param dataSource A {@link DataSource} that is usually HTTP-based
|
* <p>Note that this method is executing the request synchronously and blocks until finished.
|
||||||
* @param url The requesting url
|
*
|
||||||
* @param httpBody The http request payload
|
* @param dataSource A {@link DataSource}.
|
||||||
* @param requestProperties A keyed map of http header request properties
|
* @param url The requested URL.
|
||||||
* @return A byte array that holds the response payload
|
* @param httpBody The HTTP request payload.
|
||||||
* @throws MediaDrmCallbackException if an exception was encountered during the download
|
* @param requestProperties A keyed map of HTTP header request properties.
|
||||||
|
* @return A byte array that holds the response payload.
|
||||||
|
* @throws MediaDrmCallbackException if an exception was encountered during the download.
|
||||||
*/
|
*/
|
||||||
public static byte[] executePost(
|
public static byte[] executePost(
|
||||||
DataSource dataSource,
|
DataSource dataSource,
|
||||||
|
@ -26,7 +26,6 @@ import androidx.media3.common.util.UnstableApi;
|
|||||||
import androidx.media3.common.util.Util;
|
import androidx.media3.common.util.Util;
|
||||||
import androidx.media3.datasource.DataSource;
|
import androidx.media3.datasource.DataSource;
|
||||||
import androidx.media3.datasource.DataSpec;
|
import androidx.media3.datasource.DataSpec;
|
||||||
import androidx.media3.datasource.StatsDataSource;
|
|
||||||
import androidx.media3.exoplayer.drm.ExoMediaDrm.KeyRequest;
|
import androidx.media3.exoplayer.drm.ExoMediaDrm.KeyRequest;
|
||||||
import androidx.media3.exoplayer.drm.ExoMediaDrm.ProvisionRequest;
|
import androidx.media3.exoplayer.drm.ExoMediaDrm.ProvisionRequest;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
@ -157,8 +156,7 @@ public final class HttpMediaDrmCallback implements MediaDrmCallback {
|
|||||||
return executePost(
|
return executePost(
|
||||||
dataSourceFactory.createDataSource(),
|
dataSourceFactory.createDataSource(),
|
||||||
url,
|
url,
|
||||||
request.getData(),
|
/* httpBody= */ request.getData(),
|
||||||
requestProperties
|
requestProperties);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user