mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-10-06 04:42:03 -04:00
Some small changes
This commit is contained in:
1 parent
e1ce65eb29
commit
32b121cbd2
34 files changed
+27
-40
No files matched your search
@@ -735,47 +735,32 @@ public class MainActivity extends Activity implements OnTouchListener
|
||||
appendToLog(text + "\n");
|
||||
}
|
||||
|
||||
private boolean isLogAllowed = false;
|
||||
private boolean isFirstLog = true;
|
||||
private void appendToLog(final String text) {
|
||||
new Thread(new Runnable(){
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
while (!isLogAllowed) {
|
||||
try {
|
||||
if (isFirstLog) {
|
||||
isFirstLog = false;
|
||||
Thread.sleep(5000);
|
||||
isLogAllowed = true;
|
||||
}
|
||||
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {}
|
||||
// test skip
|
||||
if (true) return;
|
||||
|
||||
|
||||
|
||||
|
||||
textLog.post(new Runnable(){
|
||||
private String allText;
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
textLog.append(text);
|
||||
if (toggleScrollLog.isChecked()) {
|
||||
contentScroll.fullScroll(ScrollView.FOCUS_DOWN);
|
||||
}
|
||||
}
|
||||
|
||||
textLog.post(new Runnable(){
|
||||
private String allText;
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
textLog.append(text);
|
||||
if (toggleScrollLog.isChecked()) {
|
||||
contentScroll.fullScroll(ScrollView.FOCUS_DOWN);
|
||||
}
|
||||
}
|
||||
});
|
||||
textLogBehindGL.post(new Runnable(){
|
||||
});
|
||||
textLogBehindGL.post(new Runnable(){
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
textLogBehindGL.append(text);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, "PojavLoggerThread").start();
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
textLogBehindGL.append(text);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void handleMessage(Message msg) {
|
||||
|
||||
@@ -292,7 +292,7 @@ public final class Tools
|
||||
mainLoader.loadClass("com.android.dx.observer.ObserverStatus").getMethod("setReceiver", String.class).invoke(null, receiveMethod);
|
||||
Class mainClass = mainLoader.loadClass("com.android.dx.command.Main");
|
||||
Method mainMethod = mainClass.getMethod("main", new String[]{}.getClass());
|
||||
mainMethod.invoke(null, new Object[]{new String[]{"--dex", "--output", newFileOut.getAbsolutePath(), fileIn}});
|
||||
mainMethod.invoke(null, new Object[]{new String[]{"--dex", "--no-optimize", "--min-sdk-version=" + Build.VERSION.SDK_INT, "--output", newFileOut.getAbsolutePath(), fileIn}});
|
||||
//com.android.dx.mod.Main.dexTheJar(fileIn, fileOut, ctx.getCacheDir().getAbsolutePath(), listener);
|
||||
|
||||
|
||||
|
||||
@@ -22,9 +22,10 @@ public class DownloadUtils {
|
||||
InputStream is = null;
|
||||
byte[] buf; // 16384
|
||||
try {
|
||||
// System.out.println("Connecting: " + url.toString());
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestProperty("User-Agent", USER_AGENT);
|
||||
conn.setConnectTimeout(2000);
|
||||
conn.setConnectTimeout(10000);
|
||||
conn.setDoInput(true);
|
||||
conn.connect();
|
||||
if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) {
|
||||
|
||||
Reference in new issue
Block a user