Fixed some Android-related script issues
This commit is contained in:
@@ -13,7 +13,6 @@ import com.android.dx.merge.*;
|
||||
import dalvik.system.*;
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.backends.android.surfaceview.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import org.mozilla.javascript.*;
|
||||
|
||||
import java.io.*;
|
||||
@@ -180,7 +179,6 @@ public class AndroidRhinoContext{
|
||||
e.printStackTrace();
|
||||
}
|
||||
android.content.Context context = ((AndroidApplication)Core.app).getContext();
|
||||
Log.info(dexFile.getPath() + " " + dexFile.exists() + " " + context.getCacheDir().getAbsolutePath());
|
||||
return new DexClassLoader(dexFile.getPath(), VERSION.SDK_INT >= 21 ? context.getCodeCacheDir().getPath() : context.getCacheDir().getAbsolutePath(), null, getParent()).loadClass(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -383,7 +383,7 @@ public class Mods implements Loadable{
|
||||
Events.fire(new ContentReloadEvent());
|
||||
|
||||
if(scripts != null && scripts.hasErrored()){
|
||||
Core.app.post(() -> Core.settings.getBoolOnce("scripts-errored", () -> ui.showErrorMessage("$mod.scripts.unsupported")));
|
||||
Core.app.post(() -> ui.showErrorMessage("$mod.scripts.unsupported"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user