Commit fe013979 by bachinger Committed by Oliver Woodman

use an unmodifiable map with a copy of the license request headers

PiperOrigin-RevId: 304356504
parent 205adb7f
......@@ -152,7 +152,7 @@ public final class MediaItem {
@Nullable Map<String, String> licenseRequestHeaders) {
this.drmLicenseRequestHeaders =
licenseRequestHeaders != null && !licenseRequestHeaders.isEmpty()
? licenseRequestHeaders
? Collections.unmodifiableMap(new HashMap<>(licenseRequestHeaders))
: Collections.emptyMap();
return this;
}
......@@ -344,7 +344,7 @@ public final class MediaItem {
List<Integer> drmSessionForClearTypes) {
this.uuid = uuid;
this.licenseUri = licenseUri;
this.requestHeaders = Collections.unmodifiableMap(new HashMap<>(requestHeaders));
this.requestHeaders = requestHeaders;
this.multiSession = multiSession;
this.playClearContentWithoutKey = playClearContentWithoutKey;
this.sessionForClearTypes = drmSessionForClearTypes;
......
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