Bug 917455 - Implement missing getInt() in TopSitesCursorWrapper (r=sriram, a=lsblakk)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 20 Sep 2013 15:53:04 -0400
changeset 160514 832d9813c147ef4511a5b9094ec3f012f916d0e6
parent 160513 0fcd50e19460dd22ed8df2d225f78219413f68b0
child 160515 607a8726ced14cbb8358bd4b3640a24b96a1dbe9
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram, lsblakk
bugs917455
milestone26.0a2
Bug 917455 - Implement missing getInt() in TopSitesCursorWrapper (r=sriram, a=lsblakk)
mobile/android/base/db/BrowserDB.java
--- a/mobile/android/base/db/BrowserDB.java
+++ b/mobile/android/base/db/BrowserDB.java
@@ -448,16 +448,30 @@ public class BrowserDB {
             }
 
             if (!super.isBeforeFirst() && !super.isAfterLast())
                 return super.getLong(columnIndex);
             return 0;
         }
 
         @Override
+        public int getInt(int columnIndex) {
+            if (hasPinnedSites()) {
+                PinnedSite site = getPinnedSite(mIndex);
+                if (site != null) {
+                    return 0;
+                }
+            }
+
+            if (!super.isBeforeFirst() && !super.isAfterLast())
+                return super.getInt(columnIndex);
+            return 0;
+        }
+
+        @Override
         public String getString(int columnIndex) {
             if (hasPinnedSites()) {
                 PinnedSite site = getPinnedSite(mIndex);
                 if (site != null) {
                     if (columnIndex == mCursor.getColumnIndex(URLColumns.URL)) {
                         return site.url;
                     } else if (columnIndex == mCursor.getColumnIndex(URLColumns.TITLE)) {
                         return site.title;