- Removed more stuff 👀

This commit is contained in:
SerpentSpirale 2021-02-04 14:57:59 +01:00
parent a063605961
commit c3824dcc09
13 changed files with 8 additions and 98 deletions

View File

@ -172,13 +172,6 @@ public class AndroidLWJGLKeycode {
CallbackBridge.holdingShift = keyEvent.isShiftPressed();
try {
/*
if (keyEvent.isPrintingKey()) {
BaseMainActivity.sendKeyPress(androidToLwjglMap.get(keyEvent.getKeyCode()), (char) keyEvent.getUnicodeChar(keyEvent.getMetaState()), keyEvent.getScanCode(), CallbackBridge.getCurrentMods(), isDown);
} else if ((int) keyEvent.getDisplayLabel() != KeyEvent.KEYCODE_UNKNOWN) {
BaseMainActivity.sendKeyPress(androidToLwjglMap.get(keyEvent.getKeyCode()), keyEvent.getDisplayLabel(), keyEvent.getScanCode(), CallbackBridge.getCurrentMods(), isDown);
}
*/
//System.out.println(((int)keyEvent.getDisplayLabel()) + " " +keyEvent.getDisplayLabel());
if(keyEvent.getUnicodeChar() != 0) {
char key = (char)keyEvent.getUnicodeChar();
@ -189,10 +182,6 @@ public class AndroidLWJGLKeycode {
} catch (Throwable th) {
th.printStackTrace();
}
//if (isBackspaceAfterChar && (int) keyEvent.getDisplayLabel() != KeyEvent.KEYCODE_UNKNOWN && !CallbackBridge.isGrabbing() && i != KeyEvent.KEYCODE_DEL) {
// BaseMainActivity.sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_BACKSPACE, 0, isDown);
//}
}
public static void execKeyIndex(BaseMainActivity mainActivity, int index) {

View File

@ -238,7 +238,6 @@ public abstract class BaseLauncherActivity extends BaseActivity {
} /*else throw new Exception();*/
} catch(Throwable e) {
e.printStackTrace();
// selectTabPage(tabLayout.getSelectedTabPosition());
}
System.out.println("call to onResumeFragments; E");
}

View File

@ -3,7 +3,6 @@ package net.kdt.pojavlaunch;
import android.content.*;
import android.os.*;
import androidx.core.widget.*;
import androidx.appcompat.app.*;
import androidx.preference.*;
import android.view.*;

View File

@ -3,7 +3,6 @@ package net.kdt.pojavlaunch;
import android.content.*;
import android.net.*;
import androidx.browser.customtabs.*;
// import androidx.browser.customtabs.*;
public class CustomTabs {

View File

@ -1,6 +1,5 @@
package net.kdt.pojavlaunch;
import android.content.res.*;
import android.graphics.*;
import android.view.*;
import android.widget.*;

View File

@ -18,7 +18,6 @@ import android.util.AttributeSet;
import android.util.Log;
import android.view.TextureView;
import android.view.View;
import android.view.View.*;
public class GLTextureView
extends TextureView

View File

@ -4,5 +4,4 @@ public class JAssetInfo
{
public String hash;
public int size;
//public String objects;
}

View File

@ -1,6 +1,5 @@
package net.kdt.pojavlaunch;
import androidx.appcompat.app.*;
public abstract class LoggableActivity extends BaseActivity {
public void appendToLog(String text) {

View File

@ -1,11 +1,6 @@
package net.kdt.pojavlaunch;
import android.app.*;
import android.content.*;
import android.util.*;
import android.view.*;
import java.io.*;
import net.kdt.pojavlaunch.authenticator.mojang.*;
import java.io.*;;
/**
* This account data format is deprecated.
@ -26,7 +21,6 @@ public class MCProfile
public static MCProfile.Builder load(String pofFilePath) {
try {
//String th = new String(new byte[]{-128});
String pofContent = Tools.read(pofFilePath);
return parse(pofContent);
} catch (Exception e) {

View File

@ -2,8 +2,6 @@ package net.kdt.pojavlaunch;
import android.os.*;
import android.view.*;
import android.view.View.*;
import android.widget.*;
import androidx.annotation.Nullable;
@ -13,7 +11,6 @@ import net.kdt.pojavlaunch.utils.MCOptionUtils;
import org.lwjgl.glfw.*;
import java.io.*;
import com.google.gson.*;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.DEFAULT_PREF;

View File

@ -63,7 +63,6 @@ class MinecraftInputConnection extends BaseInputConnection {
}
public boolean commitText(CharSequence text, int newCursorPosition) {
//parent.sendKeyPress(text.charAt(0));
for(int i = 0; i < text.length(); i++) parent.sendKeyPress(text.charAt(i));
return true;
}

View File

@ -113,28 +113,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
pickAccount();
/*
File logFile = new File(Tools.MAIN_PATH, "latestlog.txt");
if (logFile.exists() && logFile.length() < 20480) {
String errMsg = "Error occurred during initialization of ";
try {
String logContent = Tools.read(logFile.getAbsolutePath());
if (logContent.contains(errMsg + "VM") &&
logContent.contains("Could not reserve enough space for")) {
OutOfMemoryError ex = new OutOfMemoryError("Java error: " + logContent);
ex.setStackTrace(null);
Tools.showError(PojavLauncherActivity.this, ex);
// Do it so dialog will not shown for second time
Tools.write(logFile.getAbsolutePath(), logContent.replace(errMsg + "VM", errMsg + "JVM"));
}
} catch (Throwable th) {
Log.w(Tools.APP_NAME, "Could not detect java crash", th);
}
}
*/
//showProfileInfo();
final List<String> accountList = new ArrayList<String>();
final MinecraftAccount tempProfile = PojavProfile.getTempProfileContent(this);

View File

@ -10,7 +10,6 @@ import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
@ -91,7 +90,7 @@ public class PojavLoginActivity extends BaseActivity
private static boolean isSkipInit = false;
// private final String PREF_IS_DONOTSHOWAGAIN_WARN = "isWarnDoNotShowAgain";
public static final String PREF_IS_INSTALLED_JAVARUNTIME = "isJavaRuntimeInstalled";
public static final String PREF_JAVARUNTIME_VER = "javaRuntimeVersion";
@ -100,12 +99,7 @@ public class PojavLoginActivity extends BaseActivity
super.onCreate(savedInstanceState); // false);
Tools.updateWindowSize(this);
/*
ControlData.pixelOf2dp = (int) Tools.dpToPx(2);
ControlData.pixelOf30dp = (int) Tools.dpToPx(30);
ControlData.pixelOf50dp = (int) Tools.dpToPx(50);
ControlData.pixelOf80dp = (int) Tools.dpToPx(80);
*/
ControlData[] specialButtons = ControlData.getSpecialButtons();
specialButtons[0].name = getString(R.string.control_keyboard);
specialButtons[1].name = getString(R.string.control_toggle);
@ -122,7 +116,6 @@ public class PojavLoginActivity extends BaseActivity
private ProgressBar progress;
private ProgressBar progressSpin;
// private EditText progressLog;
private AlertDialog progDlg;
@Override
@ -135,7 +128,7 @@ public class PojavLoginActivity extends BaseActivity
progress = (ProgressBar) startScr.findViewById(R.id.startscreenProgress);
startupTextView = (TextView) startScr.findViewById(R.id.startscreen_text);
//startScr.addView(progress);
AlertDialog.Builder startDlg = new AlertDialog.Builder(PojavLoginActivity.this, R.style.AppTheme);
startDlg.setView(startScr);
@ -196,9 +189,7 @@ public class PojavLoginActivity extends BaseActivity
{
if (obj[0].equals("visible")) {
progress.setVisibility(View.VISIBLE);
} /* else if (obj.length == 2 && obj[1] != null) {
progressLog.append(obj[1]);
} */
}
}
@Override
@ -208,9 +199,7 @@ public class PojavLoginActivity extends BaseActivity
if (obj == 0) {
if (progDlg != null) progDlg.dismiss();
uiInit();
} /* else if (progressLog != null) {
progressLog.setText(getResources().getString(R.string.error_checklog, "\n\n" + progressLog.getText()));
} */
}
}
}
@ -598,32 +587,18 @@ public class PojavLoginActivity extends BaseActivity
} catch (Throwable e) {
e.printStackTrace();
}
// unpackShell.writeToProcess("ln -s " + tarEntry.getName() + " " + tarEntry.getLinkName());
} else if (tarEntry.isDirectory()) {
destPath.mkdirs();
destPath.setExecutable(true);
} else if (!destPath.exists() || destPath.length() != tarEntry.getSize()) {
destPath.getParentFile().mkdirs();
destPath.createNewFile();
// destPath.setExecutable(true);
FileOutputStream os = new FileOutputStream(destPath);
IOUtils.copy(tarIn, os);
os.close();
/*
byte[] btoRead = new byte[2048];
BufferedOutputStream bout =
new BufferedOutputStream(new FileOutputStream(destPath));
int len = 0;
while((len = tarIn.read(btoRead)) != -1) {
bout.write(btoRead,0,len);
}
bout.close();
btoRead = null;
*/
}
tarEntry = tarIn.getNextTarEntry();
}
@ -638,23 +613,7 @@ public class PojavLoginActivity extends BaseActivity
return file.mkdir();
else return file.mkdirs();
}
/*
public void loginUsername(View view)
{
LinearLayout mainLaun = new LinearLayout(this);
LayoutInflater.from(this).inflate(R.layout.launcher_user, mainLaun, true);
replaceFonts(mainLaun);
//edit1 = mainLaun.findViewById(R.id.launcherAccUsername);
new AlertDialog.Builder(this)
.setTitle("Register with username")
.setView(mainLaun)
.show();
}
*/
public void loginMicrosoft(View view) {
CustomTabs.openTab(this,