-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Raise Minimum API Level to Android 7.1 and Remove Legacy Contacts Sync Workaround #1090
Raise Minimum API Level to Android 7.1 and Remove Legacy Contacts Sync Workaround #1090
Conversation
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.
Looks good, although we need a better (more positive) title for the release logs ;) Like "Drop Android 7 contacts workaround logic"
Also, there are methods in LocalContact
(for the hashcodes) that should now also be obsolete. Please check.
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.
Looks good! However I'll wait with merging because it increases the minimum SDK and if we need another 4.4.3.3 hotfix, I'd prefer to create it from the main branch without having an increased minimum SDK requirement.
Signed-off-by: Arnau Mora Gras <[email protected]>
Prepare now returns Unit Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
a19cd65
to
42fee31
Compare
Can you please rebase? Since there we no further issues with 4.4.3.2 we can merge then. 👍🏻 |
…-require-android-71 # Conflicts: # app/src/main/kotlin/at/bitfire/davdroid/sync/ContactsSyncManager.kt
Signed-off-by: Arnau Mora Gras <[email protected]>
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 noticed that we check for Android <O, which is Android 8 / API level 26.
So in the previous code, the workaround is also active for Android 7.1.
Can you please double-check that it's not required for Android 7.1 in the emulator?
- Create an account, sync contacts
- Fake-call a synced contact or write a fake SMS to a contact in the emulator
- Look whether the contact is dirty / uploaded again (which should not be the case).
In contrast, the same procedure (without the workaround, but on Android 7.0) should make the contact dirty and upload it without need.
We forgot to check whether Android 7.1 is really OK without workaround (old code uses it until Android 8)
These was a related behavior change in Android 8.0: https://developer.android.com/about/versions/oreo/android-8.0-changes#cpu And in the old code we wrote Android <O and included 7.1 in the workaround, so I suspect that it's still necessary for 7.1. But please check… |
…-require-android-71
Yes, it's uploaded again on SDK 25 |
What should we do? Rollback some changes or increase the minSdk to Android 8...? |
Hm honestly I'd like to drop this code… then 4.4.3.2 would have been the latest release until Android 8. What do you think @devvv4ever @sunkup? |
…-require-android-71
Would be ok. We then still support 6 years of Android releases, and people will still be able to load the older version anyway |
Then increasing to 26... |
Signed-off-by: Arnau Mora Gras <[email protected]>
I'll test again on 26 just to be sure, but it should work 🙄 |
Then we could remove other code that's only run on <O, too. On the other side, it works (although specific code parts are unmaintained), and according to https://apilevels.com/, Android 8.0 currently has "only" a cumulative usage of 95.7%. So that means 4.3% wouldn't get further updates, and as DAVx5 users are often tech-savvy and use custom ROMs etc, I bet we even have a higher percentage of old versions. Really difficult decision … |
I have just tried, and it works well on SDK 26 |
Yeah... That's also true. I mean, it doesn't do any bad to hold the code there, as long as it doesn't cause any issues |
I mean we could also do the "proper" way: create a module (class) for handling the dirty check ( If we then want to remove it one day, we only have to remove the class and the locations where it's called. |
Closed in favor of #1118 |
Purpose
Drop suppport for Android 7.0. Contacts sync requires a dirty workaround whose code is not actively maintained anymore and causes unnecessary complexity.
According to https://apilevels.com/ Android 7.0 usage is 97.2% Android 7.1 is 96.0%, so basically no one will notice.
Short description
LocalAddressBook.verifyDirty
workaround logicSyncManager.prepare
returnsUnit
now. Result not used anymore after getting rid ofverifyDirty
Checklist