Skip to content

Fix #6409: remove Lollipop-era multidex leftovers and freeze Lollipop builds - #6427

Open
adityabagla7 wants to merge 4 commits into
oppia:developfrom
adityabagla7:fix/6409-remove-lollipop-code
Open

Fix #6409: remove Lollipop-era multidex leftovers and freeze Lollipop builds#6427
adityabagla7 wants to merge 4 commits into
oppia:developfrom
adityabagla7:fix/6409-remove-lollipop-code

Conversation

@adityabagla7

@adityabagla7 adityabagla7 commented Sep 4, 2026

Copy link
Copy Markdown

Explanation

Fixes #6409

Now that minSdkVersion is 23, code that only supported Android 5.0/5.1 (API 21/22) is dead and no longer needed:

  1. FrozenReleaseConfig: Added final Lollipop build version codes ("alpha" to {16L, 201L} and "beta" to {196L}) to prevent them from being silently deactivated on future track updates, and updated the corresponding KDoc list.
  2. Multidex: Switched AbstractOppiaApplication to extend android.app.Application instead of MultiDexApplication because native multidex is supported on API 21+. Dropped androidx.multidex:multidex from app/BUILD.bazel, third_party/versions.bzl, and third_party/maven_install.json. Native multidex flavor configurations in build_flavors.bzl and instrumentation/BUILD.bazel remain intact.
  3. Rationale for changes to scripts/assets: Updated scripts/assets/maven_dependencies.textproto to remove the definition for the dropped androidx.multidex:multidex dependency.
  4. Stale lint suppressions: Removed obsolete @SuppressLint("ObsoleteSdkInt") from AbstractOppiaApplication.onCreate() where no SDK check exists, and from LocaleController.getSystemLocale() where the guard is >= N (API 24, which is above minSdk 23).
  5. SVG fallback: Narrowed SDK_INT <= M to SDK_INT == M in SvgPictureDrawable.kt to represent the single-version Marshmallow workaround for Fix native picture rendering issue on Marshmallow devices #3961, updated the comment to refer specifically to Marshmallow, and removed the obsolete lint suppression.

Essential Checklist

  • The PR title starts with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The explanation section above starts with "Fixes #bugnum: " (If this PR fixes part of an issue, use instead: "Fixes part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

Disclosure of LLM Usage

Summary by CodeRabbit

  • Bug Fixes

    • Updated SVG rendering fallback behavior to target Android API 23 specifically.
  • Release Management

    • Added alpha version code 201 and beta version code 196 to frozen release tracking.
    • Updated release-upload validation for newer alpha version codes.
  • Maintenance

    • Removed obsolete AndroidX Multidex support and related dependencies.
    • Updated version-code documentation and dependency metadata accordingly.

…lipop builds

Freeze the final Lollipop Play builds, drop androidx.multidex now that
minSdk is 23, clear stale ObsoleteSdkInt suppressions, and narrow the
Marshmallow SVG bitmap fallback to API 23 only.
@adityabagla7
adityabagla7 requested review from a team as code owners September 4, 2026 16:26
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@adityabagla7 this PR is being marked as draft because you are not assigned to referenced issue #6409 (or it does not exist). You may only fix issues that you are assigned to to help avoid multiple team members duplicating work on the same issue.

@github-actions
github-actions Bot marked this pull request as draft September 4, 2026 16:29
@adhiamboperes

Copy link
Copy Markdown
Contributor

@adityabagla7, you seem to have edited the PR template. Please copy the expected template form here: https://github.com/oppia/oppia-android/blob/develop/.github/PULL_REQUEST_TEMPLATE.md.

Please look at other recent PRs on the repo to see how the PR description is expected to look like.

@adityabagla7

Copy link
Copy Markdown
Author

@adhiamboperes, I have updated the PR description to follow the expected template from .github/PULL_REQUEST_TEMPLATE.md with all checklist items and disclosure filled in. PTAL!

@oppiabot oppiabot Bot assigned adhiamboperes and unassigned adityabagla7 Sep 7, 2026
@oppiabot

oppiabot Bot commented Sep 7, 2026

Copy link
Copy Markdown

Unassigning @adityabagla7 since a re-review was requested. @adityabagla7, please make sure you have addressed all review comments. Thanks!

@adhiamboperes
adhiamboperes marked this pull request as ready for review September 7, 2026 03:12
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@adityabagla7 this PR is being marked as draft because you are not assigned to referenced issue #6409 (or it does not exist). You may only fix issues that you are assigned to to help avoid multiple team members duplicating work on the same issue.

@github-actions
github-actions Bot marked this pull request as draft September 7, 2026 03:13
@adhiamboperes

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 26f169fa-a6bb-463b-863d-3b51db8d0c6e

📥 Commits

Reviewing files that changed from the base of the PR and between 0bb1c12 and 0aecdcc.

📒 Files selected for processing (10)
  • app/BUILD.bazel
  • app/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt
  • domain/src/main/java/org/oppia/android/domain/locale/LocaleController.kt
  • scripts/assets/maven_dependencies.textproto
  • scripts/src/java/org/oppia/android/scripts/release/FrozenReleaseConfig.kt
  • scripts/src/javatests/org/oppia/android/scripts/release/UploadChangelogToPlayConsoleTest.kt
  • scripts/src/javatests/org/oppia/android/scripts/release/VersionInversionCheckerTest.kt
  • third_party/maven_install.json
  • third_party/versions.bzl
  • utility/src/main/java/org/oppia/android/util/parser/svg/SvgPictureDrawable.kt
💤 Files with no reviewable changes (4)
  • app/BUILD.bazel
  • scripts/assets/maven_dependencies.textproto
  • third_party/versions.bzl
  • domain/src/main/java/org/oppia/android/domain/locale/LocaleController.kt

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The changes freeze legacy release version codes, remove AndroidX Multidex dependencies, delete obsolete lint suppressions, and limit the SVG bitmap fallback to Android API 23.

Changes

Lollipop cleanup

Layer / File(s) Summary
Freeze legacy release versions
scripts/src/java/org/oppia/android/scripts/release/FrozenReleaseConfig.kt, scripts/src/javatests/org/oppia/android/scripts/release/*
The frozen alpha and beta version codes are updated. Release-upload tests now use version code 300 and verify highest-code selection.
Remove AndroidX Multidex
app/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt, app/BUILD.bazel, scripts/assets/maven_dependencies.textproto, third_party/versions.bzl, third_party/maven_install.json
The application extends Application directly. AndroidX Multidex dependencies and generated Maven metadata are removed.
Update obsolete SDK-specific code
domain/src/main/java/org/oppia/android/domain/locale/LocaleController.kt, utility/src/main/java/org/oppia/android/util/parser/svg/SvgPictureDrawable.kt
Obsolete SDK lint suppressions are removed. The SVG bitmap fallback now applies only to API 23.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 0aecd

This cleanup removes obsolete Lollipop multidex support, preserves the Marshmallow SVG workaround, and freezes legacy release codes without an identified regression risk.

Suggested reviewers: benhenning, sandesh282

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 5 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy the coding objectives in [#6409]. They freeze the specified release version codes, remove the legacy AndroidX Multidex dependency, retain native multidex configuration, remove obso…
Out of Scope Changes check ✅ Passed All changes support the cleanup and release-freezing objectives in [#6409]. The test and generated dependency updates are required consequences of those changes. No unrelated code changes are identifi…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes: removing legacy multidex support and freezing Lollipop release builds.
Full details: Docstring Coverage

Explanation

Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 5 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Neer-rn
Neer-rn marked this pull request as ready for review September 7, 2026 06:35
Derive live release version codes in UpdateRolloutFractionTest and
UploadChangelogToPlayConsoleTest as 300L so that live release version
codes are strictly higher than the frozen baseline 201L, preventing
maxOrNull() from selecting the frozen baseline release.

@adhiamboperes adhiamboperes 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.

Thanks @adityabagla7! this is a great start.

Can you test the app on an emulator which is running Android 6, and anothe emulator or device with a higher API level, such as 10-16? We want to verify that we don't have unexpected crashes.

What to test:

  • opening the app after a fresh install
  • play through some lessons, change the app language annd audio language
  • open the app after having put it in the background for a few minutes

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.

Did you edit this file manually or run the script in https://github.com/oppia/oppia-android/wiki/Updating-Maven-Dependencies?

Comment on lines +26 to +27
"alpha" to setOf(16L, 201L),
"beta" to setOf(196L)

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.

The beta version code to be froze will actually be 0.18-rc04-beta-c495933008, which is the current one in prod.
The alpha one is tentatively 0.18-rc04-alpha-c495933008. This might get overwritten tomorrow due to the fact that we are doing weekly alpha releases, so we will update this specifically on the merge date of this PR.

listOf(
PlayConsoleClient.TrackRelease(
versionCodes = listOf(98L, 100L, 99L), status = "inProgress", rolloutFraction = 100
versionCodes = listOf(298L, 300L, 299L), status = "inProgress", rolloutFraction = 100

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.

Why have these specific version codes been chosen for the test?

Comment on lines 180 to 187
// ---------------------------------------------------------------------------
// Deploying to GA (production) — must be less than beta and alpha
// ---------------------------------------------------------------------------

// ---------------------------------------------------------------------------
// Frozen version codes — ordering constraints must ignore confirmed code
// (See FrozenReleaseConfig: alpha={16L})
// (See FrozenReleaseConfig: alpha={16L, 201L}, beta={196L})
// ---------------------------------------------------------------------------

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.

So long as we are edding this file, can we get rid of these weird AI generated sectioning? Let there be just one plain single-line comment.

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.

Remove Lollipop-specific code

2 participants