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
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
d323326a
Commit
d323326a
authored
8 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Popup manager integration
parent
d798202f
Branches
master
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/PlaybackService.java
+34
-4
34 additions, 4 deletions
vlc-android/src/org/videolan/vlc/PlaybackService.java
with
34 additions
and
4 deletions
vlc-android/src/org/videolan/vlc/PlaybackService.java
+
34
−
4
View file @
d323326a
...
...
@@ -69,6 +69,7 @@ import org.videolan.vlc.gui.AudioPlayerContainerActivity;
import
org.videolan.vlc.gui.helpers.AudioUtil
;
import
org.videolan.vlc.gui.preferences.PreferencesActivity
;
import
org.videolan.vlc.gui.preferences.PreferencesFragment
;
import
org.videolan.vlc.gui.video.PopupManager
;
import
org.videolan.vlc.gui.video.VideoPlayerActivity
;
import
org.videolan.vlc.media.MediaDatabase
;
import
org.videolan.vlc.media.MediaUtils
;
...
...
@@ -186,6 +187,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
*/
private
long
mWidgetPositionTimestamp
=
Calendar
.
getInstance
().
getTimeInMillis
();
private
ComponentName
mRemoteControlClientReceiverComponent
;
private
PopupManager
mPopupManager
;
private
static
LibVLC
LibVLC
()
{
return
VLCInstance
.
get
();
...
...
@@ -964,6 +966,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
mMediaSession
.
release
();
mMediaSession
=
null
;
}
removePopup
();
if
(
mMediaPlayer
==
null
)
return
;
savePosition
();
...
...
@@ -1729,18 +1732,45 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
*/
@MainThread
public
void
showWithoutParse
(
int
index
)
{
String
URI
=
mMediaList
.
getMRL
(
index
);
Log
.
v
(
TAG
,
"Showing index "
+
index
+
" with playing URI "
+
URI
);
// Show an URI without interrupting/losing the current stream
setVideoTrackEnabled
(
false
);
setSpuTrack
(-
1
);
MediaWrapper
media
=
mMediaList
.
getMedia
(
index
);
if
(
URI
==
null
||
!
mMediaPlayer
.
isPlaying
())
if
(
media
==
null
||
!
mMediaPlayer
.
isPlaying
())
return
;
// Show an URI without interrupting/losing the current stream
Log
.
v
(
TAG
,
"Showing index "
+
index
+
" with playing URI "
+
media
.
getUri
());
mCurrentIndex
=
index
;
notifyTrackChanged
();
showNotification
();
}
@MainThread
public
void
switchToPopup
(
int
index
)
{
showWithoutParse
(
index
);
showPopup
();
}
@MainThread
public
void
removePopup
()
{
if
(
mPopupManager
!=
null
)
{
mPopupManager
.
removePopup
();
}
mPopupManager
=
null
;
}
@MainThread
public
void
showPopup
()
{
if
(
mPopupManager
==
null
)
mPopupManager
=
new
PopupManager
(
this
);
mPopupManager
.
showPopup
();
}
public
void
setVideoTrackEnabled
(
boolean
enabled
)
{
mMediaPlayer
.
setVideoTrackEnabled
(
enabled
);
}
/**
* Append to the current existing playlist
*/
...
...
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