Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
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
0744a721
Commit
0744a721
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Use app UI thread handler instead of creating one
parent
40dbd5fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
-4
1 addition, 4 deletions
...id/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
with
1 addition
and
4 deletions
vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
+
1
−
4
View file @
0744a721
...
...
@@ -30,8 +30,6 @@ import android.databinding.ViewDataBinding;
import
android.graphics.Bitmap
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.net.Uri
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.support.v4.view.ViewCompat
;
import
android.text.TextUtils
;
import
android.view.View
;
...
...
@@ -55,7 +53,6 @@ public class AsyncImageLoader {
}
public
final
static
String
TAG
=
"VLC/AsyncImageLoader"
;
private
static
final
Handler
sHandler
=
new
Handler
(
Looper
.
getMainLooper
());
public
static
final
Bitmap
DEFAULT_COVER_VIDEO
=
BitmapCache
.
getFromResource
(
VLCApplication
.
getAppResources
(),
R
.
drawable
.
ic_no_thumbnail_1610
);
public
static
final
BitmapDrawable
DEFAULT_COVER_VIDEO_DRAWABLE
=
new
BitmapDrawable
(
VLCApplication
.
getAppResources
(),
DEFAULT_COVER_VIDEO
);
...
...
@@ -158,7 +155,7 @@ public class AsyncImageLoader {
vdb
.
setVariable
(
BR
.
cover
,
new
BitmapDrawable
(
VLCApplication
.
getAppResources
(),
bitmap
));
vdb
.
setVariable
(
BR
.
protocol
,
null
);
}
else
{
sHandler
.
post
(
new
Runnable
()
{
VLCApplication
.
runOnMainThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
target
instanceof
ImageView
)
{
...
...
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