ReVanced / revanced-patcher

💉 ReVanced Patcher used to patch Android applications
https://revanced.app
GNU General Public License v3.0
2.41k stars 200 forks source link

feat: Extend `resolve` overloads of `MethodFingerprint` on `Patch` #277

Closed oSumAtrIX closed 4 months ago

oSumAtrIX commented 4 months ago

Feature description

Extend resolve overloads of MethodFingerprint on Patch. The proxy method can also be turned into an extension function called proxied.

Motivation

This would eliminate the necessity of manually passing the context parameter to the resolve method.

Acknowledgements

oSumAtrIX commented 4 months ago

Unfortunately, unless the context is injected as a constructor parameter, this seems impossible as it can't reference the execute function parameter. Because the patches are objects, a constructor parameter can't be added to them.