- 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(); CallbackBridge.holdingShift = keyEvent.isShiftPressed();
try { 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()); //System.out.println(((int)keyEvent.getDisplayLabel()) + " " +keyEvent.getDisplayLabel());
if(keyEvent.getUnicodeChar() != 0) { if(keyEvent.getUnicodeChar() != 0) {
char key = (char)keyEvent.getUnicodeChar(); char key = (char)keyEvent.getUnicodeChar();
@ -189,10 +182,6 @@ public class AndroidLWJGLKeycode {
} catch (Throwable th) { } catch (Throwable th) {
th.printStackTrace(); 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) { public static void execKeyIndex(BaseMainActivity mainActivity, int index) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,8 +2,6 @@ package net.kdt.pojavlaunch;
import android.os.*; import android.os.*;
import android.view.*; import android.view.*;
import android.view.View.*;
import android.widget.*;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -13,7 +11,6 @@ import net.kdt.pojavlaunch.utils.MCOptionUtils;
import org.lwjgl.glfw.*; import org.lwjgl.glfw.*;
import java.io.*; import java.io.*;
import com.google.gson.*;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.DEFAULT_PREF; 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) { 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)); for(int i = 0; i < text.length(); i++) parent.sendKeyPress(text.charAt(i));
return true; return true;
} }

View File

@ -113,28 +113,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
pickAccount(); 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 List<String> accountList = new ArrayList<String>();
final MinecraftAccount tempProfile = PojavProfile.getTempProfileContent(this); final MinecraftAccount tempProfile = PojavProfile.getTempProfileContent(this);

View File

@ -10,7 +10,6 @@ import android.content.res.AssetManager;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
import android.net.Uri; import android.net.Uri;
@ -91,7 +90,7 @@ public class PojavLoginActivity extends BaseActivity
private static boolean isSkipInit = false; 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_IS_INSTALLED_JAVARUNTIME = "isJavaRuntimeInstalled";
public static final String PREF_JAVARUNTIME_VER = "javaRuntimeVersion"; public static final String PREF_JAVARUNTIME_VER = "javaRuntimeVersion";
@ -100,12 +99,7 @@ public class PojavLoginActivity extends BaseActivity
super.onCreate(savedInstanceState); // false); super.onCreate(savedInstanceState); // false);
Tools.updateWindowSize(this); 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(); ControlData[] specialButtons = ControlData.getSpecialButtons();
specialButtons[0].name = getString(R.string.control_keyboard); specialButtons[0].name = getString(R.string.control_keyboard);
specialButtons[1].name = getString(R.string.control_toggle); specialButtons[1].name = getString(R.string.control_toggle);
@ -122,7 +116,6 @@ public class PojavLoginActivity extends BaseActivity
private ProgressBar progress; private ProgressBar progress;
private ProgressBar progressSpin; private ProgressBar progressSpin;
// private EditText progressLog;
private AlertDialog progDlg; private AlertDialog progDlg;
@Override @Override
@ -135,7 +128,7 @@ public class PojavLoginActivity extends BaseActivity
progress = (ProgressBar) startScr.findViewById(R.id.startscreenProgress); progress = (ProgressBar) startScr.findViewById(R.id.startscreenProgress);
startupTextView = (TextView) startScr.findViewById(R.id.startscreen_text); startupTextView = (TextView) startScr.findViewById(R.id.startscreen_text);
//startScr.addView(progress);
AlertDialog.Builder startDlg = new AlertDialog.Builder(PojavLoginActivity.this, R.style.AppTheme); AlertDialog.Builder startDlg = new AlertDialog.Builder(PojavLoginActivity.this, R.style.AppTheme);
startDlg.setView(startScr); startDlg.setView(startScr);
@ -196,9 +189,7 @@ public class PojavLoginActivity extends BaseActivity
{ {
if (obj[0].equals("visible")) { if (obj[0].equals("visible")) {
progress.setVisibility(View.VISIBLE); progress.setVisibility(View.VISIBLE);
} /* else if (obj.length == 2 && obj[1] != null) { }
progressLog.append(obj[1]);
} */
} }
@Override @Override
@ -208,9 +199,7 @@ public class PojavLoginActivity extends BaseActivity
if (obj == 0) { if (obj == 0) {
if (progDlg != null) progDlg.dismiss(); if (progDlg != null) progDlg.dismiss();
uiInit(); 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) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
} }
// unpackShell.writeToProcess("ln -s " + tarEntry.getName() + " " + tarEntry.getLinkName());
} else if (tarEntry.isDirectory()) { } else if (tarEntry.isDirectory()) {
destPath.mkdirs(); destPath.mkdirs();
destPath.setExecutable(true); destPath.setExecutable(true);
} else if (!destPath.exists() || destPath.length() != tarEntry.getSize()) { } else if (!destPath.exists() || destPath.length() != tarEntry.getSize()) {
destPath.getParentFile().mkdirs(); destPath.getParentFile().mkdirs();
destPath.createNewFile(); destPath.createNewFile();
// destPath.setExecutable(true);
FileOutputStream os = new FileOutputStream(destPath); FileOutputStream os = new FileOutputStream(destPath);
IOUtils.copy(tarIn, os); IOUtils.copy(tarIn, os);
os.close(); 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(); tarEntry = tarIn.getNextTarEntry();
} }
@ -638,23 +613,7 @@ public class PojavLoginActivity extends BaseActivity
return file.mkdir(); return file.mkdir();
else return file.mkdirs(); 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) { public void loginMicrosoft(View view) {
CustomTabs.openTab(this, CustomTabs.openTab(this,