mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-10 10:20:32 -07:00
Folder structure
This commit is contained in:
parent
62152f31dc
commit
fc85c8096a
21 changed files with 40 additions and 55 deletions
|
|
@ -41,7 +41,7 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".SettingsMenu"></activity>
|
<activity android:name=".SettingsActivity"></activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:theme="@style/MenuDialog"
|
android:theme="@style/MenuDialog"
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
<service android:enabled="true" android:name="net.kdt.SoundService" />
|
<service android:enabled="true" android:name=".sound.SoundService" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
import android.content.*;
|
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import androidx.appcompat.app.*;
|
import androidx.appcompat.app.*;
|
||||||
import net.kdt.pojavlaunch.utils.*;
|
import net.kdt.pojavlaunch.utils.*;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_IGNORE_NOTCH;
|
|
||||||
|
|
||||||
public class BaseActivity extends AppCompatActivity
|
public class BaseActivity extends AppCompatActivity
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.Tools.getFileName;
|
|
||||||
|
|
||||||
import android.app.*;
|
import android.app.*;
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
import android.view.*;
|
import android.view.*;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
public abstract class BaseLauncherActivity extends BaseActivity {
|
public abstract class BaseLauncherActivity extends BaseActivity {
|
||||||
protected boolean canBack = false;
|
protected boolean canBack = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,21 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.Architecture.ARCH_X86;
|
import static net.kdt.pojavlaunch.utils.Architecture.ARCH_X86;
|
||||||
import static net.kdt.pojavlaunch.Tools.currentDisplayMetrics;
|
|
||||||
|
|
||||||
import static org.lwjgl.glfw.CallbackBridge.sendKeyPress;
|
import static org.lwjgl.glfw.CallbackBridge.sendKeyPress;
|
||||||
import static org.lwjgl.glfw.CallbackBridge.windowHeight;
|
|
||||||
import static org.lwjgl.glfw.CallbackBridge.windowWidth;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.*;
|
import android.app.*;
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import android.util.*;
|
import android.util.*;
|
||||||
import android.view.*;
|
import android.view.*;
|
||||||
import android.widget.*;
|
|
||||||
|
|
||||||
import androidx.drawerlayout.widget.*;
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
import com.google.android.material.navigation.*;
|
|
||||||
import com.kdt.LoggerView;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.prefs.*;
|
|
||||||
import org.lwjgl.glfw.*;
|
|
||||||
|
|
||||||
public class BaseMainActivity extends BaseActivity {
|
public class BaseMainActivity extends BaseActivity {
|
||||||
public static volatile ClipboardManager GLOBAL_CLIPBOARD;
|
public static volatile ClipboardManager GLOBAL_CLIPBOARD;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import android.app.ActivityManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import android.os.Vibrator;
|
import android.os.Vibrator;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
@ -16,14 +15,14 @@ import android.widget.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import net.kdt.SoundService;
|
import net.kdt.pojavlaunch.sound.JAudioManager;
|
||||||
|
import net.kdt.pojavlaunch.sound.SoundService;
|
||||||
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
|
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
|
||||||
import net.kdt.pojavlaunch.prefs.*;
|
import net.kdt.pojavlaunch.prefs.*;
|
||||||
import net.kdt.pojavlaunch.utils.*;
|
import net.kdt.pojavlaunch.utils.*;
|
||||||
import org.lwjgl.glfw.*;
|
import org.lwjgl.glfw.*;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.Tools.currentDisplayMetrics;
|
import static net.kdt.pojavlaunch.utils.Tools.currentDisplayMetrics;
|
||||||
import static net.kdt.pojavlaunch.Tools.getFileName;
|
|
||||||
import static net.kdt.pojavlaunch.utils.MathUtils.map;
|
import static net.kdt.pojavlaunch.utils.MathUtils.map;
|
||||||
|
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
@ -130,7 +129,7 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTou
|
||||||
// Launch Settings Popup
|
// Launch Settings Popup
|
||||||
findViewById(R.id.menu).setOnTouchListener((view, motionEvent) -> {
|
findViewById(R.id.menu).setOnTouchListener((view, motionEvent) -> {
|
||||||
if(motionEvent.getAction() == MotionEvent.ACTION_DOWN){
|
if(motionEvent.getAction() == MotionEvent.ACTION_DOWN){
|
||||||
startActivity(new Intent(JavaGUILauncherActivity.this, SettingsMenu.class));
|
startActivity(new Intent(JavaGUILauncherActivity.this, SettingsActivity.class));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package net.kdt.pojavlaunch;
|
||||||
import androidx.annotation.Keep;
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.utils.JMessageHandler;
|
import net.kdt.pojavlaunch.utils.JMessageHandler;
|
||||||
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.Architecture.archAsString;
|
import static net.kdt.pojavlaunch.utils.Architecture.archAsString;
|
||||||
import static net.kdt.pojavlaunch.Tools.getFileName;
|
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.AssetManager;
|
import android.content.res.AssetManager;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
@ -28,13 +25,12 @@ import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
|
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
|
||||||
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
||||||
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,14 @@ import androidx.preference.PreferenceManager;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
||||||
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
public class SettingsMenu extends Activity {
|
public class SettingsActivity extends Activity {
|
||||||
|
|
||||||
private static final int FILE_SELECT_CODE = 0;
|
private static final int FILE_SELECT_CODE = 0;
|
||||||
|
|
||||||
|
|
@ -7,6 +7,8 @@ import static android.view.MotionEvent.ACTION_POINTER_DOWN;
|
||||||
import static android.view.MotionEvent.ACTION_POINTER_UP;
|
import static android.view.MotionEvent.ACTION_POINTER_UP;
|
||||||
import static android.view.MotionEvent.ACTION_UP;
|
import static android.view.MotionEvent.ACTION_UP;
|
||||||
|
|
||||||
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class aiming at better detecting X-tap events regardless of the POINTERS
|
* Class aiming at better detecting X-tap events regardless of the POINTERS
|
||||||
* Only uses the least amount of events possible,
|
* Only uses the least amount of events possible,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import android.view.*;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import net.kdt.pojavlaunch.*;
|
import net.kdt.pojavlaunch.*;
|
||||||
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
import android.graphics.*;
|
import android.graphics.*;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import android.content.Context;
|
||||||
import android.system.Os;
|
import android.system.Os;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.R;
|
import net.kdt.pojavlaunch.R;
|
||||||
import net.kdt.pojavlaunch.Tools;
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
import net.kdt.pojavlaunch.utils.JREUtils;
|
import net.kdt.pojavlaunch.utils.JREUtils;
|
||||||
|
|
||||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
package net.kdt.pojavlaunch.prefs;
|
package net.kdt.pojavlaunch.prefs;
|
||||||
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
import net.kdt.pojavlaunch.*;
|
|
||||||
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
|
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
|
||||||
import net.kdt.pojavlaunch.utils.JREUtils;
|
import net.kdt.pojavlaunch.utils.JREUtils;
|
||||||
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
public class LauncherPreferences
|
public class LauncherPreferences
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import android.webkit.MimeTypeMap;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.R;
|
import net.kdt.pojavlaunch.R;
|
||||||
import net.kdt.pojavlaunch.Tools;
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch.sound;
|
||||||
|
|
||||||
import android.app.ActivityManager;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
import net.kdt.SoundService;
|
import net.kdt.pojavlaunch.JavaGUILauncherActivity;
|
||||||
|
|
||||||
public class JAudioManager {
|
public class JAudioManager {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package net.kdt;
|
package net.kdt.pojavlaunch.sound;
|
||||||
|
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
@ -7,7 +7,7 @@ import android.net.Uri;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.Tools;
|
import net.kdt.pojavlaunch.utils.Tools;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch.utils;
|
||||||
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package net.kdt.pojavlaunch.utils;
|
package net.kdt.pojavlaunch.utils;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.JAudioManager;
|
import net.kdt.pojavlaunch.sound.JAudioManager;
|
||||||
import net.kdt.pojavlaunch.JavaGUILauncherActivity;
|
import net.kdt.pojavlaunch.JavaGUILauncherActivity;
|
||||||
|
|
||||||
public class JMessageHandler {
|
public class JMessageHandler {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package net.kdt.pojavlaunch.utils;
|
package net.kdt.pojavlaunch.utils;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.Architecture.ARCH_X86;
|
import static net.kdt.pojavlaunch.utils.Architecture.ARCH_X86;
|
||||||
import static net.kdt.pojavlaunch.Architecture.archAsString;
|
import static net.kdt.pojavlaunch.utils.Architecture.archAsString;
|
||||||
import static net.kdt.pojavlaunch.Architecture.is64BitsDevice;
|
import static net.kdt.pojavlaunch.utils.Architecture.is64BitsDevice;
|
||||||
import static net.kdt.pojavlaunch.Tools.LOCAL_RENDERER;
|
import static net.kdt.pojavlaunch.utils.Tools.LOCAL_RENDERER;
|
||||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_GLES_SHRINK_HACK;
|
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_GLES_SHRINK_HACK;
|
||||||
|
|
||||||
import android.app.*;
|
import android.app.*;
|
||||||
|
|
@ -11,7 +11,6 @@ import android.content.*;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.system.*;
|
import android.system.*;
|
||||||
import android.util.*;
|
import android.util.*;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.oracle.dalvik.*;
|
import com.oracle.dalvik.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch.utils;
|
||||||
|
|
||||||
public class LWJGLGLFWKeycode
|
public class LWJGLGLFWKeycode
|
||||||
{
|
{
|
||||||
|
|
@ -1,28 +1,26 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch.utils;
|
||||||
|
|
||||||
import android.app.*;
|
import android.app.*;
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.net.*;
|
import android.net.*;
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import android.provider.OpenableColumns;
|
|
||||||
import android.util.*;
|
import android.util.*;
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.charset.*;
|
import java.nio.charset.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.zip.*;
|
import java.util.zip.*;
|
||||||
import net.kdt.pojavlaunch.utils.*;
|
|
||||||
|
|
||||||
import org.apache.commons.codec.binary.Hex;
|
import net.kdt.pojavlaunch.BaseMainActivity;
|
||||||
|
import net.kdt.pojavlaunch.BuildConfig;
|
||||||
|
import net.kdt.pojavlaunch.R;
|
||||||
|
|
||||||
import org.lwjgl.glfw.*;
|
import org.lwjgl.glfw.*;
|
||||||
import android.view.*;
|
import android.view.*;
|
||||||
|
|
||||||
import static android.os.Build.VERSION.SDK_INT;
|
import static android.os.Build.VERSION.SDK_INT;
|
||||||
import static android.os.Build.VERSION_CODES.P;
|
|
||||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_IGNORE_NOTCH;
|
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_IGNORE_NOTCH;
|
||||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_NOTCH_SIZE;
|
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_NOTCH_SIZE;
|
||||||
|
|
||||||
|
|
@ -4,6 +4,8 @@ import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
|
||||||
import net.kdt.pojavlaunch.*;
|
import net.kdt.pojavlaunch.*;
|
||||||
|
import net.kdt.pojavlaunch.utils.LWJGLGLFWKeycode;
|
||||||
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
|
|
||||||
public class CallbackBridge {
|
public class CallbackBridge {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue