mirror of
				https://github.com/SimpleMobileTools/Simple-Camera.git
				synced 2025-06-27 09:02:59 +02:00 
			
		
		
		
	removing 2 more settings
This commit is contained in:
		| @@ -120,10 +120,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener { | |||||||
|         mCurrVideoRecTimer = 0 |         mCurrVideoRecTimer = 0 | ||||||
|         mLastHandledOrientation = 0 |         mLastHandledOrientation = 0 | ||||||
|         mCameraImpl = MyCameraImpl(applicationContext) |         mCameraImpl = MyCameraImpl(applicationContext) | ||||||
|  |         config.lastUsedCamera = mCameraImpl.getBackCameraId().toString() | ||||||
|         if (config.alwaysOpenBackCamera) { |  | ||||||
|             config.lastUsedCamera = mCameraImpl.getBackCameraId().toString() |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { |     override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { | ||||||
| @@ -220,7 +217,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener { | |||||||
|         mFadeHandler = Handler() |         mFadeHandler = Handler() | ||||||
|         setupPreviewImage(true) |         setupPreviewImage(true) | ||||||
|  |  | ||||||
|         val initialFlashlightState = if (config.turnFlashOffAtStartup) FLASH_OFF else config.flashlightState |         val initialFlashlightState = FLASH_OFF | ||||||
|         mPreview!!.setFlashlightState(initialFlashlightState) |         mPreview!!.setFlashlightState(initialFlashlightState) | ||||||
|         updateFlashlightState(initialFlashlightState) |         updateFlashlightState(initialFlashlightState) | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -29,10 +29,8 @@ class SettingsActivity : SimpleActivity() { | |||||||
|         setupUseEnglish() |         setupUseEnglish() | ||||||
|         setupSound() |         setupSound() | ||||||
|         setupVolumeButtonsAsShutter() |         setupVolumeButtonsAsShutter() | ||||||
|         setupTurnFlashOffAtStartup() |  | ||||||
|         setupFlipPhotos() |         setupFlipPhotos() | ||||||
|         setupKeepSettingsVisible() |         setupKeepSettingsVisible() | ||||||
|         setupAlwaysOpenBackCamera() |  | ||||||
|         setupSavePhotoMetadata() |         setupSavePhotoMetadata() | ||||||
|         setupSavePhotosFolder() |         setupSavePhotosFolder() | ||||||
|         setupPhotoQuality() |         setupPhotoQuality() | ||||||
| @@ -44,7 +42,6 @@ class SettingsActivity : SimpleActivity() { | |||||||
|             settings_color_customization_label, |             settings_color_customization_label, | ||||||
|             settings_general_settings_label, |             settings_general_settings_label, | ||||||
|             settings_shutter_label, |             settings_shutter_label, | ||||||
|             settings_startup_label, |  | ||||||
|             settings_saving_label |             settings_saving_label | ||||||
|         ).forEach { |         ).forEach { | ||||||
|             it.setTextColor(properPrimaryColor) |             it.setTextColor(properPrimaryColor) | ||||||
| @@ -54,7 +51,6 @@ class SettingsActivity : SimpleActivity() { | |||||||
|             settings_color_customization_holder, |             settings_color_customization_holder, | ||||||
|             settings_general_settings_holder, |             settings_general_settings_holder, | ||||||
|             settings_shutter_holder, |             settings_shutter_holder, | ||||||
|             settings_startup_holder, |  | ||||||
|             settings_saving_holder |             settings_saving_holder | ||||||
|         ).forEach { |         ).forEach { | ||||||
|             it.background.applyColorFilter(getProperBackgroundColor().getContrastColor()) |             it.background.applyColorFilter(getProperBackgroundColor().getContrastColor()) | ||||||
| @@ -143,14 +139,6 @@ class SettingsActivity : SimpleActivity() { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun setupTurnFlashOffAtStartup() { |  | ||||||
|         settings_turn_flash_off_at_startup.isChecked = config.turnFlashOffAtStartup |  | ||||||
|         settings_turn_flash_off_at_startup_holder.setOnClickListener { |  | ||||||
|             settings_turn_flash_off_at_startup.toggle() |  | ||||||
|             config.turnFlashOffAtStartup = settings_turn_flash_off_at_startup.isChecked |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private fun setupFlipPhotos() { |     private fun setupFlipPhotos() { | ||||||
|         settings_flip_photos.isChecked = config.flipPhotos |         settings_flip_photos.isChecked = config.flipPhotos | ||||||
|         settings_flip_photos_holder.setOnClickListener { |         settings_flip_photos_holder.setOnClickListener { | ||||||
| @@ -167,14 +155,6 @@ class SettingsActivity : SimpleActivity() { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun setupAlwaysOpenBackCamera() { |  | ||||||
|         settings_always_open_back_camera.isChecked = config.alwaysOpenBackCamera |  | ||||||
|         settings_always_open_back_camera_holder.setOnClickListener { |  | ||||||
|             settings_always_open_back_camera.toggle() |  | ||||||
|             config.alwaysOpenBackCamera = settings_always_open_back_camera.isChecked |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private fun setupSavePhotoMetadata() { |     private fun setupSavePhotoMetadata() { | ||||||
|         settings_save_photo_metadata.isChecked = config.savePhotoMetadata |         settings_save_photo_metadata.isChecked = config.savePhotoMetadata | ||||||
|         settings_save_photo_metadata_holder.setOnClickListener { |         settings_save_photo_metadata_holder.setOnClickListener { | ||||||
|   | |||||||
| @@ -29,10 +29,6 @@ class Config(context: Context) : BaseConfig(context) { | |||||||
|         get() = prefs.getBoolean(VOLUME_BUTTONS_AS_SHUTTER, false) |         get() = prefs.getBoolean(VOLUME_BUTTONS_AS_SHUTTER, false) | ||||||
|         set(volumeButtonsAsShutter) = prefs.edit().putBoolean(VOLUME_BUTTONS_AS_SHUTTER, volumeButtonsAsShutter).apply() |         set(volumeButtonsAsShutter) = prefs.edit().putBoolean(VOLUME_BUTTONS_AS_SHUTTER, volumeButtonsAsShutter).apply() | ||||||
|  |  | ||||||
|     var turnFlashOffAtStartup: Boolean |  | ||||||
|         get() = prefs.getBoolean(TURN_FLASH_OFF_AT_STARTUP, false) |  | ||||||
|         set(turnFlashOffAtStartup) = prefs.edit().putBoolean(TURN_FLASH_OFF_AT_STARTUP, turnFlashOffAtStartup).apply() |  | ||||||
|  |  | ||||||
|     var flipPhotos: Boolean |     var flipPhotos: Boolean | ||||||
|         get() = prefs.getBoolean(FLIP_PHOTOS, true) |         get() = prefs.getBoolean(FLIP_PHOTOS, true) | ||||||
|         set(flipPhotos) = prefs.edit().putBoolean(FLIP_PHOTOS, flipPhotos).apply() |         set(flipPhotos) = prefs.edit().putBoolean(FLIP_PHOTOS, flipPhotos).apply() | ||||||
| @@ -69,10 +65,6 @@ class Config(context: Context) : BaseConfig(context) { | |||||||
|         get() = prefs.getBoolean(KEEP_SETTINGS_VISIBLE, false) |         get() = prefs.getBoolean(KEEP_SETTINGS_VISIBLE, false) | ||||||
|         set(keepSettingsVisible) = prefs.edit().putBoolean(KEEP_SETTINGS_VISIBLE, keepSettingsVisible).apply() |         set(keepSettingsVisible) = prefs.edit().putBoolean(KEEP_SETTINGS_VISIBLE, keepSettingsVisible).apply() | ||||||
|  |  | ||||||
|     var alwaysOpenBackCamera: Boolean |  | ||||||
|         get() = prefs.getBoolean(ALWAYS_OPEN_BACK_CAMERA, false) |  | ||||||
|         set(alwaysOpenBackCamera) = prefs.edit().putBoolean(ALWAYS_OPEN_BACK_CAMERA, alwaysOpenBackCamera).apply() |  | ||||||
|  |  | ||||||
|     var savePhotoMetadata: Boolean |     var savePhotoMetadata: Boolean | ||||||
|         get() = prefs.getBoolean(SAVE_PHOTO_METADATA, true) |         get() = prefs.getBoolean(SAVE_PHOTO_METADATA, true) | ||||||
|         set(savePhotoMetadata) = prefs.edit().putBoolean(SAVE_PHOTO_METADATA, savePhotoMetadata).apply() |         set(savePhotoMetadata) = prefs.edit().putBoolean(SAVE_PHOTO_METADATA, savePhotoMetadata).apply() | ||||||
|   | |||||||
| @@ -8,7 +8,6 @@ const val ORIENT_LANDSCAPE_RIGHT = 2 | |||||||
| const val SAVE_PHOTOS = "save_photos" | const val SAVE_PHOTOS = "save_photos" | ||||||
| const val SOUND = "sound" | const val SOUND = "sound" | ||||||
| const val VOLUME_BUTTONS_AS_SHUTTER = "volume_buttons_as_shutter" | const val VOLUME_BUTTONS_AS_SHUTTER = "volume_buttons_as_shutter" | ||||||
| const val TURN_FLASH_OFF_AT_STARTUP = "turn_flash_off_at_startup" |  | ||||||
| const val FLIP_PHOTOS = "flip_photos" | const val FLIP_PHOTOS = "flip_photos" | ||||||
| const val LAST_USED_CAMERA = "last_used_camera_2" | const val LAST_USED_CAMERA = "last_used_camera_2" | ||||||
| const val FLASHLIGHT_STATE = "flashlight_state" | const val FLASHLIGHT_STATE = "flashlight_state" | ||||||
| @@ -18,7 +17,6 @@ const val BACK_VIDEO_RESOLUTION_INDEX = "back_video_resolution_index_2" | |||||||
| const val FRONT_PHOTO_RESOLUTION_INDEX = "front_photo_resolution_index_2" | const val FRONT_PHOTO_RESOLUTION_INDEX = "front_photo_resolution_index_2" | ||||||
| const val FRONT_VIDEO_RESOLUTION_INDEX = "front_video_resolution_index_2" | const val FRONT_VIDEO_RESOLUTION_INDEX = "front_video_resolution_index_2" | ||||||
| const val KEEP_SETTINGS_VISIBLE = "keep_settings_visible" | const val KEEP_SETTINGS_VISIBLE = "keep_settings_visible" | ||||||
| const val ALWAYS_OPEN_BACK_CAMERA = "always_open_back_camera" |  | ||||||
| const val SAVE_PHOTO_METADATA = "save_photo_metadata" | const val SAVE_PHOTO_METADATA = "save_photo_metadata" | ||||||
| const val PHOTO_QUALITY = "photo_quality" | const val PHOTO_QUALITY = "photo_quality" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ import com.simplemobiletools.camera.dialogs.ChangeResolutionDialog | |||||||
| import com.simplemobiletools.camera.extensions.config | import com.simplemobiletools.camera.extensions.config | ||||||
| import com.simplemobiletools.camera.extensions.getOutputMediaFile | import com.simplemobiletools.camera.extensions.getOutputMediaFile | ||||||
| import com.simplemobiletools.camera.helpers.* | import com.simplemobiletools.camera.helpers.* | ||||||
| import com.simplemobiletools.camera.implementations.MyCameraImpl |  | ||||||
| import com.simplemobiletools.camera.interfaces.MyPreview | import com.simplemobiletools.camera.interfaces.MyPreview | ||||||
| import com.simplemobiletools.camera.models.FocusArea | import com.simplemobiletools.camera.models.FocusArea | ||||||
| import com.simplemobiletools.camera.models.MySize | import com.simplemobiletools.camera.models.MySize | ||||||
| @@ -113,8 +112,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview { | |||||||
|             null |             null | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         val isFrontCamera = cameraCharacteristics?.get(CameraCharacteristics.LENS_FACING).toString() == MyCameraImpl(activity).getFrontCameraId().toString() |         mUseFrontCamera = false | ||||||
|         mUseFrontCamera = !activity.config.alwaysOpenBackCamera && isFrontCamera |  | ||||||
|         mIsInVideoMode = !initPhotoMode |         mIsInVideoMode = !initPhotoMode | ||||||
|         loadSounds() |         loadSounds() | ||||||
|  |  | ||||||
|   | |||||||
| @@ -155,54 +155,6 @@ | |||||||
|             </RelativeLayout> |             </RelativeLayout> | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/settings_startup_label" |  | ||||||
|             style="@style/SettingsSectionLabelStyle" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:text="@string/startup" /> |  | ||||||
|  |  | ||||||
|         <LinearLayout |  | ||||||
|             android:id="@+id/settings_startup_holder" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/medium_margin" |  | ||||||
|             android:background="@drawable/section_holder_stroke" |  | ||||||
|             android:orientation="vertical"> |  | ||||||
|  |  | ||||||
|             <RelativeLayout |  | ||||||
|                 android:id="@+id/settings_turn_flash_off_at_startup_holder" |  | ||||||
|                 style="@style/SettingsHolderCheckboxStyle" |  | ||||||
|                 android:layout_width="match_parent" |  | ||||||
|                 android:layout_height="wrap_content" |  | ||||||
|                 android:background="@drawable/ripple_top_corners"> |  | ||||||
|  |  | ||||||
|                 <com.simplemobiletools.commons.views.MyAppCompatCheckbox |  | ||||||
|                     android:id="@+id/settings_turn_flash_off_at_startup" |  | ||||||
|                     style="@style/SettingsCheckboxStyle" |  | ||||||
|                     android:layout_width="match_parent" |  | ||||||
|                     android:layout_height="wrap_content" |  | ||||||
|                     android:text="@string/turn_flash_off_at_startup" /> |  | ||||||
|  |  | ||||||
|             </RelativeLayout> |  | ||||||
|  |  | ||||||
|             <RelativeLayout |  | ||||||
|                 android:id="@+id/settings_always_open_back_camera_holder" |  | ||||||
|                 style="@style/SettingsHolderCheckboxStyle" |  | ||||||
|                 android:layout_width="match_parent" |  | ||||||
|                 android:layout_height="wrap_content" |  | ||||||
|                 android:background="@drawable/ripple_bottom_corners"> |  | ||||||
|  |  | ||||||
|                 <com.simplemobiletools.commons.views.MyAppCompatCheckbox |  | ||||||
|                     android:id="@+id/settings_always_open_back_camera" |  | ||||||
|                     style="@style/SettingsCheckboxStyle" |  | ||||||
|                     android:layout_width="match_parent" |  | ||||||
|                     android:layout_height="wrap_content" |  | ||||||
|                     android:text="@string/always_open_back_camera" /> |  | ||||||
|  |  | ||||||
|             </RelativeLayout> |  | ||||||
|         </LinearLayout> |  | ||||||
|  |  | ||||||
|         <TextView |         <TextView | ||||||
|             android:id="@+id/settings_saving_label" |             android:id="@+id/settings_saving_label" | ||||||
|             style="@style/SettingsSectionLabelStyle" |             style="@style/SettingsSectionLabelStyle" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user