-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade vcard4android #1093
Upgrade vcard4android #1093
Conversation
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
@@ -23,7 +23,7 @@ android { | |||
|
|||
setProperty("archivesBaseName", "davx5-ose-$versionName") | |||
|
|||
minSdk = 24 // Android 7.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done in #1090.
@@ -85,7 +84,7 @@ open class LocalAddressBook @AssistedInject constructor( | |||
*/ | |||
open val groupMethod: GroupMethod by lazy { | |||
val manager = AccountManager.get(context) | |||
val associatedAccount = manager.getUserData(/* address book account */ account, USER_DATA_COLLECTION_ID)?.toLongOrNull()?.let { collectionId -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now there's addressBookAccount
in the constructor and as a property. These can be confused and make a difference. Using addressBookAccount
from the constructor would be bad here because the account could have been renamed and only the addressBookAccount
property contains the correct account.
So I suggest to rename the constructur argument to _addressBookAccount
for clarity and add the explanation with renaming in its KDoc.
override fun prepare(): Boolean { | ||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { | ||
// workaround for Android 7 which sets DIRTY flag when only meta-data is changed | ||
val reallyDirty = localCollection.verifyDirty() | ||
val deleted = localCollection.findDeleted().size | ||
if (extras.contains(ContentResolver.SYNC_EXTRAS_UPLOAD) && reallyDirty == 0 && deleted == 0) { | ||
logger.info("This sync was called to up-sync dirty/deleted contacts, but no contacts have been changed") | ||
return false | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused – shouldn't that be done in #1090, too?
This PR should only update vcard4android so that the account
fields are renamed to addressBookAccount
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused – shouldn't that be done in #1090, too?
Yup, somehow I mixed the two PRs, I'll clean up this mess 😅
Replaced by #1095 |
Purpose
Rename all occurences of account to addressBookAccount so that address book accounts won't be confused with DAVx5 accounts that easy.
Short description
Upgraded vcard4android to the latest version available (also upgrades compileSdk to 35).
Checklist