Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9cfac7ea
authored
Apr 12, 2019
by
aquilescanta
Committed by
Oliver Woodman
Apr 13, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Rename CryptoResource to DecryptionResource
PiperOrigin-RevId: 243237265
parent
53934c13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
library/core/src/main/java/com/google/android/exoplayer2/drm/CryptoResource.java → library/core/src/main/java/com/google/android/exoplayer2/drm/DecryptionResource.java
library/core/src/main/java/com/google/android/exoplayer2/drm/
Crypto
Resource.java
→
library/core/src/main/java/com/google/android/exoplayer2/drm/
Decryption
Resource.java
View file @
9cfac7ea
...
...
@@ -20,22 +20,23 @@ package com.google.android.exoplayer2.drm;
*
* @param <T> The reference type with which to make {@link Owner#onLastReferenceReleased} calls.
*/
public
abstract
class
CryptoResource
<
T
extends
Crypto
Resource
<
T
>>
{
public
abstract
class
DecryptionResource
<
T
extends
Decryption
Resource
<
T
>>
{
/**
* Implemented by the class in charge of managing a {@link CryptoResource resource's} lifecycle.
* Implemented by the class in charge of managing a {@link DecryptionResource resource's}
* lifecycle.
*/
public
interface
Owner
<
T
extends
Crypto
Resource
<
T
>>
{
public
interface
Owner
<
T
extends
Decryption
Resource
<
T
>>
{
/**
* Called when the last reference to a {@link
Crypto
Resource} is {@link #releaseReference()
* Called when the last reference to a {@link
Decryption
Resource} is {@link #releaseReference()
* released}.
*/
void
onLastReferenceReleased
(
Crypto
Resource
<
T
>
resource
);
void
onLastReferenceReleased
(
Decryption
Resource
<
T
>
resource
);
}
// TODO: Consider adding a handler on which the owner should be called.
private
final
Crypto
Resource
.
Owner
<
T
>
owner
;
private
final
Decryption
Resource
.
Owner
<
T
>
owner
;
private
int
referenceCount
;
/**
...
...
@@ -43,7 +44,7 @@ public abstract class CryptoResource<T extends CryptoResource<T>> {
*
* @param owner The owner of this instance.
*/
public
Crypto
Resource
(
Owner
<
T
>
owner
)
{
public
Decryption
Resource
(
Owner
<
T
>
owner
)
{
this
.
owner
=
owner
;
referenceCount
=
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment