-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
Upgrade to Android 13 sdk #2251
Conversation
updated target and compile sdk of sample app to 33 (android 13) updated getPackageInfo and getApplicationInfo deprecated methods
updated target and compile sdk of sample app to 33 (android 13) updated getPackageInfo and getApplicationInfo deprecated methods
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3d89dea | 345.59 ms | 364.06 ms | 18.47 ms |
1e4690d | 354.69 ms | 387.88 ms | 33.19 ms |
3d89dea | 322.38 ms | 350.82 ms | 28.45 ms |
2f079a1 | 296.91 ms | 337.43 ms | 40.51 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3d89dea | 1.74 MiB | 2.33 MiB | 604.92 KiB |
1e4690d | 1.74 MiB | 2.33 MiB | 604.92 KiB |
3d89dea | 1.74 MiB | 2.33 MiB | 604.92 KiB |
2f079a1 | 1.74 MiB | 2.33 MiB | 605.56 KiB |
Previous results on branch: android_target_sdk_33
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5ec80f4 | 333.24 ms | 375.65 ms | 42.41 ms |
e743770 | 292.57 ms | 331.86 ms | 39.29 ms |
f8b03cb | 346.86 ms | 370.68 ms | 23.82 ms |
fb22390 | 328.43 ms | 389.27 ms | 60.84 ms |
ffd7905 | 332.70 ms | 434.72 ms | 102.02 ms |
2ad7631 | 334.92 ms | 400.10 ms | 65.19 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5ec80f4 | 1.73 MiB | 2.29 MiB | 577.10 KiB |
e743770 | 1.74 MiB | 2.29 MiB | 562.11 KiB |
f8b03cb | 1.73 MiB | 2.29 MiB | 578.29 KiB |
fb22390 | 1.73 MiB | 2.29 MiB | 578.43 KiB |
ffd7905 | 1.74 MiB | 2.29 MiB | 562.46 KiB |
2ad7631 | 1.73 MiB | 2.29 MiB | 577.10 KiB |
static PackageInfo getPackageInfo( | ||
final @NotNull Context context, final int flags, final @NotNull ILogger logger) { | ||
try { | ||
return context.getPackageManager().getPackageInfo(context.getPackageName(), flags); | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { |
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.
There's a class that replaces Build.VERSION
in the SKD to make it testable.
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.
@marandaneto I created an istance of BuildInfoProvider
inside these methods.
I couldn't pass directly the instance we create at the beginning of the init flow.
Is it fine, since it wasn't created anywhere else?
@stefanosiano since you are on it already, could you also tackle #2133? It's about switching from AndroidManifest to Otherwise the PR LGTM 👍 |
replaced sdk version check in ContextUtils and RootChecker with BuildInfoProvider instance methods
@romtsn sure, i'll put it here, too |
Codecov ReportBase: 80.62% // Head: 80.53% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2251 +/- ##
============================================
- Coverage 80.62% 80.53% -0.10%
- Complexity 3368 3393 +25
============================================
Files 240 240
Lines 12388 12461 +73
Branches 1646 1659 +13
============================================
+ Hits 9988 10035 +47
- Misses 1791 1813 +22
- Partials 609 613 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@romtsn i did the change. Of course, i didn't make the change to agp 8 |
Looks good 👍 I'd merge it now, since it's just a few of us who uses AS and shouldn't be a problem to update. Since AS Dolphin is already stable, I think it's an easy update. |
📜 Description
This pr is still a draft: to work with the new agp version, the latest version of Android Studio is needed. It is already out in the stable version, but we should be sure everyone updated before merging this pr into master.
upgraded Android Gradle Plugin to 7.3.0
upgraded target and compile sdk of sample app to 33 (android 13)
updated getPackageInfo and getApplicationInfo deprecated methods
#skip-changelog
💡 Motivation and Context
We want to make sure the Android sdk can be built without issues when targeting the latest Android version, currently 13.
So we upgrade our sample app to sdk 33 and fix any deprecation issues, other than testing the app is working fine.
💚 How did you test it?
Just running the app locally. We want to run ui tests on Android 13 devices, but we are going to do it when Saucelabs will have working devices with Android 13. There is a separate pr for this.
📝 Checklist
🔮 Next steps