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
68ef1d3e
authored
Mar 20, 2019
by
olly
Committed by
Oliver Woodman
Mar 20, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Temporarily disable cache UID creation.
PiperOrigin-RevId: 239476751
parent
3abf5ed1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/Cache.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/SimpleCache.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/Cache.java
View file @
68ef1d3e
...
...
@@ -77,6 +77,9 @@ public interface Cache {
super
(
cause
);
}
public
CacheException
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
}
/**
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/SimpleCache.java
View file @
68ef1d3e
...
...
@@ -557,16 +557,18 @@ public final class SimpleCache implements Cache {
private
void
initialize
()
{
if
(!
cacheDir
.
exists
())
{
if
(!
cacheDir
.
mkdirs
())
{
initializationException
=
new
CacheException
(
"Failed to create cache directory: "
+
cacheDir
);
String
message
=
"Failed to create cache directory: "
+
cacheDir
;
Log
.
e
(
TAG
,
message
);
initializationException
=
new
CacheException
(
message
);
return
;
}
}
File
[]
files
=
cacheDir
.
listFiles
();
if
(
files
==
null
)
{
initializationException
=
new
CacheException
(
"Failed to list cache directory files: "
+
cacheDir
);
String
message
=
"Failed to list cache directory files: "
+
cacheDir
;
Log
.
e
(
TAG
,
message
);
initializationException
=
new
CacheException
(
message
);
return
;
}
...
...
@@ -575,8 +577,11 @@ public final class SimpleCache implements Cache {
try
{
uid
=
createUid
(
cacheDir
);
}
catch
(
IOException
e
)
{
initializationException
=
new
CacheException
(
"Failed to create cache UID: "
+
cacheDir
);
return
;
String
message
=
"Failed to create cache UID: "
+
cacheDir
;
Log
.
e
(
TAG
,
message
,
e
);
// TODO: Reinstate this only when a database index is used [Internal ref: b/128933265].
// initializationException = new CacheException(message, e);
// return;
}
}
...
...
@@ -591,7 +596,9 @@ public final class SimpleCache implements Cache {
loadDirectory
(
cacheDir
,
/* isRoot= */
true
,
files
,
/* fileMetadata= */
null
);
}
}
catch
(
IOException
e
)
{
initializationException
=
new
CacheException
(
e
);
String
message
=
"Failed to initialize cache indices: "
+
cacheDir
;
Log
.
e
(
TAG
,
message
,
e
);
initializationException
=
new
CacheException
(
message
,
e
);
return
;
}
...
...
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