-
Notifications
You must be signed in to change notification settings - Fork 565
Fix #5898, #5923, #5924, #5926, #5927, #5928, #5884, part of #5940, #5941: Target Sdk 35 and fix resulting issues #5922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-reviewed.
app/src/main/java/org/oppia/android/app/spotlight/SpotlightFragment.kt
Outdated
Show resolved
Hide resolved
...ain/java/org/oppia/android/util/logging/performancemetrics/PerformanceMetricsAssessorImpl.kt
Outdated
Show resolved
Hide resolved
utility/src/main/java/org/oppia/android/util/parser/math/MathBitmapModelLoader.kt
Outdated
Show resolved
Hide resolved
@BenHenning and @manas-yu, could you please look at this PR as part of the 0.16 release -- it is urgent for QA to receive the update soon for testing. |
Coverage ReportResultsNumber of files assessed: 23 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
Coverage ReportResultsNumber of files assessed: 12 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @adhiamboperes, the changes look good to me. I just wanted to confirm whether the following points are relevant for migration testing:
-
Predictive back animations are now always enabled (ref). Overrides or customized back handling could conflict with the predictive back behavior.
-
Toolbar overlapping the status bar issue ([ref]).
I also reviewed the Android 15 behavior changes, and the relevant points seem covered.
Thanks for pointing these out @manas-yu! I have added a workaround and filed #5943 for proper resolution. |
Coverage ReportResultsNumber of files assessed: 14 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @adhiamboperes! I can't fully verify the new SDK 35 theme currently, so I trust that you've checked each of the affected screens on both handset and tablet layouts (portrait + landscape) to ensure that each of the affected themes is behaving correctly?
utility/src/main/java/org/oppia/android/util/parser/math/MathBitmapModelLoader.kt
Outdated
Show resolved
Hide resolved
All user facing changes were verified. |
Coverage ReportResultsNumber of files assessed: 12 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @adhiamboperes! LGTM.
Unassigning @BenHenning since they have already approved the PR. |
Hi @adhiamboperes, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks! |
Explanation
Fix #5898: Update the app to target sdk 35 or android 15. This is a compulsory update.
There is a list of issues detailed in https://developer.android.com/about/versions/15/behavior-changes-all that came up during the upgrade, and are fixed in this PR. They are summarized in the issue comments.
Fix #5941
In order to upgrade the compileSdk and workaround #5943, build tools needed to be updated as well.
Fix #5923
Collision with MutableList.removeFirst() and MutableList.removeLast() extension functions in kotlin-stdlib
The List type in Java is mapped to the MutableList type in Kotlin. Because the List.removeFirst() and List.removeLast() APIs have been introduced in Android 15 (API level 35), the Kotlin compiler resolves function calls, for example list.removeFirst(), statically to the new List APIs instead of to the extension functions in kotlin-stdlib.
These new methods affect List and Deque classes.
Even though the docs recommend implementing interfaces to override the method with a compatible return type, I have opted to replace them with
removeAt()
which is supported.Custom tags work correctly.

Fix #5924
setStatusBarColor and R.attr#statusBarColor are deprecated and have no effect on Android 15.
No suggestion was provided for a workaround. I added a supress annotation to the setter.
Screens with custom status bar colors are still being displayed correctly.
Fix #5926
packageManager.getPackageInfo(this.packageName, /* flags = */ 0).versionName now returns a nullable string, so changes were made to support this.
Consequently,
NetworkConfigTestModuleTest.testModule_withoutInjectingMockWebServer_doesNotSetAppTestVersionName
was changed because it was nolonger valid.App version is fetched correctly
Fix #5927
Added a supress annotation, see #5927 (comment).
Latex still renders correctly.
Fix #5928
ApplicationInfo
is nullable. This affects PerformanceMetricsAssessorImpl and has been fixed.Fix #5884
AndroidExceptionPreHandler
lives in thekotlinx-coroutines-android artifact
, and we possibly have an older version of it. Proguard strips it. Coroutines still work, but as soon as exception hadling kicks in, theServiceLoader
blows up.Our Kotlin proguard rules cover
CoroutineExceptionHandler
and other core classes, but they don’t explicitly keep the Android-specific implementations (AndroidExceptionPreHandler). Since that class is loaded viaServiceLoader
, ProGuard can (and often will) strip it out unless explicitly kept.Adding
-keep class kotlinx.coroutines.android.** { *; }
coversAndroidExceptionPreHandler
and alsoAndroidDispatcherFactory
(the Main dispatcher) which are both discovered reflectively.Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: