[Sync framework] Fix sync always pending on Android 14+ (#1463)
* Android 14 and 15 workaround: tell the sync framework to cancel any pending syncs Signed-off-by:Sunik Kupfer <kupfer@bitfire.at> * Add test which documents wrong pending sync check behaviour Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Exclude android 13 and below Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Cancel only own sync request Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Cancel only after enqueuing sync worker Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Move test to AndroidSyncFrameworkTest Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Reset master sync state Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Remove limited parallelism and increase test timeout Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Rename test method Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Add assert message Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Update comment Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Add sdk suppress annotation Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Use runBlocking to be able to catch the timeout exception Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Extract pending sync cancellation to method Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Enhance sync framework tests for Android versions 9 to 16, verifying correct and incorrect pending states Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Add tests for sync always pending behavior on Android 10 and 11 Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Remove obsolete unmockkAll call Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Make tests a bit more reliable Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Extract cancelSync method call to utils to stub the call more easily Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Remove some unnecessary calls and update stub Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Update expected states lists Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Move cancelSyncInSyncFramework to SyncFrameworkIntegration Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Pass the whole sync extras bundle when cancelling sync Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * [WIP] Initialize pending sync state reporting wrong behaviour Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Optimize SyncAdapterServicesTest * Remove unused property Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Reset master sync state Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * Revert "Reset master sync state" This reverts commit 4bfe73a25af138f5ee4be5c8753d83b4f61268b3. * Revert "Remove unused property" This reverts commit 7c0fdbf392d3a7e9986700c5ee12bb1abe2417f0. * Reapply "Reset master sync state" This reverts commit 5f7f0f9bce9ae906c17bcaff4fdce3d1e8c72358. * Reapply "Remove unused property" This reverts commit f1d5009f8a2cfecc78d515f3e3f7e0532e5872df. * Increase timeout to 2 min Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> * [WIP] Optimize tests * Optimize sync framework tests * SyncAdapterServices FakeSyncAdapter: support interrupting --------- Signed-off-by:
Sunik Kupfer <kupfer@bitfire.at> Co-authored-by:
Ricki Hirner <hirner@bitfire.at>
Loading
Please register or sign in to comment