Skip to content

Fix #5994 : Target Android 16 (API level 36)#6278

Draft
itsadityaaaaa wants to merge 1 commit into
oppia:developfrom
itsadityaaaaa:upgrade_api_36
Draft

Fix #5994 : Target Android 16 (API level 36)#6278
itsadityaaaaa wants to merge 1 commit into
oppia:developfrom
itsadityaaaaa:upgrade_api_36

Conversation

@itsadityaaaaa

@itsadityaaaaa itsadityaaaaa commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Explanation

Fixes #5994

  • when this PR is merged ..

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).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

Copilot AI review requested due to automatic review settings June 14, 2026 18:10
@itsadityaaaaa
itsadityaaaaa requested review from a team as code owners June 14, 2026 18:10
@github-actions

Copy link
Copy Markdown
Contributor

@itsadityaaaaa this PR is being marked as draft because the PR description must contain 'Fixes #' or 'Fixes part of #' for each issue the PR is changing, and each one on its own line with no other text.

@github-actions
github-actions Bot marked this pull request as draft June 14, 2026 18:10
@itsadityaaaaa itsadityaaaaa changed the title Fix #599upgrade to api 36 and build tool 36.0.0 Fix #5994 : Target Android 16 (API level 36) Jun 14, 2026

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the project to target Android SDK 36 and adjusts locale/accessibility code to address SDK 36-related API behavior and deprecations.

Changes:

  • Bump target SDK from 35 to 36 across module manifests, Bazel build definitions, and lint-model tests.
  • Update build SDK/tools versions to align with SDK 36.
  • Replace direct Locale(...) constructors with Locale.Builder() in several places and suppress a deprecation for accessibility announcements.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
utility/src/main/java/org/oppia/android/util/locale/AndroidLocaleProfile.kt Switch locale creation to Locale.Builder() for profiles.
utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityServiceImpl.kt Add temporary suppression for deprecated accessibility announcement API.
utility/src/main/AndroidManifest.xml Bump target SDK to 36 for utility module.
testing/src/main/AndroidManifest.xml Bump target SDK to 36 for testing module.
scripts/src/javatests/org/oppia/android/scripts/lint/LintModelCreatorTest.kt Update lint-model expectation for target SDK 36.
scripts/src/javatests/org/oppia/android/scripts/lint/AndroidLintRunnerTest.kt Update target SDK constant to 36.
scripts/src/javatests/org/oppia/android/scripts/common/AndroidBuildSdkPropertiesTest.kt Update expected build SDK/tools versions for SDK 36.
scripts/src/java/org/oppia/android/scripts/lint/LintModelCreator.kt Update target SDK constant to 36 in lint model generation.
domain/src/main/AndroidManifest.xml Bump target SDK to 36 for domain module.
data/src/main/AndroidManifest.xml Bump target SDK to 36 for data module.
config/src/java/org/oppia/android/config/AndroidManifest.xml Bump target SDK to 36 for config module.
build_vars.bzl Update build SDK/tools versions to 36/36.0.0.
build_flavors.bzl Update flavor metadata target SDK to 36.
app/src/main/java/org/oppia/android/app/translation/AppLanguageResourceHandler.kt Replace Locale(...) with Locale.Builder() when computing display names.
app/src/main/java/org/oppia/android/app/player/audio/AudioViewModel.kt Replace Locale(...) with Locale.Builder() for selected language display name.
app/src/main/ViewsManifest.xml Bump target SDK to 36 for views manifest.
app/src/main/ViewModelsManifest.xml Bump target SDK to 36 for view-models manifest.
app/src/main/ViewModelManifest.xml Bump target SDK to 36 for vm manifest.
app/src/main/RecyclerviewAdaptersManifest.xml Bump target SDK to 36 for recyclerview adapters manifest.
app/src/main/DatabindingResourcesManifest.xml Bump target SDK to 36 for databinding resources manifest.
app/src/main/DatabindingAdaptersManifest.xml Bump target SDK to 36 for databinding adapters manifest.
app/src/main/AppAndroidManifest.xml Bump target SDK to 36 for app UI manifest.
app/src/main/AndroidManifest.xml Bump target SDK to 36 for main app manifest.

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

Comment on lines +191 to +194
val locale = Locale.Builder()
.setLanguage(languageCode)
.setRegion(regionCode)
.build()
Comment on lines +59 to +63
override fun computeAndroidLocale(): Locale =
Locale.Builder()
.setLanguage(languageCode)
.setRegion(regionCode)
.build()
Comment on lines +20 to +22
// TODO : Replace deprecated View.announceForAccessibility() with a direct
// AccessibilityManager.sendAccessibilityEvent(TYPE_ANNOUNCEMENT) call.
// Suppressed temporarily to unblock the Android 16 (SDK 36) target upgrade.
@oppiabot

oppiabot Bot commented Jun 21, 2026

Copy link
Copy Markdown

Hi @itsadityaaaaa, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

@oppiabot oppiabot Bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jun 21, 2026
@nikhilkumarpanigrahi

nikhilkumarpanigrahi commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Hi @itsadityaaaaa, the Locale.Builder() fixes,
SDK version bumps, and announceForAccessibility suppression look correct.

I noticed a few things that seem missing:

  1. values-v35/themes.xml still uses android:windowOptOutEdgeToEdgeEnforcement="true".
    This attribute doesn't exist in API 36 — it will be silently ignored on Android 16,
    forcing the app into edge-to-edge mode without proper handling. Issue [Bug]: Enable edge to edge support before upgrading to targetSDk 36 #5943 was
    supposed to be a prerequisite before bumping to targetSdk 36. Should this be
    addressed before merging?

  2. MathBitmapModelLoader.kt line 222 has a @Suppress("DEPRECATION") with the
    comment "Current targetSdk is 35" — now that we're targeting 36, the proper
    SDK 36 replacement should be used here. This is tracked in [BUG]: computeBounds(RectF, Boolean): Unit' is deprecated in compileSdk 35 [Blocked on 5994] #5927 which is
    explicitly blocked on this issue.

  3. The 6 activities that override onBackPressed() haven't been migrated to
    OnBackPressedCallback (AppLanguageActivity, AudioLanguageActivity, StoryActivity, TopicActivity, SurveyActivity, MyDownloadsActivity). This is needed for proper
    predictive back support on Android 16.

Happy to help with any of the above, just let me know what you'd like me to pick up.

@oppiabot oppiabot Bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jun 23, 2026
@oppiabot

oppiabot Bot commented Jun 30, 2026

Copy link
Copy Markdown

Hi @itsadityaaaaa, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

@oppiabot oppiabot Bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jun 30, 2026
@itsadityaaaaa

Copy link
Copy Markdown
Collaborator Author

@nikhilkumarpanigrahi apologies for late reply, I was busy in some other work from last few days . I think it will be great if you pick edge to edge to support.

@oppiabot oppiabot Bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 4, 2026
@nikhilkumarpanigrahi

Copy link
Copy Markdown
Collaborator

Thanks @itsadityaaaaa. I looked into edge-to-edge, but it is already issue #5943, which is assigned to @Neer-rn, and he has active PRs for it — Phase 1 is merged (#6212) and his Phase 2 PRs (#6214, #6241) are in review. So if I take edge-to-edge I would be duplicating his work.

Instead, I would like to pick up a different Android 16 piece that no one is working on yet: migrating the deprecated onBackPressed() override to OnBackPressedCallback / onBackPressedDispatcher (needed for predictive back in API 36). There are 6 activities still using it (AppLanguageActivity, AudioLanguageActivity, TopicActivity, MyDownloadsActivity, SurveyActivity, StoryActivity). This is independent of the edge-to-edge work, so it won't clash with Neer.

I'll do this under the umbrella #5994. Does that sound good to you? And @Neer-rn, please let me know if this overlaps anything on your side.

@Neer-rn

Neer-rn commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Hi @nikhilkumarpanigrahi, thanks for checking! I don't think there is any overlap on my side actually my edge-to-edge PRs (#6214, #6241) only touch the activity presenter files, and the onBackPressed() overrides are in the activity classes themselves. I think you should go ahead with the predictive back migration, good luck with that!!

@oppiabot

oppiabot Bot commented Jul 12, 2026

Copy link
Copy Markdown

Hi @itsadityaaaaa, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

@oppiabot oppiabot Bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 12, 2026
@oppiabot oppiabot Bot closed this Jul 19, 2026
@Neer-rn Neer-rn reopened this Jul 19, 2026
@oppiabot oppiabot Bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 19, 2026
@Neer-rn

Neer-rn commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Hi @itsadityaaaaa, since this PR was closed due to inactivity, please let us know when are you planning to work on this issue.

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.

[Feature Request]: Target Android 16 (API level 36)

4 participants