OSDN Git Service

b/2558564 Fixed the problem where going to "today" would cause to a previous time.
authorMichael Chan <mchan@android.com>
Wed, 7 Apr 2010 02:10:37 +0000 (19:10 -0700)
committerMichael Chan <mchan@android.com>
Wed, 7 Apr 2010 02:10:37 +0000 (19:10 -0700)
This is a workaround for the fact that Listview doesn't me telling it to show a particular item

Change-Id: Ibf78961698cdd8c4290dde9c00d7de16ceb3dffb

src/com/android/calendar/AgendaActivity.java

index c6cb8db..2947598 100644 (file)
@@ -28,7 +28,6 @@ import android.content.SharedPreferences;
 import android.database.ContentObserver;
 import android.os.Bundle;
 import android.os.Handler;
-import android.preference.PreferenceManager;
 import android.provider.Calendar.Events;
 import android.text.format.Time;
 import android.util.Log;
@@ -215,8 +214,8 @@ public class AgendaActivity extends Activity implements Navigator {
     /* Navigator interface methods */
     public void goToToday() {
         Time now = new Time();
-        now.set(System.currentTimeMillis());
-        goTo(now, true);
+        now.setToNow();
+        mAgendaListView.goTo(now, true); // Force refresh
     }
 
     public void goTo(Time time, boolean animate) {