diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt index 9edb5ce3..adebc9d9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -120,10 +120,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener { mCurrVideoRecTimer = 0 mLastHandledOrientation = 0 mCameraImpl = MyCameraImpl(applicationContext) - - if (config.alwaysOpenBackCamera) { - config.lastUsedCamera = mCameraImpl.getBackCameraId().toString() - } + config.lastUsedCamera = mCameraImpl.getBackCameraId().toString() } override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { @@ -220,7 +217,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener { mFadeHandler = Handler() setupPreviewImage(true) - val initialFlashlightState = if (config.turnFlashOffAtStartup) FLASH_OFF else config.flashlightState + val initialFlashlightState = FLASH_OFF mPreview!!.setFlashlightState(initialFlashlightState) updateFlashlightState(initialFlashlightState) } diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt index e430b803..56f9c1da 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt @@ -29,10 +29,8 @@ class SettingsActivity : SimpleActivity() { setupUseEnglish() setupSound() setupVolumeButtonsAsShutter() - setupTurnFlashOffAtStartup() setupFlipPhotos() setupKeepSettingsVisible() - setupAlwaysOpenBackCamera() setupSavePhotoMetadata() setupSavePhotosFolder() setupPhotoQuality() @@ -44,7 +42,6 @@ class SettingsActivity : SimpleActivity() { settings_color_customization_label, settings_general_settings_label, settings_shutter_label, - settings_startup_label, settings_saving_label ).forEach { it.setTextColor(properPrimaryColor) @@ -54,7 +51,6 @@ class SettingsActivity : SimpleActivity() { settings_color_customization_holder, settings_general_settings_holder, settings_shutter_holder, - settings_startup_holder, settings_saving_holder ).forEach { 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() { settings_flip_photos.isChecked = config.flipPhotos 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() { settings_save_photo_metadata.isChecked = config.savePhotoMetadata settings_save_photo_metadata_holder.setOnClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt index a03b17e7..ca317988 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt @@ -29,10 +29,6 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(VOLUME_BUTTONS_AS_SHUTTER, false) 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 get() = prefs.getBoolean(FLIP_PHOTOS, true) 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) 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 get() = prefs.getBoolean(SAVE_PHOTO_METADATA, true) set(savePhotoMetadata) = prefs.edit().putBoolean(SAVE_PHOTO_METADATA, savePhotoMetadata).apply() diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt index de4b3138..b68dff71 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt @@ -8,7 +8,6 @@ const val ORIENT_LANDSCAPE_RIGHT = 2 const val SAVE_PHOTOS = "save_photos" const val SOUND = "sound" 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 LAST_USED_CAMERA = "last_used_camera_2" 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_VIDEO_RESOLUTION_INDEX = "front_video_resolution_index_2" 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 PHOTO_QUALITY = "photo_quality" diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt index 79d324e7..5ffea60d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt @@ -27,7 +27,6 @@ import com.simplemobiletools.camera.dialogs.ChangeResolutionDialog import com.simplemobiletools.camera.extensions.config import com.simplemobiletools.camera.extensions.getOutputMediaFile import com.simplemobiletools.camera.helpers.* -import com.simplemobiletools.camera.implementations.MyCameraImpl import com.simplemobiletools.camera.interfaces.MyPreview import com.simplemobiletools.camera.models.FocusArea import com.simplemobiletools.camera.models.MySize @@ -113,8 +112,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview { null } - val isFrontCamera = cameraCharacteristics?.get(CameraCharacteristics.LENS_FACING).toString() == MyCameraImpl(activity).getFrontCameraId().toString() - mUseFrontCamera = !activity.config.alwaysOpenBackCamera && isFrontCamera + mUseFrontCamera = false mIsInVideoMode = !initPhotoMode loadSounds() diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 2c55d549..f6ad4922 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -155,54 +155,6 @@ - - - - - - - - - - - - - - - - -