Bug 1184708 - Set progress view private mode when visibility is changed. r=mhaigh
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 22 Jul 2015 19:03:47 -0700
changeset 254762 a2f1be1d0d5984ea94044a810299a2a91418a8c4
parent 254761 d593a1d313c6f365ed66432e4b7f06544a31ac68
child 254763 5508066783ab301954c6488d2bd3eb20d61f1b63
push id16720
push userryanvm@gmail.com
push dateMon, 27 Jul 2015 19:45:38 +0000
treeherderb2g-inbound@13354b414396 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs1184708
milestone42.0a1
Bug 1184708 - Set progress view private mode when visibility is changed. r=mhaigh
mobile/android/base/BrowserApp.java
mobile/android/base/toolbar/BrowserToolbar.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -473,18 +473,16 @@ public class BrowserApp extends GeckoApp
             case LOCATION_CHANGE:
                 // fall through
             case SELECTED:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
                     updateHomePagerForTab(tab);
                 }
 
                 mHideDynamicToolbarOnActionModeEnd = false;
-
-                mProgressView.setPrivateMode(tab.isPrivate());
                 break;
             case START:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
                     invalidateOptionsMenu();
 
                     if (mDynamicToolbar.isEnabled()) {
                         mDynamicToolbar.setVisible(true, VisibilityTransition.ANIMATE);
                     }
--- a/mobile/android/base/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/toolbar/BrowserToolbar.java
@@ -529,16 +529,17 @@ public abstract class BrowserToolbar ext
         if (selectedTab != null) {
             updateProgressVisibility(selectedTab, selectedTab.getLoadProgress());
         }
     }
 
     private void updateProgressVisibility(Tab selectedTab, int progress) {
         if (!isEditing() && selectedTab.getState() == Tab.STATE_LOADING) {
             progressBar.setProgress(progress);
+            progressBar.setPrivateMode(selectedTab.isPrivate());
             progressBar.setVisibility(View.VISIBLE);
         } else {
             progressBar.setVisibility(View.GONE);
         }
     }
 
     protected boolean isVisible() {
         return ViewHelper.getTranslationY(this) == 0;