diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java index 5b4f33f618c..b1c562bc188 100644 --- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -217,10 +217,6 @@ abstract public class BrowserApp extends GeckoApp mFindInPageBar = (FindInPageBar) findViewById(R.id.find_in_page); - if (savedInstanceState != null) { - mBrowserToolbar.setTitle(savedInstanceState.getString(SAVED_STATE_TITLE)); - } - registerEventListener("CharEncoding:Data"); registerEventListener("CharEncoding:State"); registerEventListener("Feedback:LastUrl"); @@ -271,9 +267,12 @@ abstract public class BrowserApp extends GeckoApp // show about:home if we aren't restoring previous session if (mRestoreMode == RESTORE_NONE) { Tab tab = Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB); + } else { + hideAboutHome(); } } else { - Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED); + int flags = Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED; + Tabs.getInstance().loadUrl(uri, flags); } } @@ -634,6 +633,7 @@ abstract public class BrowserApp extends GeckoApp if (mAboutHomeShowing != null && !mAboutHomeShowing) return; + mBrowserToolbar.setShadowVisibility(true); mAboutHomeShowing = false; Runnable r = new AboutHomeRunnable(false); mMainHandler.postAtFrontOfQueue(r); @@ -646,7 +646,6 @@ abstract public class BrowserApp extends GeckoApp } public void run() { - mFormAssistPopup.hide(); if (mShow) { if (mAboutHomeContent == null) { mAboutHomeContent = (AboutHomeContent) findViewById(R.id.abouthome_content); diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java index 7de1f94ac65..1f745398a3a 100644 --- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -142,7 +142,6 @@ abstract public class GeckoApp public static final String ACTION_LOAD = "org.mozilla.gecko.LOAD"; public static final String ACTION_INIT_PW = "org.mozilla.gecko.INIT_PW"; public static final String ACTION_WIDGET = "org.mozilla.gecko.WIDGET"; - public static final String SAVED_STATE_TITLE = "title"; public static final String SAVED_STATE_IN_BACKGROUND = "inBackground"; public static final String SAVED_STATE_PRIVATE_SESSION = "privateSession"; @@ -701,10 +700,6 @@ abstract public class GeckoApp if (outState == null) outState = new Bundle(); - Tab tab = Tabs.getInstance().getSelectedTab(); - if (tab != null) - outState.putString(SAVED_STATE_TITLE, tab.getDisplayTitle()); - boolean inBackground = ((GeckoApplication)getApplication()).isApplicationInBackground(); @@ -719,9 +714,11 @@ abstract public class GeckoApp } if (tab.getState() == Tab.STATE_DELAYED) { - byte[] thumbnail = BrowserDB.getThumbnailForUrl(getContentResolver(), tab.getURL()); - if (thumbnail != null) - processThumbnail(tab, null, thumbnail); + if (tab.getURL() != null) { + byte[] thumbnail = BrowserDB.getThumbnailForUrl(getContentResolver(), tab.getURL()); + if (thumbnail != null) + processThumbnail(tab, null, thumbnail); + } return; } diff --git a/mobile/android/base/Tab.java b/mobile/android/base/Tab.java index 0980fb763cf..5d77591e74f 100644 --- a/mobile/android/base/Tab.java +++ b/mobile/android/base/Tab.java @@ -259,7 +259,9 @@ public class Tab { mTitle = (title == null ? "" : title); - updateHistory(mUrl, mTitle); + if (mUrl != null) + updateHistory(mUrl, mTitle); + Tabs.getInstance().notifyListeners(this, Tabs.TabEvents.TITLE); }