Move all fragment arguments, activity intent extras, and saved instance state over to protos #4986
Labels
enhancement
End user-perceivable enhancements.
Impact: Low
Low perceived user impact (e.g. edge cases).
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Is your feature request related to a problem? Please describe.
Bundles do not provide strong typing or presence guarantees, and require unique strings to identify per-fragment and per-activity values.
Describe the solution you'd like
Protos help alleviate this problem and can be serialized directly into bundles. Protos also allow for more trivial composition (e.g. when passing data from fragments to activities), and eventually can simplify both data processing (#1051) and on-disk storage (e.g. in the case of #2571), though the latter is less important since Android already serializes bundles on-disk. This will also help with the mechanisms needed for #309 to be possible.
The solution here is to move all fragment arguments, activity extras, and saved instance state bundle usage over to using protos entirely.
Describe alternatives you've considered
The only other obvious solution is to continue with bundles and not solve the original problem that's mentioned. There are other possible serialization intermediaries we could consider (such as JSON), but protos make the most sense given that they're already used broadly in the codebase.
Additional context
None.
The text was updated successfully, but these errors were encountered: