jeudi 18 août 2016

Android Reflection: forName() can't find AccountManagerService

I wrote a small program that takes a set of input classes in JNI format, such as Landroid/util/Log; and performs some checks on their corresponding Class objects at runtime.

This works by calling Class.forName() on the formatted input class name, such as android.util.Log for the example above.

The application delivers the desired result for all but Landroid/accounts/AccountManagerService;. Why could this be? Does this class even exist? All I could find online was this. However neither forName(android.server.accounts.AccountManagerService) nor forName(com.android.server.accounts.AccountManagerService) work either.

Can forName not find service implementations or does this class not exist/ exist in a different package?





Aucun commentaire:

Enregistrer un commentaire