Skip to content
Snippets Groups Projects
Commit c70ae7c7 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

PlaybackService: safer way to access app context

parent dd9e6136
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ public class PlaybackService extends MediaBrowserServiceCompat{
// Make sure the audio player will acquire a wake-lock while playing. If we don't do
// that, the CPU might go to sleep while the song is playing, causing playback to stop.
final PowerManager pm = (PowerManager) VLCApplication.getAppContext().getSystemService(Context.POWER_SERVICE);
final PowerManager pm = (PowerManager) getApplicationContext().getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
updateHasWidget();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment