Commit addf38f8 authored by Geoffrey Métais's avatar Geoffrey Métais

Remove this intent, setting in manifest handles it

parent f336a326
......@@ -91,7 +91,6 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
private static final int SHOW_PROGRESS = 0;
private static final int SHOW_TOAST = 1;
public static final String START_FROM_NOTIFICATION = "from_notification";
public static final String ACTION_REMOTE_GENERIC = "org.videolan.vlc.remote.";
public static final String ACTION_REMOTE_BACKWARD = "org.videolan.vlc.remote.Backward";
public static final String ACTION_REMOTE_PLAY = "org.videolan.vlc.remote.Play";
......@@ -505,7 +504,6 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
*/
if (action.startsWith(ACTION_REMOTE_GENERIC) && !mMediaPlayer.isPlaying() && !hasCurrentMedia()) {
Intent iVlc = new Intent(context, MainActivity.class);
iVlc.putExtra(START_FROM_NOTIFICATION, true);
iVlc.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(iVlc);
}
......@@ -881,7 +879,6 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
final Intent notificationIntent = new Intent(PlaybackService.this, MainActivity.class);
notificationIntent.setAction(AudioPlayerContainerActivity.ACTION_SHOW_PLAYER);
notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER);
notificationIntent.putExtra(START_FROM_NOTIFICATION, true);
pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
}
......
......@@ -220,10 +220,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements OnItem
protected void onResume() {
super.onResume();
/* FIXME: this is used to avoid having MainActivity twice in the backstack */
if (getIntent() != null && getIntent().hasExtra(PlaybackService.START_FROM_NOTIFICATION))
getIntent().removeExtra(PlaybackService.START_FROM_NOTIFICATION);
if (mSlidingPane.getState() == mSlidingPane.STATE_CLOSED)
mActionBar.hide();
}
......
......@@ -40,7 +40,6 @@ import org.videolan.vlc.gui.MainActivity;
public class VLCAppWidgetProvider extends AppWidgetProvider {
public static final String TAG = "VLC/VLCAppWidgetProvider";
public static final String START_FROM_NOTIFICATION = "from_notification";
public static final String ACTION_REMOTE_BACKWARD = "org.videolan.vlc.remote.Backward";
public static final String ACTION_REMOTE_PLAYPAUSE = "org.videolan.vlc.remote.PlayPause";
public static final String ACTION_REMOTE_STOP = "org.videolan.vlc.remote.Stop";
......@@ -86,7 +85,6 @@ public class VLCAppWidgetProvider extends AppWidgetProvider {
Intent iStop = new Intent(ACTION_REMOTE_STOP);
Intent iForward = new Intent(ACTION_REMOTE_FORWARD);
Intent iVlc = new Intent(VLCApplication.getAppContext(), MainActivity.class);
iVlc.putExtra(START_FROM_NOTIFICATION, true);
PendingIntent piBackward = PendingIntent.getBroadcast(context, 0, iBackward, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent piPlay = PendingIntent.getBroadcast(context, 0, iPlay, PendingIntent.FLAG_UPDATE_CURRENT);
......
Markdown is supported
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