mirror of
https://github.com/etesync/android
synced 2025-06-21 07:28:49 +00:00
Syncmanager: get a collection info for all sync managers.
This commit is contained in:
parent
01add874dc
commit
c3e30138dd
@ -58,13 +58,11 @@ public class ContactsSyncManager extends SyncManager {
|
|||||||
|
|
||||||
final private ContentProviderClient provider;
|
final private ContentProviderClient provider;
|
||||||
final private HttpUrl remote;
|
final private HttpUrl remote;
|
||||||
final private CollectionInfo info;
|
|
||||||
|
|
||||||
public ContactsSyncManager(Context context, Account account, AccountSettings settings, Bundle extras, String authority, ContentProviderClient provider, SyncResult result, HttpUrl principal, CollectionInfo info) throws InvalidAccountException {
|
public ContactsSyncManager(Context context, Account account, AccountSettings settings, Bundle extras, String authority, ContentProviderClient provider, SyncResult result, HttpUrl principal, CollectionInfo info) throws InvalidAccountException {
|
||||||
super(context, account, settings, extras, authority, result, info.url, CollectionInfo.Type.ADDRESS_BOOK);
|
super(context, account, settings, extras, authority, result, info.url, CollectionInfo.Type.ADDRESS_BOOK);
|
||||||
this.provider = provider;
|
this.provider = provider;
|
||||||
this.remote = principal;
|
this.remote = principal;
|
||||||
this.info = info;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,7 +53,7 @@ import static com.etesync.syncadapter.Constants.KEY_ACCOUNT;
|
|||||||
|
|
||||||
abstract public class SyncManager {
|
abstract public class SyncManager {
|
||||||
protected final NotificationHelper notificationManager;
|
protected final NotificationHelper notificationManager;
|
||||||
protected final String journalUid;
|
protected final CollectionInfo info;
|
||||||
|
|
||||||
protected final Context context;
|
protected final Context context;
|
||||||
protected final Account account;
|
protected final Account account;
|
||||||
@ -107,14 +107,14 @@ abstract public class SyncManager {
|
|||||||
// create HttpClient with given logger
|
// create HttpClient with given logger
|
||||||
httpClient = HttpClient.create(context, account);
|
httpClient = HttpClient.create(context, account);
|
||||||
|
|
||||||
|
data = ((App) context.getApplicationContext()).getData();
|
||||||
|
info = JournalEntity.fetch(data, journalUid).getInfo();
|
||||||
|
|
||||||
// dismiss previous error notifications
|
// dismiss previous error notifications
|
||||||
this.journalUid = journalUid;
|
|
||||||
notificationManager = new NotificationHelper(context, journalUid, notificationId());
|
notificationManager = new NotificationHelper(context, journalUid, notificationId());
|
||||||
notificationManager.cancel();
|
notificationManager.cancel();
|
||||||
|
|
||||||
crypto = new Crypto.CryptoManager(settings.password(), journalUid);
|
crypto = new Crypto.CryptoManager(settings.password(), journalUid);
|
||||||
|
|
||||||
data = ((App) context.getApplicationContext()).getData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract int notificationId();
|
protected abstract int notificationId();
|
||||||
|
Loading…
Reference in New Issue
Block a user