1
0
mirror of https://github.com/etesync/android synced 2025-01-11 00:01:12 +00:00

Syncmanager: get a collection info for all sync managers.

This commit is contained in:
Tom Hacohen 2017-03-29 14:47:43 +01:00
parent 01add874dc
commit c3e30138dd
2 changed files with 4 additions and 6 deletions

View File

@ -58,13 +58,11 @@ public class ContactsSyncManager extends SyncManager {
final private ContentProviderClient provider;
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 {
super(context, account, settings, extras, authority, result, info.url, CollectionInfo.Type.ADDRESS_BOOK);
this.provider = provider;
this.remote = principal;
this.info = info;
}
@Override

View File

@ -53,7 +53,7 @@ import static com.etesync.syncadapter.Constants.KEY_ACCOUNT;
abstract public class SyncManager {
protected final NotificationHelper notificationManager;
protected final String journalUid;
protected final CollectionInfo info;
protected final Context context;
protected final Account account;
@ -107,14 +107,14 @@ abstract public class SyncManager {
// create HttpClient with given logger
httpClient = HttpClient.create(context, account);
data = ((App) context.getApplicationContext()).getData();
info = JournalEntity.fetch(data, journalUid).getInfo();
// dismiss previous error notifications
this.journalUid = journalUid;
notificationManager = new NotificationHelper(context, journalUid, notificationId());
notificationManager.cancel();
crypto = new Crypto.CryptoManager(settings.password(), journalUid);
data = ((App) context.getApplicationContext()).getData();
}
protected abstract int notificationId();