[Android] Ensure wakelock and audiofocus are released
Geoffrey Métais
git at videolan.org
Thu Nov 9 18:19:36 CET 2017
vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 9 15:56:28 2017 +0100| [01a61ad6e33fbd9d1e7b5cf7e1cf46394fb4b5c6] | committer: Geoffrey Métais
Ensure wakelock and audiofocus are released
(cherry picked from commit 99e5eb86f3cc055a20bd240fc8b3fd1e4913a312)
> https://code.videolan.org/videolan/vlc-android/commit/01a61ad6e33fbd9d1e7b5cf7e1cf46394fb4b5c6
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 298972d51..fe43df0bc 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -731,6 +731,9 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
};
private void onPlaybackStopped() {
+ if (mWakeLock.isHeld())
+ mWakeLock.release();
+ changeAudioFocus(false);
if (mStopped)
return;
mMedialibrary.resumeBackgroundOperations();
@@ -739,9 +742,6 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
executeUpdate();
publishState();
executeUpdateProgress();
- if (mWakeLock.isHeld())
- mWakeLock.release();
- changeAudioFocus(false);
}
private void showPlayer() {
More information about the Android
mailing list