[Android] Do not pass PID as Intent extra

Geoffrey Métais git at videolan.org
Thu Aug 25 17:14:26 CEST 2016


vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Aug 25 17:13:35 2016 +0200| [7ba7039425b67ef8403a7c94e2bf880d163f2cd9] | committer: Geoffrey Métais

Do not pass PID as Intent extra

(cherry picked from commit 1e76f739c84ca256e39af39e0460b5d5b6c56b19)

> https://code.videolan.org/videolan/vlc-android/commit/7ba7039425b67ef8403a7c94e2bf880d163f2cd9
---

 vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java | 2 +-
 vlc-android/src/org/videolan/vlc/util/VLCInstance.java        | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java b/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
index 5f09f29..404c993 100644
--- a/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
@@ -48,7 +48,7 @@ public class NativeCrashActivity extends Activity {
         mRestartButton.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
-                android.os.Process.killProcess(getIntent().getExtras().getInt("PID"));
+                android.os.Process.killProcess(android.os.Process.myPid());
                 Intent i = new Intent(NativeCrashActivity.this, StartActivity.class);
                 i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                 startActivity(i);
diff --git a/vlc-android/src/org/videolan/vlc/util/VLCInstance.java b/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
index 35129a9..d2ee1aa 100644
--- a/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
+++ b/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
@@ -118,7 +118,6 @@ public class VLCInstance {
                 public void onNativeCrash() {
                     Intent i = new Intent(context, NativeCrashActivity.class);
                     i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                    i.putExtra("PID", android.os.Process.myPid());
                     context.startActivity(i);
                 }
             });



More information about the Android mailing list