Aperture: Rename photoSaveLocation to saveLocation

Change-Id: If027f9f1e8e681673378a0897acdb2b46e175ff7
diff --git a/app/src/main/java/org/lineageos/aperture/MainActivity.kt b/app/src/main/java/org/lineageos/aperture/MainActivity.kt
index 75dd8c4..36f36a3 100644
--- a/app/src/main/java/org/lineageos/aperture/MainActivity.kt
+++ b/app/src/main/java/org/lineageos/aperture/MainActivity.kt
@@ -160,7 +160,7 @@
             // Reset cached location
             location = null
 
-            if (allLocationPermissionsGranted() && sharedPreferences.photoSaveLocation) {
+            if (allLocationPermissionsGranted() && sharedPreferences.saveLocation) {
                 // Request location updates
                 locationManager.allProviders.forEach {
                     locationManager.requestLocationUpdates(it, 1000, 0f, this)
diff --git a/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt b/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt
index 1494f61..28f37be 100644
--- a/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt
+++ b/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt
@@ -141,18 +141,6 @@
         }
     }
 
-private const val PHOTO_SAVE_LOCATION = "photo_save_location"
-private const val PHOTO_SAVE_LOCATION_DEFAULT = false
-internal var SharedPreferences.photoSaveLocation: Boolean
-    get() {
-        return getBoolean(PHOTO_SAVE_LOCATION, PHOTO_SAVE_LOCATION_DEFAULT)
-    }
-    set(value) {
-        edit {
-            putBoolean(PHOTO_SAVE_LOCATION, value)
-        }
-    }
-
 private const val PHOTO_FLASH_MODE_KEY = "photo_flash_mode"
 private const val PHOTO_FLASH_MODE_DEFAULT = "auto"
 
@@ -283,6 +271,18 @@
         }
     }
 
+private const val SAVE_LOCATION = "save_location"
+private const val SAVE_LOCATION_DEFAULT = false
+internal var SharedPreferences.saveLocation: Boolean
+    get() {
+        return getBoolean(SAVE_LOCATION, SAVE_LOCATION_DEFAULT)
+    }
+    set(value) {
+        edit {
+            putBoolean(SAVE_LOCATION, value)
+        }
+    }
+
 // Shutter sound
 private const val SHUTTER_SOUND_KEY = "shutter_sound"
 private const val SHUTTER_SOUND_DEFAULT = true
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 753f502..b0c76b0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -32,12 +32,12 @@
     <string name="videos_header">Videos</string>
 
     <!-- General Preferences -->
+    <string name="save_location_title">Save GPS location</string>
     <string name="shutter_sound_title">Shutter sound</string>
     <string name="shutter_sound_summary">Note: In some countries this setting will be ignored</string>
 
     <!-- Photo Preferences -->
     <string name="photo_capture_mode_title">Capture mode</string>
-    <string name="photo_save_location_title">Save GPS location</string>
 
     <!-- Videos Preferences -->
     <string name="video_quality_title">Video quality</string>
diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml
index 68769c3..e9cdfa2 100644
--- a/app/src/main/res/xml/root_preferences.xml
+++ b/app/src/main/res/xml/root_preferences.xml
@@ -3,6 +3,11 @@
     <PreferenceCategory app:title="@string/general_header">
 
         <SwitchPreference
+            app:defaultValue="false"
+            app:key="save_location"
+            app:title="@string/save_location_title" />
+
+        <SwitchPreference
             app:defaultValue="true"
             app:key="shutter_sound"
             app:title="@string/shutter_sound_title"
@@ -20,11 +25,6 @@
             app:title="@string/photo_capture_mode_title"
             app:useSimpleSummaryProvider="true" />
 
-        <SwitchPreference
-            app:defaultValue="false"
-            app:key="photo_save_location"
-            app:title="@string/photo_save_location_title" />
-
     </PreferenceCategory>
 
     <PreferenceCategory app:title="@string/videos_header">