Loading app/src/main/java/net/sourceforge/opencamera/MainActivity.java +12 −2 Original line number Diff line number Diff line Loading @@ -378,6 +378,16 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen 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); Loading Loading @@ -1144,7 +1154,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen String new_folder; if( res.alt == null ) { // no alternative, fall back to default new_folder = "OpenCamera"; new_folder = "Camera"; } else { // replace with the alternative Loading Loading @@ -5448,7 +5458,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen 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 = "|\\?*<\":>"; Loading app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -678,7 +678,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, ""); Loading app/src/main/java/net/sourceforge/opencamera/StorageUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -376,7 +376,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() Loading app/src/main/res/xml/preferences_sub_camera_controls_more.xml +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ android:dialogTitle="@string/preference_save_location" android:dialogMessage="@string/preference_save_location_summary" android:inputType="text" android:defaultValue="OpenCamera" android:defaultValue="Camera" /> <!-- if we move this to another PreferenceGroup, we should update code to remove this Preference --> Loading Loading
app/src/main/java/net/sourceforge/opencamera/MainActivity.java +12 −2 Original line number Diff line number Diff line Loading @@ -378,6 +378,16 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen 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); Loading Loading @@ -1144,7 +1154,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen String new_folder; if( res.alt == null ) { // no alternative, fall back to default new_folder = "OpenCamera"; new_folder = "Camera"; } else { // replace with the alternative Loading Loading @@ -5448,7 +5458,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen 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 = "|\\?*<\":>"; Loading
app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -678,7 +678,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, ""); Loading
app/src/main/java/net/sourceforge/opencamera/StorageUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -376,7 +376,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() Loading
app/src/main/res/xml/preferences_sub_camera_controls_more.xml +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ android:dialogTitle="@string/preference_save_location" android:dialogMessage="@string/preference_save_location_summary" android:inputType="text" android:defaultValue="OpenCamera" android:defaultValue="Camera" /> <!-- if we move this to another PreferenceGroup, we should update code to remove this Preference --> Loading