From 088a7d0d8c4d0652a42b8bbeb940421cea5ad8dc Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Thu, 1 Oct 2009 00:21:59 -0700 Subject: [PATCH] b/1972231 A tweak to improve on going to a specific time in the agenda view e.g. from weekview or widget. The root problem is that ListView ignores my setSelection() call if notifyDataSetChange is called before it has a chance to redraw. This can happen when Agenda view starts up and fires off multiple queries. Change-Id: I30c382432961dbf2d7788723343764b51a665657 --- src/com/android/calendar/AgendaWindowAdapter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/android/calendar/AgendaWindowAdapter.java b/src/com/android/calendar/AgendaWindowAdapter.java index f3d95a2..9d4fb46 100644 --- a/src/com/android/calendar/AgendaWindowAdapter.java +++ b/src/com/android/calendar/AgendaWindowAdapter.java @@ -481,8 +481,7 @@ public class AgendaWindowAdapter extends BaseAdapter { return; } - // Query for 2 days before the start day for a total of MIN_QUERY_DURATION days - startDay -= 2; + // Query for a total of MIN_QUERY_DURATION days int endDay = startDay + MIN_QUERY_DURATION; queueQuery(startDay, endDay, goToTime, QUERY_TYPE_CLEAN); -- 2.11.0