| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
import dalvik.system.PathClassLoader; |
| 18 |
|
| 19 |
class Main { |
| 20 |
static final String TEST_NAME = "811-checker-invoke-super-secondary"; |
| 21 |
|
| 22 |
static final String DEX_FILE = System.getenv("DEX_LOCATION") + "/" + TEST_NAME + ".jar"; |
| 23 |
|
| 24 |
static final String SECONDARY_NAME = TEST_NAME + "-ex"; |
| 25 |
static final String SECONDARY_DEX_FILE = |
| 26 |
System.getenv("DEX_LOCATION") + "/" + SECONDARY_NAME + ".jar"; |
| 27 |
|
| 28 |
public static void main(String[] args) throws Exception { |
| 29 |
PathClassLoader pcl = new PathClassLoader(SECONDARY_DEX_FILE, Main.class.getClassLoader()); |
| 30 |
|
| 31 |
Class<?> secondaryCls = pcl.loadClass("OtherClass"); |
| 32 |
secondaryCls.getDeclaredMethod("$noinline$foo").invoke(secondaryCls.newInstance()); |
| 33 |
} |
| 34 |
} |