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
15
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
8c9029aa
Commit
8c9029aa
authored
8 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Check service connection in dialog cancel
parent
9bf8e30f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/src/org/videolan/vlc/PlaybackService.java
+1
-5
1 addition, 5 deletions
vlc-android/src/org/videolan/vlc/PlaybackService.java
vlc-android/src/org/videolan/vlc/media/MediaUtils.java
+14
-3
14 additions, 3 deletions
vlc-android/src/org/videolan/vlc/media/MediaUtils.java
with
15 additions
and
8 deletions
vlc-android/src/org/videolan/vlc/PlaybackService.java
+
1
−
5
View file @
8c9029aa
...
...
@@ -2164,11 +2164,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
public
void
disconnect
()
{
if
(
mBound
)
{
mBound
=
false
;
try
{
mContext
.
unbindService
(
mServiceConnection
);
}
catch
(
IllegalArgumentException
e
)
{
//Safety catch
}
mContext
.
unbindService
(
mServiceConnection
);
}
}
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/media/MediaUtils.java
+
14
−
3
View file @
8c9029aa
...
...
@@ -237,7 +237,8 @@ public class MediaUtils {
private
static
class
DialogCallback
extends
BaseCallBack
{
private
final
ProgressDialog
dialog
;
final
private
Runnable
mRunnable
;
private
final
Runnable
mRunnable
;
private
boolean
performAction
=
true
;
private
interface
Runnable
{
void
run
(
PlaybackService
service
);
...
...
@@ -254,7 +255,12 @@ public class MediaUtils {
dialog
.
setOnCancelListener
(
new
DialogInterface
.
OnCancelListener
()
{
@Override
public
void
onCancel
(
DialogInterface
dialog
)
{
mClient
.
disconnect
();
synchronized
(
this
)
{
if
(
performAction
)
performAction
=
false
;
else
mClient
.
disconnect
();
}
}
});
mClient
.
connect
();
...
...
@@ -262,7 +268,12 @@ public class MediaUtils {
@Override
public
void
onConnected
(
PlaybackService
service
)
{
mRunnable
.
run
(
service
);
synchronized
(
this
)
{
if
(
performAction
)
{
performAction
=
false
;
mRunnable
.
run
(
service
);
}
}
dialog
.
cancel
();
}
...
...
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