[fenix] For https://github.com/mozilla-mobile/fenix/issues/9144 - Ignore previous Intent if activity is started from Recents
We'll now clearly differentiate between cold / hot starts of HomeActivity.kt. This is needed because Android will resend the original Intent which initially started the Activity whenever it is restarted from the Recents Screen if the activity is already destroyed at that time. So in the event that the activity was before started with an Intent to open a webpage for example whenever the activity is restarted from Recents it will receive the same Intent to open a webpage even though that Intent has already been consumed. Activity's onCreate() will only use the intent processors when the activity is cold started so that we'll only initially act upon Intents configured for different behaviors inside the app. If the activity is destroyed while in background and opened from Recents it will not act upon the original Intent which is now resent by Android. Activity's onNewIntent() will be called to act upon a new Intent if the activity is hot started since we are declared as singleTask and it now has the responsibility to delegate various intent processors to consume that Intent.pull/600/head
parent
088ab8e594
commit
3eda4d3fc3
Loading…
Reference in New Issue