Fix #5994 : Target Android 16 (API level 36)#6278
Conversation
|
@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. |
There was a problem hiding this comment.
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 withLocale.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.
| val locale = Locale.Builder() | ||
| .setLanguage(languageCode) | ||
| .setRegion(regionCode) | ||
| .build() |
| override fun computeAndroidLocale(): Locale = | ||
| Locale.Builder() | ||
| .setLanguage(languageCode) | ||
| .setRegion(regionCode) | ||
| .build() |
| // TODO : Replace deprecated View.announceForAccessibility() with a direct | ||
| // AccessibilityManager.sendAccessibilityEvent(TYPE_ANNOUNCEMENT) call. | ||
| // Suppressed temporarily to unblock the Android 16 (SDK 36) target upgrade. |
|
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. |
|
Hi @itsadityaaaaa, I noticed a few things that seem missing:
Happy to help with any of the above, just let me know what you'd like me to pick up. |
|
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. |
|
@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. |
|
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 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. |
|
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!! |
|
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. |
|
Hi @itsadityaaaaa, since this PR was closed due to inactivity, please let us know when are you planning to work on this issue. |
Explanation
Fixes #5994
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: