Open BenHenning opened 4 months ago
@adhiamboperes can i work on this issue
@uphargaur, Sure.
@uphargaur, are you still working on this?
Yes I am working on it, sorry for delay got my exams this week.
@adhiamboperes I tried working on it, but I’m finding it difficult to locate the data class.
For example, in the image below, I'm unable to identify which class to use for reference. Could you help me find that, or should I create a data class depending on the use case?
@uphargaur, I do not understand the question. What is data class in reference to?
Is your feature request related to a problem? Please describe.
API 33 (introduced in #5222) deprecated
Bundle
's generic methods:5402 helped reveal which places need updating:
Describe the solution you'd like
Calls need to be replaced with either type-specific or
BundleCompat
calls, specifically:getSerializable()
should now use https://developer.android.com/reference/androidx/core/os/BundleCompat#getSerializable(android.os.Bundle,java.lang.String,java.lang.Class%3CT%3E) instead.get()
calls should be replaced with the 'get' method for the expected data type.Describe alternatives you've considered
None--
BundleCompat
must be used for cases when we do not know the type since the app has a minimum supported SDK of 21.Additional context
The app generally uses Bundles in one of two cases:
All changes to fragments and activities need to be tested by:
Some special notes:
getTypedSerializable
helper method entirely as it's essentially reimplementing the method fromBundleCompat
.get()
and using a type-specific method likegetString
are different: the former would throw an exception (if not usingas?
) and the latter would become null. This needs to be considered while performing the migration work.