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?
It should be the first.
When in doubt, you can try what you want in java, compile it, dx it, then baksmali it 🙂