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
0dd30546
authored
Jan 29, 2019
by
olly
Committed by
Oliver Woodman
Jan 30, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Clarity improvement: Use named variables
PiperOrigin-RevId: 231425073
parent
52ff1820
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/SimpleCacheSpan.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/SimpleCacheSpan.java
View file @
0dd30546
...
@@ -111,12 +111,16 @@ import java.util.regex.Pattern;
...
@@ -111,12 +111,16 @@ import java.util.regex.Pattern;
if
(!
matcher
.
matches
())
{
if
(!
matcher
.
matches
())
{
return
null
;
return
null
;
}
}
int
id
=
Integer
.
parseInt
(
matcher
.
group
(
1
));
int
id
=
Integer
.
parseInt
(
matcher
.
group
(
1
));
String
key
=
index
.
getKeyForId
(
id
);
String
key
=
index
.
getKeyForId
(
id
);
return
key
==
null
if
(
key
==
null
)
{
?
null
return
null
;
:
new
SimpleCacheSpan
(
}
key
,
Long
.
parseLong
(
matcher
.
group
(
2
)),
length
,
Long
.
parseLong
(
matcher
.
group
(
3
)),
file
);
long
position
=
Long
.
parseLong
(
matcher
.
group
(
2
));
long
lastAccessTime
=
Long
.
parseLong
(
matcher
.
group
(
3
));
return
new
SimpleCacheSpan
(
key
,
position
,
length
,
lastAccessTime
,
file
);
}
}
/**
/**
...
...
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