You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TrimmableTypeMap] Revisit delayed registerNatives mechanism for Application and Instrumentation subclasses #11194
Application and Instrumentation java classes are loaded before the .NET runtime is initialized. This means we can't use static { ... } to register native methods and we implemented 2 separate ways of working around this:
ApplicationRegistration.java - generated code which we can call manually from JNIEnvInit and where we can register native methods for all the types that need it (very few usually)
lazy call to registerNatives from the generated java constructors of the Application and Instrumentation subclasses (and also from static methods)
We should settle on just one approach and simplify the generator code. I suggest removing the ApplicationRegistration class and only use the lazy registration just before the first native method is called.
Activity