Some small changes

This commit is contained in:
khanhduytran0 2020-03-19 17:07:50 +07:00
parent e1ce65eb29
commit 32b121cbd2
34 changed files with 27 additions and 40 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

Binary file not shown.

View File

@ -735,25 +735,12 @@ 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(){
// test skip
if (true) return;
@Override
public void run()
{
while (!isLogAllowed) {
try {
if (isFirstLog) {
isFirstLog = false;
Thread.sleep(5000);
isLogAllowed = true;
}
Thread.sleep(100);
} catch (InterruptedException e) {}
}
textLog.post(new Runnable(){
private String allText;
@ -775,8 +762,6 @@ public class MainActivity extends Activity implements OnTouchListener
}
});
}
}, "PojavLoggerThread").start();
}
public void handleMessage(Message msg) {
switch (msg.what) {

View File

@ -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);

View File

@ -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) {