Android: Remove SettingsActivityView parameters from Settings

No longer used for anything.
This commit is contained in:
JosJuice 2023-03-11 18:36:38 +01:00
parent 99600ef781
commit 08334015f9
6 changed files with 12 additions and 13 deletions

View File

@ -423,7 +423,7 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
protected void onStop()
{
super.onStop();
mSettings.saveSettings(null, null);
mSettings.saveSettings(null);
}
public void onTitleChanged()

View File

@ -92,7 +92,7 @@ public class GamePropertiesDialog extends DialogFragment
{
settings.loadSettings();
StringSetting.MAIN_DEFAULT_ISO.setString(settings, path);
settings.saveSettings(null, getContext());
settings.saveSettings(getContext());
}
});
}

View File

@ -160,7 +160,7 @@ class CheatsActivity : AppCompatActivity(), PanelSlideListener {
fun loadGameSpecificSettings(): Settings {
val settings = Settings()
settings.loadSettings(null, gameId, revision, isWii)
settings.loadSettings(gameId, revision, isWii)
return settings
}

View File

@ -9,7 +9,6 @@ import android.widget.Toast;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.features.input.model.MappingCommon;
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivityView;
import org.dolphinemu.dolphinemu.services.GameFileCacheManager;
import java.io.Closeable;
@ -78,10 +77,10 @@ public class Settings implements Closeable
public void loadSettings()
{
// The value of isWii doesn't matter if we don't have any SettingsActivity
loadSettings(null, true);
loadSettings(true);
}
public void loadSettings(SettingsActivityView view, boolean isWii)
public void loadSettings(boolean isWii)
{
mIsWii = isWii;
mSettingsLoaded = true;
@ -98,14 +97,14 @@ public class Settings implements Closeable
mLoadedRecursiveIsoPathsValue = BooleanSetting.MAIN_RECURSIVE_ISO_PATHS.getBoolean();
}
public void loadSettings(SettingsActivityView view, String gameId, int revision, boolean isWii)
public void loadSettings(String gameId, int revision, boolean isWii)
{
mGameId = gameId;
mRevision = revision;
loadSettings(view, isWii);
loadSettings(isWii);
}
public void saveSettings(SettingsActivityView view, Context context)
public void saveSettings(Context context)
{
if (!isGameSpecific())
{

View File

@ -70,7 +70,7 @@ public final class SettingsActivityPresenter
{
if (!TextUtils.isEmpty(mGameId))
{
mSettings.loadSettings(mView, mGameId, mRevision, mIsWii);
mSettings.loadSettings(mGameId, mRevision, mIsWii);
if (mSettings.gameIniContainsJunk())
{
@ -79,7 +79,7 @@ public final class SettingsActivityPresenter
}
else
{
mSettings.loadSettings(mView, mIsWii);
mSettings.loadSettings(mIsWii);
}
}
@ -110,7 +110,7 @@ public final class SettingsActivityPresenter
if (mSettings != null && finishing && mShouldSave)
{
Log.debug("[SettingsActivity] Settings activity stopping. Saving settings to INI...");
mSettings.saveSettings(mView, mActivity);
mSettings.saveSettings(mActivity);
}
}

View File

@ -34,7 +34,7 @@ object Analytics {
BooleanSetting.MAIN_ANALYTICS_PERMISSION_ASKED.setBoolean(settings, true)
// Context is set to null to avoid toasts
settings.saveSettings(null, null)
settings.saveSettings(null)
}
}