Class FakeExoMediaDrm.Builder
- java.lang.Object
- 
- com.google.android.exoplayer2.testutil.FakeExoMediaDrm.Builder
 
- 
- Enclosing class:
- FakeExoMediaDrm
 
 public static class FakeExoMediaDrm.Builder extends Object Builder forFakeExoMediaDrminstances.
- 
- 
Constructor SummaryConstructors Constructor Description Builder()Constructs an instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FakeExoMediaDrmbuild()Returns aFakeExoMediaDrminstance with an initial reference count of 1.FakeExoMediaDrm.BuildersetEnforceValidKeyResponses(boolean enforceValidKeyResponses)Sets whether key responses passed toFakeExoMediaDrm.provideKeyResponse(byte[], byte[])should be checked for validity (i.e.FakeExoMediaDrm.BuildersetMaxConcurrentSessions(int maxConcurrentSessions)Sets the maximum number of concurrent sessions theFakeExoMediaDrmwill support.FakeExoMediaDrm.BuildersetProvisionsRequired(int provisionsRequired)Sets how many successful provisioning round trips are needed for theFakeExoMediaDrmto be provisioned.FakeExoMediaDrm.BuilderthrowNotProvisionedExceptionFromGetKeyRequest()Configures theFakeExoMediaDrmto throw anyNotProvisionedExceptionfromFakeExoMediaDrm.getKeyRequest(byte[], List, int, HashMap)instead of the default behaviour of throwing fromFakeExoMediaDrm.openSession().
 
- 
- 
- 
Method Detail- 
setEnforceValidKeyResponses@CanIgnoreReturnValue public FakeExoMediaDrm.Builder setEnforceValidKeyResponses(boolean enforceValidKeyResponses) Sets whether key responses passed toFakeExoMediaDrm.provideKeyResponse(byte[], byte[])should be checked for validity (i.e. that they came from aFakeExoMediaDrm.LicenseServer).Defaults to true. 
 - 
setProvisionsRequired@CanIgnoreReturnValue public FakeExoMediaDrm.Builder setProvisionsRequired(int provisionsRequired) Sets how many successful provisioning round trips are needed for theFakeExoMediaDrmto be provisioned.An unprovisioned FakeExoMediaDrmwill throwNotProvisionedExceptionfrom methods that declare it until enough valid provisioning responses are passed toFakeExoMediaDrm.provideProvisionResponse(byte[]).Defaults to 0 (i.e. device is already provisioned). 
 - 
throwNotProvisionedExceptionFromGetKeyRequest@CanIgnoreReturnValue public FakeExoMediaDrm.Builder throwNotProvisionedExceptionFromGetKeyRequest() Configures theFakeExoMediaDrmto throw anyNotProvisionedExceptionfromFakeExoMediaDrm.getKeyRequest(byte[], List, int, HashMap)instead of the default behaviour of throwing fromFakeExoMediaDrm.openSession().
 - 
setMaxConcurrentSessions@CanIgnoreReturnValue public FakeExoMediaDrm.Builder setMaxConcurrentSessions(int maxConcurrentSessions) Sets the maximum number of concurrent sessions theFakeExoMediaDrmwill support.If this is exceeded then subsequent calls to FakeExoMediaDrm.openSession()will throwResourceBusyException.Defaults to Integer.MAX_VALUE.
 - 
buildpublic FakeExoMediaDrm build() Returns aFakeExoMediaDrminstance with an initial reference count of 1. The caller is responsible for callingFakeExoMediaDrm.release()when they no longer need the instance.
 
- 
 
-