OSDN Git Service

support for changes to the sync settings and control API
authorFred Quintana <fredq@google.com>
Tue, 23 Jun 2009 01:06:20 +0000 (18:06 -0700)
committerFred Quintana <fredq@google.com>
Tue, 23 Jun 2009 01:06:20 +0000 (18:06 -0700)
src/com/android/calendar/SelectCalendarsActivity.java

index a886139..429ec41 100644 (file)
@@ -18,7 +18,6 @@ package com.android.calendar;
 
 import android.app.Activity;
 import android.app.AlertDialog;
-import android.content.AsyncQueryHandler;
 import android.content.ContentResolver;
 import android.content.ContentUris;
 import android.content.ContentValues;
@@ -260,10 +259,10 @@ public class SelectCalendarsActivity extends Activity implements ListView.OnItem
     // This sync is done automatically in the background when the
     // SelectCalendars activity is started.
     private void startCalendarMetafeedSync() {
-        Uri uri = Calendars.CONTENT_URI;
         Bundle extras = new Bundle();
-        extras.putBoolean(ContentResolver.SYNC_EXTRAS_FORCE, true);
+        extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
         extras.putBoolean("metafeedonly", true);
-        mContentResolver.startSync(uri, extras);
+        ContentResolver.requestSync(null /* all accounts */,
+                Calendars.CONTENT_URI.getAuthority(), extras);
     }
 }