support for changes to the sync settings and control API

This commit is contained in:
Fred Quintana
2009-06-22 18:07:42 -07:00
parent 7b73055d68
commit 31989d7994

View File

@@ -278,13 +278,7 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
ConnectivityManager connManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
boolean sync = getBackgroundDataState(context);
connManager.setBackgroundDataSetting(!sync);
IContentService contentService = ContentResolver.getContentService();
try {
contentService.setListenForNetworkTickles(!sync);
} catch (RemoteException e) {
Log.d(TAG, "toggleBackgroundData: " + e);
}
ContentResolver.setMasterSyncAutomatically(!sync);
}
/**