mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-10-06 04:42:03 -04:00
Fix not breakline, fix inaccessible
This commit is contained in:
1 parent
d1e9314280
commit
ee10455d0c
943 files changed
+64
-41
No files matched your search
@@ -463,14 +463,14 @@ public class MCLauncherActivity extends AppCompatActivity
|
||||
@Override
|
||||
public void onCharPrint(String s)
|
||||
{
|
||||
currentLog.append(s);
|
||||
currentLog.append(s + "\n");
|
||||
}
|
||||
});
|
||||
LoggerJava.LoggerOutputStream logErr = new LoggerJava.LoggerOutputStream(System.err, new LoggerJava.OnStringPrintListener(){
|
||||
@Override
|
||||
public void onCharPrint(String s)
|
||||
{
|
||||
currentLog.append(s);
|
||||
currentLog.append(s + "\n");
|
||||
}
|
||||
});
|
||||
System.setOut(new PrintStream(logOut));
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
import java.lang.reflect.*;
|
||||
|
||||
public class SystemCrackResolver
|
||||
{
|
||||
public static void arraycopy(Object src, int srcPos, Object dst, int dstPos, int length) {
|
||||
invoke("arraycopy", src, srcPos, dst, dstPos, length);
|
||||
}
|
||||
|
||||
public static void invoke(String method, Object... params) {
|
||||
Class[] classParams = new Class[params.length];
|
||||
for (int i = 0; i < params.length; i++) {
|
||||
classParams[i] = params[i].getClass();
|
||||
}
|
||||
try {
|
||||
Method methodObj = System.class.getDeclaredMethod(method, classParams);
|
||||
methodObj.setAccessible(true);
|
||||
methodObj.invoke(null, params);
|
||||
} catch (Throwable th) {
|
||||
throw new RuntimeException(th);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -383,12 +383,12 @@ public class LaunchClassLoader extends DexClassLoader {
|
||||
totalLength += read;
|
||||
if (totalLength >= buffer.length - 1) {
|
||||
byte[] newBuffer = new byte[(buffer.length + BUFFER_SIZE)];
|
||||
System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
|
||||
buffer = newBuffer;
|
||||
}
|
||||
} else {
|
||||
byte[] result = new byte[totalLength];
|
||||
System.arraycopy(buffer, 0, result, 0, totalLength);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(buffer, 0, result, 0, totalLength);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user