Skip to content

build: bump sdkMinVersion to 28 (Android 9)#4885

Merged
jesmrec merged 3 commits into
masterfrom
technical/bump_min_sdk_to_28
Jul 1, 2026
Merged

build: bump sdkMinVersion to 28 (Android 9)#4885
jesmrec merged 3 commits into
masterfrom
technical/bump_min_sdk_to_28

Conversation

@joragua

@joragua joragua commented Jun 8, 2026

Copy link
Copy Markdown
Member

Related Issues

App: #4880

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

@joragua joragua self-assigned this Jun 8, 2026
@joragua joragua linked an issue Jun 8, 2026 that may be closed by this pull request
10 tasks
@joragua joragua force-pushed the technical/bump_min_sdk_to_28 branch 8 times, most recently from ec425b2 to 7aedbb4 Compare June 25, 2026 12:15
@joragua joragua marked this pull request as ready for review June 25, 2026 12:23
@joragua joragua requested a review from jesmrec June 25, 2026 12:23
@jesmrec

jesmrec commented Jun 25, 2026

Copy link
Copy Markdown
Member

Blocked till 4.8.2 is out

@DeepDiver1975 DeepDiver1975 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed as maintainer. The min-SDK bump itself is clean and consistent, and CI is green — nice work. A few non-blocking observations, mostly about the "remove obsolete SDK version checks" acceptance criterion from #4880.

Looks good

  • build.gradle: sdkMinVersion = 24 -> 28 is the single source of truth; all modules (owncloudApp, owncloudData, owncloudDomain, owncloudComLibrary, owncloudTestUtil) reference sdkMinVersion, so the bump propagates consistently.
  • The removed guards are all genuinely redundant at minSdk 28 (API 28 = Android P): Build.VERSION_CODES.O (26), .P (28), and the < P dexopener check are now always-true / always-false, so the simplifications are correct and behaviour-preserving.
  • Robolectric @Config(sdk = [..O]) -> [..P] and the DexOpener unconditional install are appropriate.
  • Changelog: changelog/unreleased/4885 is present and matches TEMPLATE.md and the repo's PR-number naming convention. (Optional nit: you could also add the https://github.com/owncloud/android/issues/4880 URL line so the fragment links back to the issue.)

Leftover obsolete SDK checks the PR missed (the issue AC asks to "remove obsolete SDK version checks" — these three are now dead/redundant at minSdk 28 and were not caught):

  1. owncloudApp/.../ui/preview/PreviewTextFragment.kt:248setRolesAccessibilityToMenuItems() still wraps its body in if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O). This is the exact same accessibility pattern you unwrapped in FileDetailsFragment, MainFileListFragment, PreviewAudioFragment, PreviewImageFragment, PreviewVideoActivity, FileDisplayActivity, FileFragment and DrawerActivity. This one appears to have been overlooked — worth unwrapping it too for consistency.
  2. owncloudApp/.../utils/NotificationUtils.kt:93if (SDK_INT < Build.VERSION_CODES.O && timeOut \!= null) is now unreachable dead code (a workaround for API < 26 that can never run). Safe to drop the SDK_INT < O part.
  3. owncloudApp/.../extensions/ContextExt.kt:27@RequiresApi(Build.VERSION_CODES.O) on createNotificationChannel is now redundant (minSdk 28 >= 26), especially since this PR removed the < O early-return in MainApp.createNotificationChannels().

None of these are blocking or functional regressions — they're dead-code / consistency cleanups that fall within this PR's stated scope. Recommend folding them in (at minimum #1) before merge so the "remove obsolete checks" AC is fully satisfied. The support-policy decision (dropping Android 7/8 / API 24–27) is a product call and is already covered by #4880.

@joragua joragua force-pushed the technical/bump_min_sdk_to_28 branch 2 times, most recently from 71a195f to 155b95d Compare June 30, 2026 10:07

@DeepDiver1975 DeepDiver1975 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified — clean. minSdk 24→28 in build.gradle, satisfying #4880's AC.

  • Dead-code cleanup is complete and correct: all removed guards are API≤28 boundaries (>= O/< O, < P), now constant after the bump; each removal keeps the always-true branch. Confirmed no surviving pre-28 VERSION_CODES guards in the touched files.
  • NotificationUtils API<26 cancel-with-delay workaround correctly dropped.
  • Robolectric @Config(sdk = O)P in both lib tests — matches the new floor.
  • Changelog fragment changelog/unreleased/4885 present and well-formed (Change:, links #4880 + PR).
  • CI green.

Note: branch is BEHIND base (mergeable, no conflicts) — rebase before merge.

🤖 Generated with Claude Code

joragua and others added 3 commits July 1, 2026 17:21
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jesus Recio <jrecio@izertis.com>
@jesmrec jesmrec force-pushed the technical/bump_min_sdk_to_28 branch from 155b95d to ce23692 Compare July 1, 2026 15:25
@jesmrec

jesmrec commented Jul 1, 2026

Copy link
Copy Markdown
Member

Since this is not a feature-release, some two actions were taken:

  • Confirm that an Android device with SDK older than 28 does not accept an update ✅
  • Smoke testing the current branch ✅
  • E2E test execution over the branch ✅

That's approved on my side, at the end of the release it will be tested again with all the included features and fixes.

@jesmrec jesmrec merged commit e4eb2ec into master Jul 1, 2026
10 checks passed
@jesmrec jesmrec deleted the technical/bump_min_sdk_to_28 branch July 1, 2026 16:19
@dj4oC dj4oC mentioned this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TECHNICAL] Upgrade min SDK - API 28 (Android 9)

3 participants