removing 2 more settings
This commit is contained in:
parent
16bed1a1b0
commit
0cdf08b45f
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -155,54 +155,6 @@
|
|||
</RelativeLayout>
|
||||
</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
|
||||
android:id="@+id/settings_saving_label"
|
||||
style="@style/SettingsSectionLabelStyle"
|
||||
|
|
Loading…
Reference in New Issue