mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-25 12:32:31 +01:00
merging with eb0df2b
This commit is contained in:
parent
fd4459e570
commit
f89d405226
@ -245,13 +245,13 @@ public class SettingsActivity extends PreferenceActivity {
|
||||
}
|
||||
|
||||
public static void initSettings(Context context) {
|
||||
PreferenceManager.setDefaultValues(context, R.xml.settings_screen, false);
|
||||
PreferenceManager.setDefaultValues(context, R.xml.settings, false);
|
||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if(sp.getString(context.getString(R.string.downloadPathPreference), "").isEmpty()){
|
||||
if(sp.getString(context.getString(R.string.download_path_key), "").isEmpty()){
|
||||
SharedPreferences.Editor spEditor = sp.edit();
|
||||
String newPipeDownloadStorage =
|
||||
Environment.getExternalStorageDirectory().getAbsolutePath() + "/NewPipe";
|
||||
spEditor.putString(context.getString(R.string.downloadPathPreference)
|
||||
spEditor.putString(context.getString(R.string.download_path_key)
|
||||
, newPipeDownloadStorage);
|
||||
spEditor.apply();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user