docs/doc/reference/com/google/android/exoplayer2/testutil/FakeExoMediaDrm.Builder.html
Package com.google.android.exoplayer2.testutil
Enclosing class:FakeExoMediaDrm
public static classFakeExoMediaDrm.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Builder for FakeExoMediaDrm instances.
Constructors | Constructor | Description |
| --- | --- |
| Builder() |
Constructs an instance.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| FakeExoMediaDrm | build() |
Returns a FakeExoMediaDrm instance with an initial reference count of 1.
|
| FakeExoMediaDrm.Builder | setEnforceValidKeyResponses(boolean enforceValidKeyResponses) |
Sets whether key responses passed to FakeExoMediaDrm.provideKeyResponse(byte[], byte[]) should be checked for validity (i.e.
|
| FakeExoMediaDrm.Builder | setMaxConcurrentSessions(int maxConcurrentSessions) |
Sets the maximum number of concurrent sessions the FakeExoMediaDrm will support.
|
| FakeExoMediaDrm.Builder | setProvisionsRequired(int provisionsRequired) |
Sets how many successful provisioning round trips are needed for the FakeExoMediaDrm to be provisioned.
|
| FakeExoMediaDrm.Builder | throwNotProvisionedExceptionFromGetKeyRequest() |
Configures the FakeExoMediaDrm to throw any NotProvisionedException from FakeExoMediaDrm.getKeyRequest(byte[], List, int, HashMap) instead of the default behaviour of throwing from FakeExoMediaDrm.openSession().
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Builder()
Constructs an instance.
-
@CanIgnoreReturnValue
public[FakeExoMediaDrm.Builder](FakeExoMediaDrm.Builder.html "class in com.google.android.exoplayer2.testutil")setEnforceValidKeyResponses(boolean enforceValidKeyResponses)
Sets whether key responses passed to FakeExoMediaDrm.provideKeyResponse(byte[], byte[]) should be checked for validity (i.e. that they came from a FakeExoMediaDrm.LicenseServer).
Defaults to true.
-
@CanIgnoreReturnValue
public[FakeExoMediaDrm.Builder](FakeExoMediaDrm.Builder.html "class in com.google.android.exoplayer2.testutil")setProvisionsRequired(int provisionsRequired)
Sets how many successful provisioning round trips are needed for the FakeExoMediaDrm to be provisioned.
An unprovisioned FakeExoMediaDrm will throw NotProvisionedException from methods that declare it until enough valid provisioning responses are passed to FakeExoMediaDrm.provideProvisionResponse(byte[]).
Defaults to 0 (i.e. device is already provisioned).
-
@CanIgnoreReturnValue
public[FakeExoMediaDrm.Builder](FakeExoMediaDrm.Builder.html "class in com.google.android.exoplayer2.testutil")throwNotProvisionedExceptionFromGetKeyRequest()
Configures the FakeExoMediaDrm to throw any NotProvisionedException from FakeExoMediaDrm.getKeyRequest(byte[], List, int, HashMap) instead of the default behaviour of throwing from FakeExoMediaDrm.openSession().
-
@CanIgnoreReturnValue
public[FakeExoMediaDrm.Builder](FakeExoMediaDrm.Builder.html "class in com.google.android.exoplayer2.testutil")setMaxConcurrentSessions(int maxConcurrentSessions)
Sets the maximum number of concurrent sessions the FakeExoMediaDrm will support.
If this is exceeded then subsequent calls to FakeExoMediaDrm.openSession() will throw ResourceBusyException.
Defaults to Integer.MAX_VALUE.
-
public[FakeExoMediaDrm](FakeExoMediaDrm.html "class in com.google.android.exoplayer2.testutil")build()
Returns a FakeExoMediaDrm instance with an initial reference count of 1. The caller is responsible for calling FakeExoMediaDrm.release() when they no longer need the instance.