CATROID-1660 Migrate to targetSdkVersion 36 - #5236
Open
harissabil wants to merge 11 commits into
Open
Conversation
harissabil
marked this pull request as ready for review
August 17, 2026 18:45
…kers Android 16 enforces the job runtime quota in more situations, so being stopped mid-run is now a normal outcome for FeaturedProjectSyncWorker and ProjectsCategoriesSyncWorker. WorkManager reschedules stopped work by itself, but the workers did not survive a stop cleanly: - call.execute() is blocking and ignores coroutine cancellation, so the HTTP call and the worker thread stayed alive well past the stop. sync() is now a suspend function using Retrofit's awaitResponse(), which cancels the call as soon as the coroutine is cancelled. - A non-2xx response was not treated as an error at all: the body was null, no update happened, and the worker still returned success. It now raises WebConnectionException, which the worker maps to Result.retry() so the configured exponential backoff is reachable at all, and to Result.failure() once the run attempts are exhausted. - The featured projects update deleted and inserted in two separate transactions, so a stop in between left an empty list behind. Both writes now run in a single @transaction. - Log the stop reason on API 31 and above, as recommended for the new quota behaviour. - SettingsFragment calls the sync from Java, so the interface keeps a blocking syncBlocking() bridge for that caller.
Cover the result mapping of both workers with TestListenableWorkerBuilder: success on a completed sync, retry while attempts remain, and failure once they are exhausted.
# Conflicts: # catroid/src/main/java/org/catrobat/catroid/stage/StageActivity.java
|
moe-threeface
approved these changes
Sep 4, 2026
moe-threeface
left a comment
Contributor
There was a problem hiding this comment.
I checked the CATROID-1660 target SDK 36 changes locally.
I mainly looked at the SDK bump, Android 16/back handling related changes, workflow updates, and the new/updated UI tests. I’m still getting more familiar with this part of the codebase, but from what I checked, the changes look clean to me and I did not find anything blocking.
Looks good from my side.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This PR increases the API target to API level 36 (Android 16) and modifies the code affected by that change to ensure compatibility with the new Android version while maintaining backward compatibility with the older versions.
Changes
Full migration guide notes can be accessed through this spreadsheet to see the decisions and assessments made regarding the changes.
Your checklist for this pull request
Please review the contributing guidelines and wiki pages of this repository.