[Android] Remove this intent, setting in manifest handles it
Geoffrey Métais
git at videolan.org
Wed Aug 12 15:22:17 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Aug 12 15:21:19 2015 +0200| [addf38f8358548617bd758ead29e70e4418f0172] | committer: Geoffrey Métais
Remove this intent, setting in manifest handles it
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=addf38f8358548617bd758ead29e70e4418f0172
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 3 ---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 4 ----
vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java | 2 --
3 files changed, 9 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index c6bb9f7..a5a6db2 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -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);
}
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 19702bd..c6b6c12 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -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();
}
diff --git a/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java b/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java
index e968708..8352131 100644
--- a/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java
+++ b/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java
@@ -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);
More information about the Android
mailing list