Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #9146 from JosJuice/android-disable-cover-download
Android: Allow disabling cover downloading
- Loading branch information
Showing
20 changed files
with
193 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| package org.dolphinemu.dolphinemu.features.settings.model; | ||
|
|
||
| public class AdHocStringSetting implements AbstractStringSetting | ||
| { | ||
| private final String mFile; | ||
| private final String mSection; | ||
| private final String mKey; | ||
| private final String mDefaultValue; | ||
|
|
||
| public AdHocStringSetting(String file, String section, String key, String defaultValue) | ||
| { | ||
| mFile = file; | ||
| mSection = section; | ||
| mKey = key; | ||
| mDefaultValue = defaultValue; | ||
|
|
||
| if (!NativeConfig.isSettingSaveable(file, section, key)) | ||
| { | ||
| throw new IllegalArgumentException("File/section/key is unknown or legacy"); | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isOverridden(Settings settings) | ||
| { | ||
| return NativeConfig.isOverridden(mFile, mSection, mKey); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isRuntimeEditable() | ||
| { | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean delete(Settings settings) | ||
| { | ||
| return NativeConfig.deleteKey(settings.getWriteLayer(), mFile, mSection, mKey); | ||
| } | ||
|
|
||
| @Override | ||
| public String getString(Settings settings) | ||
| { | ||
| return NativeConfig.getString(NativeConfig.LAYER_ACTIVE, mFile, mSection, mKey, mDefaultValue); | ||
| } | ||
|
|
||
| @Override | ||
| public void setString(Settings settings, String newValue) | ||
| { | ||
| NativeConfig.setString(settings.getWriteLayer(), mFile, mSection, mKey, newValue); | ||
| } | ||
|
|
||
| public static String getStringGlobal(String file, String section, String key, String defaultValue) | ||
| { | ||
| return NativeConfig.getString(NativeConfig.LAYER_ACTIVE, file, section, key, defaultValue); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.