From c29ec54532e17565783353014102d269087c727a Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Fri, 28 Aug 2009 10:25:20 -0700 Subject: [PATCH] Fix Contacts sync adapter required by change to SyncManager Change-Id: Icfc1f191289170185548a03ca94d1f79f10b7519 --- src/com/android/exchange/ContactsSyncAdapterService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/exchange/ContactsSyncAdapterService.java b/src/com/android/exchange/ContactsSyncAdapterService.java index f134dc746..62e703d5f 100644 --- a/src/com/android/exchange/ContactsSyncAdapterService.java +++ b/src/com/android/exchange/ContactsSyncAdapterService.java @@ -27,9 +27,9 @@ import android.app.Service; import android.content.AbstractThreadedSyncAdapter; import android.content.ContentProviderClient; import android.content.ContentResolver; +import android.content.Context; import android.content.Intent; import android.content.SyncResult; -import android.content.Context; import android.database.Cursor; import android.os.Bundle; import android.os.IBinder; @@ -49,21 +49,25 @@ public class ContactsSyncAdapterService extends Service { } private static class SyncAdapterImpl extends AbstractThreadedSyncAdapter { + private Context mContext; + public SyncAdapterImpl(Context context) { super(context, true /* autoInitialize */); + mContext = context; } @Override public void performSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) { try { - ContactsSyncAdapterService.performSync(getContext(), account, extras, + ContactsSyncAdapterService.performSync(mContext, account, extras, authority, provider, syncResult); } catch (OperationCanceledException e) { } } } + @Override public void onCreate() { super.onCreate(); synchronized (sSyncAdapterLock) {