diff options
author | Grace Kloba <klobag@google.com> | 2009-09-23 21:37:25 -0700 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2009-09-24 09:39:13 -0700 |
commit | 0923d69a8ca45222cabd82a80eaa88da9f132e9a (patch) | |
tree | ee44a46706f09fa680398ca4a20a9e8640d78af6 /src/com/android | |
parent | 10fdba8a1a4598e7081c150f551c15dbe4a55634 (diff) | |
download | packages_apps_Browser-0923d69a8ca45222cabd82a80eaa88da9f132e9a.zip packages_apps_Browser-0923d69a8ca45222cabd82a80eaa88da9f132e9a.tar.gz packages_apps_Browser-0923d69a8ca45222cabd82a80eaa88da9f132e9a.tar.bz2 |
If we get web search request in onCreate, just finish the
current activity. Otherwise it puts the BrowserActivity in
a bad state where there is no current tab.
Fix http://b/issue?id=2142368
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 8e70355..e5434ed 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -305,6 +305,13 @@ public class BrowserActivity extends Activity mResolver = getContentResolver(); + // If this was a web search request, pass it on to the default web + // search provider and finish this activity. + if (handleWebSearchIntent(getIntent())) { + finish(); + return; + } + // // start MASF proxy service // @@ -412,12 +419,6 @@ public class BrowserActivity extends Activity }; registerReceiver(mPackageInstallationReceiver, filter); - // If this was a web search request, pass it on to the default web search provider. - if (handleWebSearchIntent(getIntent())) { - moveTaskToBack(true); - return; - } - if (!mTabControl.restoreState(icicle)) { // clear up the thumbnail directory if we can't restore the state as // none of the files in the directory are referenced any more. @@ -1095,6 +1096,9 @@ public class BrowserActivity extends Activity Log.v(LOGTAG, "BrowserActivity.onDestroy: this=" + this); } super.onDestroy(); + + if (mTabControl == null) return; + // Remove the current tab and sub window TabControl.Tab t = mTabControl.getCurrentTab(); if (t != null) { |