Skip to content
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

Update to Android 15 #21599

Merged
merged 34 commits into from
Jan 21, 2025
Merged

Update to Android 15 #21599

merged 34 commits into from
Jan 21, 2025

Conversation

nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Jan 17, 2025

Closes #21596

This PR updates our app to Android 15, as has already been done for WCAndroid - p91TBi-cHS-p2. The following items have been addressed:

  • Changed compileSdkVersion to 35
  • Fixed deprecation issues with SDK 35
  • Cleaned up WindowExtensions to remove unused or deprecated features
  • Converted WordPressDebug to Kotlin
  • EnabledStrictMode and updated it to include detectNonSdkApiUsage. This is for my testing purposes only - I'll disable it before this branch is merged.

Note that I left targetSdkVersion at 34 because targeting 35 causes the app to default to edge-to-edge, which leads to a number of overlapping problems. We can revisit this at a later date.

To test:

  • Make sure you can build the app and CI passes
  • On SDK 35+ (VanillaIceCream) do a quick run-through of the app - including login - and ensure there are no visual issues
  • Repeat on a pre-35 device

@dangermattic
Copy link
Collaborator

dangermattic commented Jan 17, 2025

3 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ Class InsetsType is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 17, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21599-17ca78f
Commit17ca78f
Direct Downloadjetpack-prototype-build-pr21599-17ca78f.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 17, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21599-17ca78f
Commit17ca78f
Direct Downloadwordpress-prototype-build-pr21599-17ca78f.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 39.48%. Comparing base (94fd5f6) to head (17ca78f).
Report is 1 commits behind head on trunk.

Files with missing lines Patch % Lines
...dpress/android/util/extensions/WindowExtensions.kt 0.00% 16 Missing ⚠️
...wordpress/android/util/signature/SignatureUtils.kt 0.00% 6 Missing ⚠️
...rds/quicklinksitem/QuickLinksItemViewModelSlice.kt 0.00% 3 Missing ⚠️
.../main/java/org/wordpress/android/AppInitializer.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #21599   +/-   ##
=======================================
  Coverage   39.48%   39.48%           
=======================================
  Files        2117     2117           
  Lines       99464    99464           
  Branches    15296    15296           
=======================================
  Hits        39269    39269           
  Misses      56714    56714           
  Partials     3481     3481           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nbradbury nbradbury requested review from ParaskP7 and wzieba January 20, 2025 13:14
@nbradbury nbradbury requested a review from dcalhoun January 20, 2025 13:14
@nbradbury nbradbury marked this pull request as ready for review January 20, 2025 13:14
@nbradbury nbradbury marked this pull request as draft January 20, 2025 13:15
@nbradbury nbradbury marked this pull request as ready for review January 20, 2025 13:56
@nbradbury nbradbury changed the title Android 15 compile Android 15: Change compileSdkVersion and fix build issues Jan 20, 2025
@nbradbury nbradbury changed the title Android 15: Change compileSdkVersion and fix build issues Android 15: Change compileSdkVersion to 35 and fix build issues Jan 20, 2025
@nbradbury nbradbury changed the base branch from feature/android15 to trunk January 20, 2025 20:51
@nbradbury nbradbury changed the title Android 15: Change compileSdkVersion to 35 and fix build issues Update to Android 15 Jan 20, 2025
Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @nbradbury !

I have reviewed and tested this PR as per the instructions, everything works as expected, great job wit this compileSdkVersion update! 🌟 x 🌟 ^ 🌟

FYI: Also, I put some extra focus on the WindowExtensions.kt changes, identified usages of both setWindowStatusBarColor(...) and setWindowNavigationBarColor(...), which weren't many anyway:

  • ReaderPostDetailFragment
  • ReaderReadingPreferencesDialogFragment
  • SupportWebViewActivity
  • DialogExtensions -> Dialog.setStatusBarAsSurfaceColor

And then tried testing those, see if I can see any diff. In the end, everything looked good to me when testing on both, 15 or older devices.


I have left just one question (❓) and a few suggestion (💡) comments for you to consider. I am going to approve this PR anyway, since none is blocking. I am NOT going to merge this PR yet to give you some time to apply any of my suggestions. However, feel free to ignore them and merge the PR yourself.

PS: Having said that, I recommend for someone closer to JP/WPAndroid to go for another pass at this, do some more testing, maybe be more thorough than me, just in case I missed something obvious.

Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the changes on two Android emulators—SDK 35 and 30—I did not note any visual regressions. 🚀

@nbradbury nbradbury enabled auto-merge (squash) January 21, 2025 17:51
@nbradbury nbradbury merged commit 9912e09 into trunk Jan 21, 2025
19 of 22 checks passed
@nbradbury nbradbury deleted the issue/21596-android-15-compile branch January 21, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to SDK 35 (Android 15)
5 participants