Commit aa380bd7 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Launch the audio player activity when the widget's cover is pressed.

... but only if a media is loaded. Fallback to the main activity if
there's nothing to play.
parent adc66436
......@@ -737,7 +737,8 @@ public class AudioService extends Service {
iStop.setAction(VLCAppWidgetProvider.ACTION_WIDGET_STOP);
Intent iForward = new Intent();
iForward.setAction(VLCAppWidgetProvider.ACTION_WIDGET_FORWARD);
Intent iVlc = new Intent(context, MainActivity.class);
Class<?> cls = (mCurrentMedia != null) ? AudioPlayerActivity.class : MainActivity.class;
Intent iVlc = new Intent(context, cls);
iVlc.putExtra(START_FROM_NOTIFICATION, true);
PendingIntent piBackward = PendingIntent.getBroadcast(context, 0, iBackward, PendingIntent.FLAG_UPDATE_CURRENT);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment