From 7bcafde2ba532941c1eb8c9022eebd5398aeae2a Mon Sep 17 00:00:00 2001 From: Michael Kolb Date: Mon, 9 May 2011 13:55:59 -0700 Subject: refactor open tab code Change-Id: Ibcffa5a55b2b7dcf56174f9dd916a565b31506e9 --- src/com/android/browser/IntentHandler.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/com/android/browser/IntentHandler.java') diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java index 1322d96d9..40db29fc6 100644 --- a/src/com/android/browser/IntentHandler.java +++ b/src/com/android/browser/IntentHandler.java @@ -134,7 +134,7 @@ public class IntentHandler { } if (intent.getBooleanExtra(Browser.EXTRA_CREATE_NEW_TAB, false)) { - mController.openTabAndShow(mTabControl.getCurrentTab(), urlData, false, null); + mController.openTab(urlData); return; } final String appId = intent @@ -151,7 +151,10 @@ public class IntentHandler { mController.reuseTab(appTab, appId, urlData); return; } else { - mController.openTabAndShow(null, urlData, false, appId); + Tab tab = mController.openTab(urlData); + if (tab != null) { + tab.setAppId(appId); + } } } else { // No matching application tab, try to find a regular tab @@ -168,7 +171,10 @@ public class IntentHandler { // MAX_TABS. Then the url will be opened in the current // tab. If a new tab is created, it will have "true" for // exit on close. - mController.openTabAndShow(null, urlData, false, appId); + Tab tab = mController.openTab(urlData); + if (tab != null) { + tab.setAppId(appId); + } } } } else { -- cgit v1.2.3