From 827d7db46ca8dac307c25e4b588a9937e9d06e1d Mon Sep 17 00:00:00 2001 From: artdeell Date: Sat, 18 May 2024 20:22:14 +0300 Subject: [PATCH] Fix[codestyle]: rename the internal variant of getMaxContinuousAddressSpaceSize() --- .../src/main/java/net/kdt/pojavlaunch/Tools.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java index 47da185a7..f93d74240 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java @@ -172,7 +172,7 @@ public final class Tools { public static void launchMinecraft(final AppCompatActivity activity, MinecraftAccount minecraftAccount, MinecraftProfile minecraftProfile, String versionId, int versionJavaRequirement) throws Throwable { int freeDeviceMemory = getFreeDeviceMemory(activity); - int freeAddressSpace = getMaxContinousAddressSpaceSize(); + int freeAddressSpace = getMaxContinuousAddressSpaceSize(); int localeString; Log.i("MemStat", "Free RAM: "+freeDeviceMemory+" Addressable: "+freeAddressSpace); if(freeDeviceMemory > freeAddressSpace && freeAddressSpace != -1) { @@ -936,7 +936,7 @@ public final class Tools { return (int) (memInfo.availMem / 1048576L); } - private static int getMaxContinuousAddressSpaceSize0() throws Exception{ + private static int internalGetMaxContinuousAddressSpaceSize() throws Exception{ MemoryHoleFinder memoryHoleFinder = new MemoryHoleFinder(); new SelfMapsParser(memoryHoleFinder).run(); long largestHole = memoryHoleFinder.getLargestHole(); @@ -944,9 +944,9 @@ public final class Tools { else return (int)(largestHole / 1048576L); } - public static int getMaxContinousAddressSpaceSize() { + public static int getMaxContinuousAddressSpaceSize() { try { - return getMaxContinuousAddressSpaceSize0(); + return internalGetMaxContinuousAddressSpaceSize(); }catch (Exception e){ Log.w("Tools", "Failed to find the largest uninterrupted address space"); return -1;