Skip to content

IDE-294 Raise Android API level to 35#5157

Merged
reichli merged 1 commit into
Catrobat:developfrom
reichli:IDE-294
Mar 24, 2026
Merged

IDE-294 Raise Android API level to 35#5157
reichli merged 1 commit into
Catrobat:developfrom
reichli:IDE-294

Conversation

@reichli

@reichli reichli commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

https://catrobat.atlassian.net/browse/IDE-294

This PR raises the compileSdk/targetSdkVersion to 35 (Android 15) and adapts the code
accordingly to ensure compatibility both to this new Android version as well as backwards
compatibility to older versions.

Changes:

  • Checked if we are affected by OpenJDK API changes and boyscout code on the way
  • Make UI Edge-to-Edge compatible
  • Check background activity launches and improve PendingIntents for NFC, cast and download (this also repaired the NFC feature since PendingIntents need used here to be mutable)
  • Improve tests for requesting audio focus to cover pre and post API35 scenarios
  • Minor test fixes

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the catroid-stage or catroid-ide Slack channel and ask for a code reviewer

Comment thread catroid/src/main/java/org/catrobat/catroid/io/StageAudioFocus.java Fixed
Comment thread catroid/src/main/java/org/catrobat/catroid/ui/UiUtils.java Fixed
Comment thread catroid/src/main/java/org/catrobat/catroid/ui/UiUtils.java Fixed
Comment thread catroid/src/main/java/org/catrobat/catroid/ui/UiUtils.java Fixed
@reichli reichli force-pushed the IDE-294 branch 3 times, most recently from b6e7381 to a029d8f Compare March 6, 2026 08:27
@reichli reichli added the Active Member Tickets that are assigned to members that are still currently active label Mar 6, 2026
@reichli reichli marked this pull request as ready for review March 6, 2026 08:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Catroid to target Android 15 (API 35) by bumping compileSdk / targetSdkVersion and applying compatibility changes across UI insets (edge-to-edge), PendingIntent mutability, and a few API deprecations, plus adding/adjusting instrumentation tests around audio focus behavior.

Changes:

  • Bump Android compileSdk / targetSdkVersion to 35.
  • Introduce EdgeToEdge insets helper and apply it to various screens/views.
  • Update PendingIntent creation (immutability/mutability) and modernize locale casing (lowercase/uppercase), plus add API-35-specific audio focus tests.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
catroid/build.gradle Raises compileSdk/targetSdkVersion to 35.
catroid/src/main/java/org/catrobat/catroid/ui/EdgeToEdge.kt Adds helper for applying window inset padding/margins.
catroid/src/main/java/org/catrobat/catroid/ui/BaseActivity.kt Applies edge-to-edge adjustments to common activity views.
catroid/src/main/java/org/catrobat/catroid/ui/SettingsActivity.java Applies bottom padding insets to the settings content container.
catroid/src/main/java/org/catrobat/catroid/ui/recyclerview/fragment/MainMenuFragment.kt Applies bottom margin insets to the main menu FAB.
catroid/src/main/java/org/catrobat/catroid/ui/fragment/UserDefinedBrickListFragment.kt Applies bottom margin insets to “add user brick” FAB/button.
catroid/src/main/java/org/catrobat/catroid/ui/fragment/FormulaEditorFragment.java Applies bottom margin insets to the formula editor keyboard container.
catroid/src/main/java/org/catrobat/catroid/ui/fragment/BrickSearchFragment.kt Applies edge-to-edge handling on resume; modernizes string casing usage.
catroid/src/main/res/layout/fragment_brick_search.xml Fixes layout structure (TextView/ListView separation) and formatting.
catroid/src/main/java/org/catrobat/catroid/ui/fragment/BrickCategoryFragment.kt Applies bottom padding insets to category list.
catroid/src/main/res/layout/fragment_brick_categories.xml Disables clipToPadding for better inset/padding behavior.
catroid/src/main/java/org/catrobat/catroid/ui/fragment/AddBrickFragment.kt Applies bottom padding insets to add-brick list container.
catroid/src/main/res/layout/fragment_brick_add.xml Disables clipToPadding for list insets/padding behavior.
catroid/src/main/java/org/catrobat/catroid/ui/dialogs/NewProjectDialogFragment.kt Applies top padding insets to the dialog toolbar.
catroid/src/main/java/org/catrobat/catroid/ui/ScriptFinder.kt Uses lowercase(Locale.ROOT) and applies top padding insets to root.
catroid/src/main/java/org/catrobat/catroid/web/ServerCalls.java Replaces double-brace map init with explicit put() calls.
catroid/src/main/java/org/catrobat/catroid/web/ProjectDownloader.kt Replaces deprecated toLowerCase() usage with lowercase().
catroid/src/main/java/org/catrobat/catroid/utils/notifications/StatusBarNotificationManager.java Simplifies PendingIntent creation for upload/reject notifications.
catroid/src/main/java/org/catrobat/catroid/transfers/project/ProjectDownloadService.kt Simplifies PendingIntent creation for download notification.
catroid/src/main/java/org/catrobat/catroid/ui/recyclerview/fragment/NfcTagListFragment.java Updates NFC PendingIntent for mutability requirements.
catroid/src/main/java/org/catrobat/catroid/stage/StageResourceHolder.java Adjusts stage PendingIntent flags and intent target class.
catroid/src/main/java/org/catrobat/catroid/stage/StageActivity.java Exposes hasAudioFocus() for instrumentation tests.
catroid/src/main/java/org/catrobat/catroid/stage/SpeechRecognitionHolder.kt Updates deprecated toUpperCase() to uppercase().
catroid/src/main/java/org/catrobat/catroid/scratchconverter/protocol/message/job/JobMessage.java Formatting/readability tweak around parsing UTC cached date.
catroid/src/main/java/org/catrobat/catroid/cast/CastManager.java Simplifies cast service notification PendingIntent creation.
catroid/src/main/java/org/catrobat/catroid/ui/UiUtils.java Copyright year update only.
catroid/src/main/java/org/catrobat/catroid/io/StageAudioFocus.java Copyright year update only.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/stage/StageAudioFocusPostApi35Test.java Adds post-API35 UI test coverage for audio focus behavior.
catroid/src/androidTest/java/org/catrobat/catroid/test/io/StageAudioFocusPreApi35Test.java Splits/adjusts audio focus tests for pre/post API35 behavior.
catroid/src/androidTest/java/org/catrobat/catroid/test/content/bricks/BrickPermissionTest.java Improves parameterized test naming to include API level.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/pocketmusic/PocketMusicActivityTest.java Refactors formatting in a ViewAction description string.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/content/brick/utils/UiNFCTestUtils.java Updates NFC test PendingIntent flags for mutability requirement.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/content/brick/stage/WhenNfcBrickStageFromScriptTest.java Updates the selected string resource for NFC tag editing option.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/util/rules/ScreenshotOnFailRule.java Reformats date format initialization for readability.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/ui/fragment/RenameSceneTest.kt Formatting-only changes.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/ui/activity/rtl/RTLMainMenuTest.java Formatting-only changes.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/ui/activity/rtl/HindiNumberAtShowDetailsAtProjectActivityTest.java Formatting-only changes.
catroid/src/androidTest/java/org/catrobat/catroid/uiespresso/content/brick/rtl/RtlBrickTest.java Formatting-only changes.
catroid/src/androidTest/java/org/catrobat/catroid/test/scratchconverter/protocol/WebSocketMessageListenerTest.java Minor formatting for date format initialization.
Comments suppressed due to low confidence (1)

catroid/src/androidTest/java/org/catrobat/catroid/test/io/StageAudioFocusPreApi35Test.java:83

  • These tests are guarded by if (SDK_INT < / >= VANILLA_ICE_CREAM) and will pass without assertions on the non-matching SDK. Using Assume.assumeTrue(...) / Assume.assumeFalse(...) would make the test outcome explicit (skipped) instead of silently passing when it didn't run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread catroid/src/main/java/org/catrobat/catroid/ui/EdgeToEdge.kt
Comment thread catroid/src/main/java/org/catrobat/catroid/ui/EdgeToEdge.kt
Comment thread catroid/src/main/java/org/catrobat/catroid/ui/EdgeToEdge.kt
@reichli reichli force-pushed the IDE-294 branch 2 times, most recently from 854547e to 050898f Compare March 16, 2026 10:01
Changes:
* Checked if we are affected by OpenJDK API changes and boyscout code
  on the way
* Make UI Edge-to-Edge compatible
* Check background activity launches and improve PendingIntents for
  NFC, cast and download (this also repaired the NFC feature since
  PendingIntents need used here to be mutable)
* Improve tests for requesting audio focus to cover pre and post
  API35 scenarios
* Minor test fixes
@sonarqubecloud

Copy link
Copy Markdown

Comment thread catroid/build.gradle

@hannesweilharter hannesweilharter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@reichli reichli merged commit 398a53c into Catrobat:develop Mar 24, 2026
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Active Member Tickets that are assigned to members that are still currently active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants