diff --git a/app/src/main/java/net/sourceforge/opencamera/MainActivity.java b/app/src/main/java/net/sourceforge/opencamera/MainActivity.java index fea761ff80bc1c7f17f297728cabc96f4e67c318..56b14fadef18762283aa3fd98fd55a01c8df356a 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MainActivity.java +++ b/app/src/main/java/net/sourceforge/opencamera/MainActivity.java @@ -354,6 +354,16 @@ public class MainActivity extends AppCompatActivity { if( MyDebug.LOG ) Log.d(TAG, "onCreate: time after updating folder history: " + (System.currentTimeMillis() - debug_time)); + boolean isFirstTimeSaveLocation = sharedPreferences.getBoolean("isFirstTimeSaveLocation", true); + String save_location = sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); + + if (isFirstTimeSaveLocation && save_location.equals("OpenCamera")) { + SharedPreferences.Editor editor = sharedPreferences.edit(); + editor.putString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); + editor.putBoolean("isFirstTimeSaveLocation", false); + editor.apply(); + } + // set up sensors mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); @@ -1108,7 +1118,7 @@ public class MainActivity extends AppCompatActivity { String new_folder; if( res.alt == null ) { // no alternative, fall back to default - new_folder = "OpenCamera"; + new_folder = "Camera"; } else { // replace with the alternative @@ -4710,7 +4720,7 @@ public class MainActivity extends AppCompatActivity { editText.setHint(getResources().getString(R.string.preference_save_location)); editText.setInputType(InputType.TYPE_CLASS_TEXT); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); - editText.setText(sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "OpenCamera")); + editText.setText(sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "Camera")); InputFilter filter = new InputFilter() { // whilst Android seems to allow any characters on internal memory, SD cards are typically formatted with FAT32 final String disallowed = "|\\?*<\":>"; diff --git a/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java b/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java index c1f4d144d179e500d9d963dbbfd15bbe0ec4b09a..8c91d200503c1744c4d41e27b7383ef8d8589107 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java +++ b/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java @@ -1315,7 +1315,7 @@ public class MyPreferenceFragment extends PreferenceFragment implements OnShared about_string.append("\nUsing SAF?: "); about_string.append(sharedPreferences.getBoolean(PreferenceKeys.UsingSAFPreferenceKey, false)); - String save_location = sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "OpenCamera"); + String save_location = sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); about_string.append("\nSave Location: "); about_string.append(save_location); String save_location_saf = sharedPreferences.getString(PreferenceKeys.SaveLocationSAFPreferenceKey, ""); diff --git a/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java b/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java index 35c34f3babd8913fc1f32bd644f91d066ac9680a..d8fdc55db307c666a374207e84d5b2200a489e66 100644 --- a/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java +++ b/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java @@ -338,7 +338,7 @@ public class StorageUtils { // only valid if !isUsingSAF() String getSaveLocation() { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); - return sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "OpenCamera"); + return sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); } // only valid if isUsingSAF() diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 6019e4588450a19b3220d4c2ab60c682306ae7c0..61ef20b50469c40c5cc6e6b32b5c2ae794ffc7b4 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -249,7 +249,7 @@ android:dialogTitle="@string/preference_save_location" android:dialogMessage="@string/preference_save_location_summary" android:inputType="text" - android:defaultValue="OpenCamera" + android:defaultValue="Camera" />