Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
177bec2a
Commit
177bec2a
authored
Feb 24, 2017
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore cache policy in cover fetching
parent
9fb81380
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
+8
-1
No files found.
vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
View file @
177bec2a
...
...
@@ -378,7 +378,13 @@ public class AudioUtil {
}
public
static
Bitmap
readCoverBitmap
(
String
path
,
int
width
)
{
Bitmap
cover
=
null
;
if
(
path
==
null
)
return
null
;
if
(
path
.
startsWith
(
"file"
))
path
=
path
.
substring
(
7
);
Bitmap
cover
=
BitmapCache
.
getInstance
().
getBitmapFromMemCache
(
path
);
if
(
cover
!=
null
)
return
cover
;
BitmapFactory
.
Options
options
=
new
BitmapFactory
.
Options
();
/* Get the resolution of the bitmap without allocating the memory */
...
...
@@ -397,6 +403,7 @@ public class AudioUtil {
// Decode the file (with memory allocation this time)
cover
=
BitmapFactory
.
decodeFile
(
path
,
options
);
BitmapCache
.
getInstance
().
addBitmapToMemCache
(
path
,
cover
);
}
return
cover
;
}
...
...
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