diff options
| author | John Reck <jreck@google.com> | 2011-10-05 14:55:30 -0700 |
|---|---|---|
| committer | John Reck <jreck@google.com> | 2011-10-05 14:56:40 -0700 |
| commit | 9dd4a4129b91343b7b21e2389519ff1a795a447d (patch) | |
| tree | 28f89999402f0192fad4309f1bbd4160d578a56f /src/com/android/browser | |
| parent | 81260dfcd9150173416598bdd3d44190a00e6c95 (diff) | |
| download | packages_apps_Browser-9dd4a4129b91343b7b21e2389519ff1a795a447d.tar.gz packages_apps_Browser-9dd4a4129b91343b7b21e2389519ff1a795a447d.tar.bz2 packages_apps_Browser-9dd4a4129b91343b7b21e2389519ff1a795a447d.zip | |
Fix intent handling
Bug: 5405096
If state != null, don't process the intent in getIntent, it will be
stale
Change-Id: Icc854a1d8f11fdbd60c1f7f854053f2294864b0f
Diffstat (limited to 'src/com/android/browser')
| -rw-r--r-- | src/com/android/browser/Controller.java | 7 | ||||
| -rw-r--r-- | src/com/android/browser/IntentHandler.java | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 602df0641..edec96f42 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -336,8 +336,11 @@ public class Controller // TabControl.restoreState() will create a new tab even if // restoring the state fails. setActiveTab(mTabControl.getCurrentTab()); - // Handle the intent - mIntentHandler.onNewIntent(intent); + // Handle the intent if needed. If icicle != null, we are restoring + // and the intent will be stale - ignore it. + if (icicle == null) { + mIntentHandler.onNewIntent(intent); + } } // Read JavaScript flags if it exists. String jsFlags = getSettings().getJsEngineFlags(); diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java index cc6b57c91..c76197d4c 100644 --- a/src/com/android/browser/IntentHandler.java +++ b/src/com/android/browser/IntentHandler.java @@ -65,7 +65,6 @@ public class IntentHandler { } void onNewIntent(Intent intent) { - mActivity.setIntent(null); Tab current = mTabControl.getCurrentTab(); // When a tab is closed on exit, the current tab index is set to -1. // Reset before proceed as Browser requires the current tab to be set. |
