Bug 837815 - Reading list button opens Top Sites, not Reading List, r=wesj
authorMark Capella <markcapella@twcny.rr.com>
Thu, 14 Feb 2013 21:18:30 -0500
changeset 121996 64df2203966e0767a501ce069e907ee3c822812b
parent 121995 4ae2f6895c68c749d549dab36b78fc55793cf439
child 121997 8db40a38aeb1ebf73bbc42f6ebceb02c5349a89e
push id24314
push userryanvm@gmail.com
push dateFri, 15 Feb 2013 14:39:46 +0000
treeherdermozilla-central@326c5e4868fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs837815
milestone21.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 837815 - Reading list button opens Top Sites, not Reading List, r=wesj
mobile/android/base/AwesomeBarTabs.java
--- a/mobile/android/base/AwesomeBarTabs.java
+++ b/mobile/android/base/AwesomeBarTabs.java
@@ -170,17 +170,17 @@ public class AwesomeBarTabs extends TabH
                           mTabs[i].getTitleStringId(),
                           i);
         }
 
         tabWidget.setCurrentTab(0);
 
         styleSelectedTab();
 
-        // Initialize "App Pages" list with no filter
+        // Initialize "All Pages" list with no filter
         filter("");
     }
 
     @Override
     public void onAttachedToWindow() {
         super.onAttachedToWindow();
         mActivity.getLightweightTheme().addListener(this);
     }
@@ -196,16 +196,26 @@ public class AwesomeBarTabs extends TabH
         styleSelectedTab();
     }
 
     @Override
     public void onLightweightThemeReset() {
         styleSelectedTab();
     }
 
+    @Override
+    public void setCurrentTabByTag(String tag) {
+        for (int i = 0; i < mTabs.length; i++) {
+            if (tag.equals(mTabs[i].getTag())) {
+                mViewPager.setCurrentItem(i);
+                break;
+            }
+        }
+    }
+
     private void styleSelectedTab() {
         int selIndex = mViewPager.getCurrentItem();
         TabWidget tabWidget = getTabWidget();
         boolean isPrivate = false;
 
         if (mTarget != null && mTarget.equals(AwesomeBar.Target.CURRENT_TAB.name())) {
             Tab tab = Tabs.getInstance().getSelectedTab();
             if (tab != null)