-
Notifications
You must be signed in to change notification settings - Fork 552
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
Fix part of #4865 and Fix #4986 : Move all fragment arguments, activity intent extras, and saved instance state over to protos #5248
Conversation
...ia/android/app/devoptions/markchapterscompleted/testing/MarkChaptersCompletedTestActivity.kt
Outdated
Show resolved
Hide resolved
No problem @BenHenning! |
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 @Vishwajith-Shettigar! Apologies for the long delay in reviewing this. I've taken a complete pass, so follow-ups should be quick.
I basically only had nits. There were a few bigger and broader issues I noticed, but decided not to ask for changes here. Specifically:
- There are a bunch of formatting inconsistencies, some of which already existed. This will be fixed when we reformat the whole codebase in the future.
- There is some inconsistency in nullability management, most of which already existed. This is probably something we'll want to tackle completely by itself in the future.
- Defaulting to a default instance of
ProfileId
is a behavior change over using-1
for the internal profile ID. I think the likelihood of these cases ever happening is near zero with our unit tests, but it brings up the broader problem that default instance ofProfileId
generally corresponds to a valid profile in the app (admin) which is a bad situation as it could result in unintentional privilege escalation if a profile ever does get defaulted. I plan to file a separate issue for this as it will require very broad changes to fully address.
That being said, I think after the most recent comments are addressed I'll be happy to approve this. There are a lot of really great clean-ups and simplifications included in this PR, so it would be quite nice to get it wrapped up and merged. :)
Edit: #5440 is the issue now tracking point (3) above (the potential problems with defaulting ProfileId
).
app/src/main/java/org/oppia/android/app/survey/SurveyWelcomeDialogFragment.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/org/oppia/android/app/activity/ActivityIntentFactoriesTest.kt
Outdated
Show resolved
Hide resolved
utility/src/test/java/org/oppia/android/util/profile/CurrentUserProfileIdIntentDecoratorTest.kt
Outdated
Show resolved
Hide resolved
Also: @Vishwajith-Shettigar please re-assign once all CI checks are passing (in addition to the comments being addressed). The PR can't be merged until those problems are addressed, as well. |
Thanks @BenHenning, I addressed your comments, PTAL. |
Unassigning @Vishwajith-Shettigar since a re-review was requested. @Vishwajith-Shettigar, please make sure you have addressed all review comments. Thanks! |
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 @Vishwajith-Shettigar! Just had one follow-up comment--PTAL.
app/src/main/java/org/oppia/android/app/survey/SurveyWelcomeDialogFragment.kt
Outdated
Show resolved
Hide resolved
Thanks @BenHenning, PTAL. |
Unassigning @Vishwajith-Shettigar since a re-review was requested. @Vishwajith-Shettigar, please make sure you have addressed all review comments. Thanks! |
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 16 MiB (new), 84 KiB (Added) APK download size (estimated): 14 MiB (old), 14 MiB (new), 79 KiB (Added) Method count: 221791 (old), 226445 (new), 4654 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6550 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 15 MiB (new), 84 KiB (Added) Configuration hdpiAPK file size: 59 KiB (old), 59 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 56 KiB (old), 56 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 53 KiB (old), 53 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 102 KiB (old), 102 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 67 KiB (old), 67 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 76 KiB (old), 76 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 79 KiB (old), 79 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 10 MiB (new), 34 KiB (Added) APK download size (estimated): 9150 KiB (old), 9179 KiB (new), 28 KiB (Added) Method count: 99436 (old), 101315 (new), 1879 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 34 KiB (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 10 MiB (new), 34 KiB (Added) APK download size (estimated): 9135 KiB (old), 9165 KiB (new), 29 KiB (Added) Method count: 99436 (old), 101315 (new), 1879 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 34 KiB (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 10 MiB (new), 34 KiB (Added) APK download size (estimated): 9136 KiB (old), 9165 KiB (new), 29 KiB (Added) Method count: 99436 (old), 101315 (new), 1879 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 34 KiB (Added) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) |
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 @Vishwajith-Shettigar. This LGTM!
Going ahead and merging this since it seems that everything has now been addressed and the PR is up-to-date with passing CI checks. Thanks again @Vishwajith-Shettigar! |
Explanation
Fixes #4986
Move all fragment arguments, activity extras, and saved instance state bundle usage over to using protos entirely.
Fix part of #4865
Introduce a ProfileID decorator to pack ProfileId into all Intents so that it can be easily accessed by underlying fragments and child classes. Some classes already use this utility where it was not easy to add profileId to the intent proto bundle.
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: