From c865b49e305167a0e1f19423ed913c5c129efb2e Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 8 Jan 2020 17:13:18 -0800 Subject: [PATCH] Add missing super.onNewIntent() call From the onNewIntent docs: If you are handling new intents and may be making changes to the fragment state, you want to be sure to call through to the super-class here first. Otherwise, if your state is saved but the activity is not stopped, you could get an onNewIntent() call which happens before onResume() and trying to perform fragment operations at that point will throw IllegalStateException because the fragment manager thinks the state is still saved. --- .../android/io/flutter/app/FlutterFragmentActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java b/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java index 2aa0d131f8877..ef3f19b9f946c 100644 --- a/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java +++ b/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java @@ -101,7 +101,7 @@ public void onBackPressed() { super.onBackPressed(); } } - + @Override protected void onStart() { super.onStart(); @@ -141,6 +141,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { @Override protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); eventDelegate.onNewIntent(intent); }