Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
533
Issue boards
Milestones
Wiki
Code
Merge requests
11
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
f5feab81
Commit
f5feab81
authored
8 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix player resume from apps switch"
This reverts commit
40bd725f
.
parent
40bd725f
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/video/VideoPlayerActivity.java
+6
-10
6 additions, 10 deletions
...d/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
with
6 additions
and
10 deletions
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+
6
−
10
View file @
f5feab81
...
...
@@ -2866,7 +2866,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mIsPlaying
=
false
;
String
title
=
getResources
().
getString
(
R
.
string
.
title
);
boolean
fromStart
=
false
;
boolean
hasMedia
=
mService
.
hasMedia
();
String
itemTitle
=
null
;
int
positionInPlaylist
=
-
1
;
long
intentPosition
=
-
1
;
// position passed in by intent (ms)
...
...
@@ -2901,7 +2900,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
if
(
intent
.
hasExtra
(
PLAY_EXTRA_ITEM_TITLE
))
itemTitle
=
extras
.
getString
(
PLAY_EXTRA_ITEM_TITLE
);
if
(
positionInPlaylist
!=
-
1
&&
hasMedia
)
{
if
(
positionInPlaylist
!=
-
1
&&
mService
.
hasMedia
()
)
{
// Provided externally from AudioService
Log
.
d
(
TAG
,
"Continuing playback from PlaybackService at index "
+
positionInPlaylist
);
MediaWrapper
openedMedia
=
mService
.
getMedias
().
get
(
positionInPlaylist
);
...
...
@@ -2916,7 +2915,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
}
if
(
mUri
!=
null
)
{
if
(
hasMedia
&&
!
mUri
.
equals
(
mService
.
getCurrentMediaWrapper
().
getUri
()))
if
(
mService
.
hasMedia
()
&&
!
mUri
.
equals
(
mService
.
getCurrentMediaWrapper
().
getUri
()))
mService
.
stop
();
// restore last position
MediaWrapper
media
=
MediaDatabase
.
getInstance
().
getMedia
(
mUri
);
...
...
@@ -2966,6 +2965,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
// Start playback & seek
mService
.
addCallback
(
this
);
/* prepare playback */
boolean
hasMedia
=
mService
.
hasMedia
();
if
(
hasMedia
)
media
=
mService
.
getCurrentMediaWrapper
();
else
if
(
media
==
null
)
...
...
@@ -2981,13 +2981,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
// Handle playback
if
(!
hasMedia
)
mService
.
load
(
media
);
else
if
(!
mService
.
isPlaying
())
{
if
(
mService
.
getTime
()
>
0
)
{
seek
=
false
;
mService
.
play
();
}
else
mService
.
playIndex
(
positionInPlaylist
);
}
else
{
else
if
(!
mService
.
isPlaying
())
mService
.
playIndex
(
positionInPlaylist
);
else
{
seek
=
false
;
onPlaying
();
}
...
...
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