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 286409 a2f1be1d0d5984ea94044a810299a2a91418a8c4
parent 286408 d593a1d313c6f365ed66432e4b7f06544a31ac68
child 286410 5508066783ab301954c6488d2bd3eb20d61f1b63
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs1184708
milestone42.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 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;