Bug 717841 part 2 - Fix HistoryQueryTask's time range checks. r=lucasr f=dougt a=dougt
authorChris Peterson <cpeterson@mozilla.com>
Thu, 12 Jan 2012 17:38:08 -0800
changeset 84755 e312a306ed0150aa9541e875b6628233eddd0695
parent 84754 46328da0936d021a130e6fea17f051db8eb3eb39
child 84756 88733ce1bef30577af5977197fcc1eb422ceaf46
push id21873
push usermlamouri@mozilla.com
push dateWed, 18 Jan 2012 10:29:07 +0000
treeherdermozilla-central@7538f4d4697c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr, dougt
bugs717841
milestone12.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 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
@@ -348,19 +348,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) {