@Override public void finish(int resultCode, Bundle results) { ScreenshotRunner.onDestroy(); super.finish(resultCode, results); } }
@Override public void onCreate(Bundle arguments) { ScreenshotRunner.onCreate(this, arguments); super.onCreate(arguments); }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws InstantiationException, IllegalAccessException, ClassNotFoundException { return super.newApplication(cl, PreferenceRoomApplication.class.getName(), context); } }
@Override public void onStart() { TestButler.setup(getTargetContext()); super.onStart(); }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); return super.newApplication(cl, className, context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); return super.newApplication(cl, className, context); } }
@Override public void finish(int resultCode, Bundle results) { TestButler.teardown(getTargetContext()); super.finish(resultCode, results); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); return super.newApplication(cl, className, context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); // Do not call `Class#getName()` here. Otherwise, an `IllegalAccessError` saying `Class ref // in pre-verified class ...` may occur. return super.newApplication(cl, "com.example.dexopener.replaceapp.TestApp", context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); return super.newApplication(cl, className, context); } }