mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-14 23:28:52 -04:00
Change VMStack hidden API
This commit is contained in:
parent
79438184f8
commit
23354ab0ca
@ -27,7 +27,6 @@ import org.lwjgl.opengl.*;
|
|||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import libcore.util.*;
|
|
||||||
import dalvik.system.*;
|
import dalvik.system.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import net.kdt.pojavlaunch.patcher.*;
|
import net.kdt.pojavlaunch.patcher.*;
|
||||||
|
@ -16,7 +16,6 @@ import java.util.zip.*;
|
|||||||
import net.kdt.pojavlaunch.util.*;
|
import net.kdt.pojavlaunch.util.*;
|
||||||
import net.kdt.pojavlaunch.value.*;
|
import net.kdt.pojavlaunch.value.*;
|
||||||
import org.apache.commons.codec.digest.*;
|
import org.apache.commons.codec.digest.*;
|
||||||
import libcore.util.*;
|
|
||||||
import net.kdt.pojavlaunch.patcher.*;
|
import net.kdt.pojavlaunch.patcher.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import dalvik.system.*;
|
import dalvik.system.*;
|
||||||
|
@ -30,7 +30,7 @@ import java.util.Collections;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import dalvik.system.VMStack;
|
// import dalvik.system.VMStack;
|
||||||
|
|
||||||
/** Common utility routines used by both java.lang and
|
/** Common utility routines used by both java.lang and
|
||||||
java.lang.reflect */
|
java.lang.reflect */
|
||||||
@ -74,7 +74,11 @@ public class Reflection {
|
|||||||
public static Class<?> getCallerClass() {
|
public static Class<?> getCallerClass() {
|
||||||
// This method (getCallerClass()) constitutes another stack frame,
|
// This method (getCallerClass()) constitutes another stack frame,
|
||||||
// so we need to call getStackClass2() rather than getStackClass1().
|
// so we need to call getStackClass2() rather than getStackClass1().
|
||||||
return VMStack.getStackClass2();
|
try {
|
||||||
|
return (Class<?>) Class.forName("dalvik.system.VMStack").getMethod("getStackClass2").invoke(null);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// END Android-changed: getCallerClass() reimplementation.
|
// END Android-changed: getCallerClass() reimplementation.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user