first commit

This commit is contained in:
Arigadam 2026-10-05 13:37:30 +03:00
commit 0b134cf11f
1087 changed files with 16728 additions and 0 deletions

View file

@ -0,0 +1,6 @@
package com.mojang.minecraftpe;
/* loaded from: classes.dex */
public final class BuildConfig {
public static final boolean DEBUG = false;
}

View file

@ -0,0 +1,43 @@
package com.mojang.minecraftpe;
import android.os.Build;
import java.io.File;
import java.io.FileFilter;
import java.util.regex.Pattern;
/* loaded from: classes.dex */
public class HardwareInformation {
public static String getDeviceModelName() {
String manufacturer = Build.MANUFACTURER;
String model = Build.MODEL;
if (model.startsWith(manufacturer)) {
String returnString = model.toUpperCase();
return returnString;
}
String returnString2 = manufacturer.toUpperCase() + " " + model;
return returnString2;
}
public static String getAndroidVersion() {
return Build.VERSION.RELEASE;
}
public static String getCPU() {
return Build.CPU_ABI;
}
public static int getNumCores() {
try {
File dir = new File("/sys/devices/system/cpu/");
File[] files = dir.listFiles(new FileFilter() { // from class: com.mojang.minecraftpe.HardwareInformation.1CpuFilter
@Override // java.io.FileFilter
public boolean accept(File pathname) {
return Pattern.matches("cpu[0-9]+", pathname.getName());
}
});
return files.length;
} catch (Exception e) {
return 1;
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,14 @@
package com.mojang.minecraftpe;
import android.content.Intent;
import android.net.Uri;
/* loaded from: classes.dex */
public class Minecraft_Market extends MainActivity {
@Override // com.mojang.minecraftpe.MainActivity
public void buyGame() {
Uri buyLink = Uri.parse("market://details?id=com.mojang.minecraftpe");
Intent marketIntent = new Intent("android.intent.action.VIEW", buyLink);
startActivity(marketIntent);
}
}

View file

@ -0,0 +1,19 @@
package com.mojang.minecraftpe;
import android.content.Intent;
import android.net.Uri;
/* loaded from: classes.dex */
public class Minecraft_Market_Demo extends MainActivity {
@Override // com.mojang.minecraftpe.MainActivity
public void buyGame() {
Uri buyLink = Uri.parse("market://details?id=com.mojang.minecraftpe");
Intent marketIntent = new Intent("android.intent.action.VIEW", buyLink);
startActivity(marketIntent);
}
@Override // com.mojang.minecraftpe.MainActivity
protected boolean isDemo() {
return true;
}
}

View file

@ -0,0 +1,23 @@
package com.mojang.minecraftpe;
/* loaded from: classes.dex */
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int bg32 = 0x7f020000;
public static final int icon = 0x7f020001;
public static final int icon_demo = 0x7f020002;
public static final int iconx = 0x7f020003;
}
public static final class string {
public static final int app_name = 0x7f030000;
public static final int app_name_demo = 0x7f030001;
public static final int app_name_short = 0x7f030003;
public static final int app_name_short_demo = 0x7f030004;
public static final int xperiaplayoptimized_content = 0x7f030002;
}
}

View file

@ -0,0 +1,97 @@
package com.mojang.minecraftpe;
import android.content.Context;
import android.text.InputFilter;
import android.text.Spanned;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputConnectionWrapper;
import android.widget.EditText;
/* loaded from: classes.dex */
public class TextInputProxyEditTextbox extends EditText {
private MCPEKeyWatcher _mcpeKeyWatcher;
public final int allowedLength;
public final boolean limitInput;
public interface MCPEKeyWatcher {
void onBackKeyPressed();
void onDeleteKeyPressed();
}
public TextInputProxyEditTextbox(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this._mcpeKeyWatcher = null;
this.allowedLength = 160;
this.limitInput = false;
}
public TextInputProxyEditTextbox(Context context, AttributeSet attrs) {
super(context, attrs);
this._mcpeKeyWatcher = null;
this.allowedLength = 160;
this.limitInput = false;
}
public TextInputProxyEditTextbox(Context context, int allowedLength, boolean limitInput) {
super(context);
InputFilter[] filters;
this._mcpeKeyWatcher = null;
this.allowedLength = allowedLength;
this.limitInput = limitInput;
if (limitInput) {
filters = new InputFilter[]{new InputFilter.LengthFilter(this.allowedLength), new InputFilter() { // from class: com.mojang.minecraftpe.TextInputProxyEditTextbox.1
@Override // android.text.InputFilter
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
return (source.equals("") || source.toString().matches("^[a-zA-Z0-9_ -^~'.,;!#&()=`{}]*")) ? source : "";
}
}};
} else {
filters = new InputFilter[]{new InputFilter.LengthFilter(this.allowedLength)};
}
setFilters(filters);
}
@Override // android.widget.TextView, android.view.View
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
return new MCPEInputConnection(super.onCreateInputConnection(outAttrs), true, this);
}
@Override // android.widget.TextView, android.view.View
public boolean onKeyPreIme(int keyCode, KeyEvent event) {
if (keyCode != 4 || event.getAction() != 1) {
return super.dispatchKeyEvent(event);
}
if (this._mcpeKeyWatcher != null) {
this._mcpeKeyWatcher.onBackKeyPressed();
}
return false;
}
public void setOnMCPEKeyWatcher(MCPEKeyWatcher mcpeKeyWatcher) {
this._mcpeKeyWatcher = mcpeKeyWatcher;
}
private class MCPEInputConnection extends InputConnectionWrapper {
TextInputProxyEditTextbox textbox;
public MCPEInputConnection(InputConnection target, boolean mutable, TextInputProxyEditTextbox textbox) {
super(target, mutable);
this.textbox = textbox;
}
@Override // android.view.inputmethod.InputConnectionWrapper, android.view.inputmethod.InputConnection
public boolean sendKeyEvent(KeyEvent event) {
if (this.textbox.getText().length() != 0 || event.getAction() != 0 || event.getKeyCode() != 67) {
return super.sendKeyEvent(event);
}
if (TextInputProxyEditTextbox.this._mcpeKeyWatcher != null) {
TextInputProxyEditTextbox.this._mcpeKeyWatcher.onDeleteKeyPressed();
}
return false;
}
}
}