Pergunta

Let's say I have an List<E>, I want to invoke its add(E object) method, and my list is actually a List<String>, how should i represent this invocation in smali?

Should it be

invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

or

invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/String;)Z

or something else?

Foi útil?

Solução

It should be the first.

invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

When in doubt, you can try what you want in java, compile it, dx it, then baksmali it :)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top