Commonly, apps override getSystemService
in some Context
object and use the call to the Android system service map to obtain references to objects held by some Context
object. This tends to mean that the Context
object is injected everywhere and then getSystemService
is called on it. Why not just inject the object that is needed? Or, inject one's own bundle or map?
Aucun commentaire:
Enregistrer un commentaire