Skip to content

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

Open
joragua wants to merge 3 commits into
masterfrom
technical/bump_min_sdk_to_28
Open

build: bump sdkMinVersion to 28 (Android 9)#4885
joragua wants to merge 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 7 times, most recently from a73fb88 to ec425b2 Compare June 25, 2026 12:09
joragua added 3 commits June 25, 2026 14:14
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
@joragua joragua force-pushed the technical/bump_min_sdk_to_28 branch 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants