Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
13
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
c0e1bef0
Commit
c0e1bef0
authored
9 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Use application threadpool in image loader
parent
f8a17fac
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
+1
-8
1 addition, 8 deletions
...id/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
with
1 addition
and
8 deletions
vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
+
1
−
8
View file @
c0e1bef0
...
...
@@ -34,9 +34,6 @@ import org.videolan.vlc.BR;
import
org.videolan.vlc.VLCApplication
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.ThreadPoolExecutor
;
import
java.util.concurrent.TimeUnit
;
public
class
AsyncImageLoader
{
...
...
@@ -47,12 +44,8 @@ public class AsyncImageLoader {
public
final
static
String
TAG
=
"VLC/AsyncImageLoader"
;
/* Maximum one thread that is killed after 2 seconds of inactivity */
static
ThreadPoolExecutor
sThreadPool
=
new
ThreadPoolExecutor
(
0
,
1
,
2
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<
Runnable
>());
public
static
void
LoadImage
(
final
Callbacks
cbs
,
final
View
target
){
sThreadPool
.
execute
(
new
Runnable
()
{
VLCApplication
.
runBackground
(
new
Runnable
()
{
@Override
public
void
run
()
{
final
Bitmap
bitmap
=
cbs
.
getImage
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment