From 69626f17264dffe7ba9a78c33ba8b6c2355a5840 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 20 May 2021 16:48:33 +0200 Subject: [PATCH] Android: Remove getDolphinInternalDirectory I was going to rename this to getSysDirectory to make it clearer what the returned path actually is, but it turns out we're not actually using this for anything anymore. --- .../features/settings/utils/SettingsFile.java | 28 ------------------- .../utils/DirectoryInitialization.java | 12 -------- 2 files changed, 40 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java index 82ea3a84f1..4ed3f1363e 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java @@ -234,18 +234,6 @@ public final class SettingsFile readFile(getCustomGameSettingsFile(gameId), ini, view); } - public static void readGenericGameSettings(final String gameId, IniFile ini, - SettingsActivityView view) - { - readFile(getGenericGameSettingsFile(gameId), ini, view); - } - - public static void readGenericGameSettingsForAllRegions(final String gameId, - IniFile ini, SettingsActivityView view) - { - readFile(getGenericGameSettingsForAllRegions(gameId), ini, view); - } - /** * Saves a given .ini file on disk. * If unsuccessful, outputs an error telling why it failed. @@ -296,22 +284,6 @@ public final class SettingsFile DirectoryInitialization.getUserDirectory() + "/Config/" + fileName + ".ini"); } - private static File getGenericGameSettingsForAllRegions(String gameId) - { - // Use the first 3 chars from the gameId to load the generic game settings for all regions - gameId = gameId.substring(0, 3); - return new File( - DirectoryInitialization.getDolphinInternalDirectory() + "/GameSettings/" + - gameId + ".ini"); - } - - private static File getGenericGameSettingsFile(String gameId) - { - return new File( - DirectoryInitialization.getDolphinInternalDirectory() + "/GameSettings/" + - gameId + ".ini"); - } - public static File getCustomGameSettingsFile(String gameId) { return new File( diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java index 7af6350d64..9bb68e8b13 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java @@ -42,7 +42,6 @@ public final class DirectoryInitialization DirectoryInitializationState.NOT_YET_INITIALIZED; private static volatile boolean areDirectoriesAvailable = false; private static String userPath; - private static String internalPath; private static AtomicBoolean isDolphinDirectoryInitializationRunning = new AtomicBoolean(false); public enum DirectoryInitializationState @@ -128,7 +127,6 @@ public final class DirectoryInitialization private static void initializeInternalStorage(Context context) { File sysDirectory = new File(context.getFilesDir(), "Sys"); - internalPath = sysDirectory.getAbsolutePath(); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); String revision = NativeLibrary.GetGitRevision(); @@ -241,16 +239,6 @@ public final class DirectoryInitialization return userPath; } - public static String getDolphinInternalDirectory() - { - if (!areDirectoriesAvailable) - { - throw new IllegalStateException( - "DirectoryInitialization must run before accessing the internal directory!"); - } - return internalPath; - } - private static void sendBroadcastState(DirectoryInitializationState state, Context context) { Intent localIntent =