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
253a0105
authored
May 19, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Cleanup
parent
658a7ffb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
38 deletions
library/src/main/java/com/google/android/exoplayer/drm/StreamingDrmSessionManager.java
library/src/main/java/com/google/android/exoplayer/upstream/Loader.java
library/src/main/java/com/google/android/exoplayer/drm/StreamingDrmSessionManager.java
View file @
253a0105
...
@@ -217,7 +217,7 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
...
@@ -217,7 +217,7 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
* Provides access to {@link MediaDrm#setPropertyString(String, String)}.
* Provides access to {@link MediaDrm#setPropertyString(String, String)}.
* <p>
* <p>
* This method may be called when the manager is in any state.
* This method may be called when the manager is in any state.
*
*
* @param key The property to write.
* @param key The property to write.
* @param value The value to write.
* @param value The value to write.
*/
*/
...
...
library/src/main/java/com/google/android/exoplayer/upstream/Loader.java
View file @
253a0105
...
@@ -129,21 +129,6 @@ public final class Loader {
...
@@ -129,21 +129,6 @@ public final class Loader {
}
}
/**
/**
* Invokes {@link #startLoading(Looper, Loadable, Callback)}, using the {@link Looper}
* associated with the calling thread. Loading is delayed by {@code delayMs}.
*
* @param loadable The {@link Loadable} to load.
* @param callback A callback to invoke when the load ends.
* @param delayMs Number of milliseconds to wait before calling {@link Loadable#load()}.
* @throws IllegalStateException If the calling thread does not have an associated {@link Looper}.
*/
public
void
startLoading
(
Loadable
loadable
,
Callback
callback
,
int
delayMs
)
{
Looper
myLooper
=
Looper
.
myLooper
();
Assertions
.
checkState
(
myLooper
!=
null
);
startLoading
(
myLooper
,
loadable
,
callback
,
delayMs
);
}
/**
* Start loading a {@link Loadable}.
* Start loading a {@link Loadable}.
* <p>
* <p>
* A {@link Loader} instance can only load one {@link Loadable} at a time, and so this method
* A {@link Loader} instance can only load one {@link Loadable} at a time, and so this method
...
@@ -154,24 +139,9 @@ public final class Loader {
...
@@ -154,24 +139,9 @@ public final class Loader {
* @param callback A callback to invoke when the load ends.
* @param callback A callback to invoke when the load ends.
*/
*/
public
void
startLoading
(
Looper
looper
,
Loadable
loadable
,
Callback
callback
)
{
public
void
startLoading
(
Looper
looper
,
Loadable
loadable
,
Callback
callback
)
{
startLoading
(
looper
,
loadable
,
callback
,
0
);
}
/**
* Start loading a {@link Loadable} after {@code delayMs} has elapsed.
* <p>
* A {@link Loader} instance can only load one {@link Loadable} at a time, and so this method
* must not be called when another load is in progress.
*
* @param looper The looper of the thread on which the callback should be invoked.
* @param loadable The {@link Loadable} to load.
* @param callback A callback to invoke when the load ends.
* @param delayMs Number of milliseconds to wait before calling {@link Loadable#load()}.
*/
public
void
startLoading
(
Looper
looper
,
Loadable
loadable
,
Callback
callback
,
int
delayMs
)
{
Assertions
.
checkState
(!
loading
);
Assertions
.
checkState
(!
loading
);
loading
=
true
;
loading
=
true
;
currentTask
=
new
LoadTask
(
looper
,
loadable
,
callback
,
delayMs
);
currentTask
=
new
LoadTask
(
looper
,
loadable
,
callback
);
downloadExecutorService
.
submit
(
currentTask
);
downloadExecutorService
.
submit
(
currentTask
);
}
}
...
@@ -213,15 +183,13 @@ public final class Loader {
...
@@ -213,15 +183,13 @@ public final class Loader {
private
final
Loadable
loadable
;
private
final
Loadable
loadable
;
private
final
Loader
.
Callback
callback
;
private
final
Loader
.
Callback
callback
;
private
final
int
delayMs
;
private
volatile
Thread
executorThread
;
private
volatile
Thread
executorThread
;
public
LoadTask
(
Looper
looper
,
Loadable
loadable
,
Loader
.
Callback
callback
,
int
delayMs
)
{
public
LoadTask
(
Looper
looper
,
Loadable
loadable
,
Loader
.
Callback
callback
)
{
super
(
looper
);
super
(
looper
);
this
.
loadable
=
loadable
;
this
.
loadable
=
loadable
;
this
.
callback
=
callback
;
this
.
callback
=
callback
;
this
.
delayMs
=
delayMs
;
}
}
public
void
quit
()
{
public
void
quit
()
{
...
@@ -235,9 +203,6 @@ public final class Loader {
...
@@ -235,9 +203,6 @@ public final class Loader {
public
void
run
()
{
public
void
run
()
{
try
{
try
{
executorThread
=
Thread
.
currentThread
();
executorThread
=
Thread
.
currentThread
();
if
(
delayMs
>
0
)
{
Thread
.
sleep
(
delayMs
);
}
if
(!
loadable
.
isLoadCanceled
())
{
if
(!
loadable
.
isLoadCanceled
())
{
loadable
.
load
();
loadable
.
load
();
}
}
...
...
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