Properly flush an intent after the data is handled
Add a missing bracket for the intent cancellation
This commit is contained in:
parent
30cfc0b15a
commit
cb555bc06f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue