Bug 734913 - Start throbber in initialization. r=mfinkle a=blocking-fennec
authorBrian Nicholson <bnicholson@mozilla.com>
Mon, 23 Apr 2012 10:47:46 -0400
changeset 95446 d2b34e4338bbaace43832db728e142ba7beeed79
parent 95445 4ab101096ab3c7e9d5451564f3811929618dae34
child 95447 190fc7cd65c62e87cca7d95252032a831c93fc60
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, blocking-fennec
bugs734913
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 734913 - Start throbber in initialization. r=mfinkle a=blocking-fennec
mobile/android/base/BrowserToolbar.java
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -268,17 +268,19 @@ public class BrowserToolbar {
         if (visible) {
             mFavicon.setImageDrawable(mProgressSpinner);
             mProgressSpinner.start();
             setStopVisibility(true);
             Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber start");
         } else {
             mProgressSpinner.stop();
             setStopVisibility(false);
-            setFavicon(Tabs.getInstance().getSelectedTab().getFavicon());
+            Tab selectedTab = Tabs.getInstance().getSelectedTab();
+            if (selectedTab != null)
+                setFavicon(selectedTab.getFavicon());
             Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber stop");
         }
     }
 
     public void setStopVisibility(boolean visible) {
         mStop.setVisibility(visible ? View.VISIBLE : View.GONE);
         mSiteSecurity.setVisibility(visible ? View.GONE : View.VISIBLE);
         if (!visible && mTitleCanExpand)
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1636,26 +1636,30 @@ abstract public class GeckoApp
         String passedUri = null;
         String uri = getURIFromIntent(intent);
         if (uri != null && uri.length() > 0) {
             passedUri = uri;
             mBrowserToolbar.setTitle(uri);
         }
 
         mRestoreSession |= getProfile().shouldRestoreSession();
-        if (passedUri == null || passedUri.equals("about:home")) {
+
+        boolean isExternalURL = passedUri != null && !passedUri.equals("about:home");
+        if (!isExternalURL) {
             // show about:home if we aren't restoring previous session
             if (!mRestoreSession) {
                 mBrowserToolbar.updateTabCount(1);
                 showAboutHome();
             }
         } else {
             mBrowserToolbar.updateTabCount(1);
         }
 
+        mBrowserToolbar.setProgressVisibility(isExternalURL || mRestoreSession);
+
         // Start migrating as early as possible, can do this in
         // parallel with Gecko load.
         checkMigrateProfile();
 
         Uri data = intent.getData();
         if (data != null && "http".equals(data.getScheme()) &&
             isHostOnPrefetchWhitelist(data.getHost())) {
             Intent copy = new Intent(intent);