From cb555bc06f53c094faebb089f9b53da87a41ac85 Mon Sep 17 00:00:00 2001 From: TwistedUmbrella Date: Sun, 25 Jan 2015 15:47:40 -0500 Subject: [PATCH] Properly flush an intent after the data is handled Add a missing bracket for the intent cancellation --- shell/android/src/com/reicast/emulator/MainActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell/android/src/com/reicast/emulator/MainActivity.java b/shell/android/src/com/reicast/emulator/MainActivity.java index 56841d19c..4c467edb7 100644 --- a/shell/android/src/com/reicast/emulator/MainActivity.java +++ b/shell/android/src/com/reicast/emulator/MainActivity.java @@ -136,8 +136,12 @@ public class MainActivity extends SlidingFragmentActivity implements // When viewing a resource, pass its URI to the native code for opening Intent intent = getIntent(); if (intent.getAction() != null) { - if (intent.getAction().equals(Intent.ACTION_VIEW)) + if (intent.getAction().equals(Intent.ACTION_VIEW)) { onGameSelected(Uri.parse(intent.getData().toString())); + // Flush the intent to prevent multiple calls + getIntent().setData(null); + setIntent(null); + } } // Check that the activity is using the layout version with