Bug 717841 part 2 - Fix HistoryQueryTask's time range checks. r=lucasr f=dougt a=dougt
authorChris Peterson <cpeterson@mozilla.com>
Thu, 19 Jan 2012 16:33:38 -0800
changeset 85009 9f53cb953f311935f09da9129f97cf339e9c6a0c
parent 85008 7963e62762928604bd0c97b405c06f4c115eaa67
child 85010 5222a2f174c45faca691ed98d5c4cd7ce37871da
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr, dougt
bugs717841
milestone11.0a2
Bug 717841 part 2 - Fix HistoryQueryTask's time range checks. r=lucasr f=dougt a=dougt
mobile/android/base/AwesomeBarTabs.java
--- a/mobile/android/base/AwesomeBarTabs.java
+++ b/mobile/android/base/AwesomeBarTabs.java
@@ -347,19 +347,23 @@ public class AwesomeBarTabs extends TabH
             }
         }
 
         private HistorySection getSectionForTime(long time, long today) {
             long delta = today - time;
 
             if (delta < 0) {
                 return HistorySection.TODAY;
-            } else if (delta > 0 && delta < MS_PER_DAY) {
+            }
+
+            if (delta < MS_PER_DAY) {
                 return HistorySection.YESTERDAY;
-            } else if (delta > MS_PER_DAY && delta < MS_PER_WEEK) {
+            }
+
+            if (delta < MS_PER_WEEK) {
                 return HistorySection.WEEK;
             }
 
             return HistorySection.OLDER;
         }
 
         @SuppressWarnings("unchecked")
         protected void onPostExecute(Pair<List,List> result) {