diff --git a/app/build.gradle b/app/build.gradle
index 737e3ec..ac63f59 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -15,7 +15,7 @@ android {
minSdkVersion 21
targetSdkVersion 29
versionCode 1
- versionName "1.1.5"
+ versionName "1.1.6"
ndk {
abiFilters 'x86_64', 'armeabi-v7a', 'arm64-v8a'
diff --git a/app/src/main/java/sushi/hardcore/droidfs/CameraActivity.kt b/app/src/main/java/sushi/hardcore/droidfs/CameraActivity.kt
index cbfa865..179d435 100644
--- a/app/src/main/java/sushi/hardcore/droidfs/CameraActivity.kt
+++ b/app/src/main/java/sushi/hardcore/droidfs/CameraActivity.kt
@@ -15,7 +15,6 @@ import com.otaliastudios.cameraview.controls.Facing
import com.otaliastudios.cameraview.controls.Flash
import com.otaliastudios.cameraview.controls.Grid
import com.otaliastudios.cameraview.controls.Hdr
-import com.otaliastudios.cameraview.filter.Filters
import kotlinx.android.synthetic.main.activity_camera.*
import sushi.hardcore.droidfs.provider.RestrictedFileProvider
import sushi.hardcore.droidfs.util.GocryptfsVolume
@@ -31,14 +30,12 @@ class CameraActivity : BaseActivity() {
private val flashModes = listOf(Flash.AUTO, Flash.ON, Flash.OFF)
private val gridTitles = listOf(R.string.grid_none, R.string.grid_3x3, R.string.grid_4x4)
private val gridValues = listOf(Grid.OFF, Grid.DRAW_3X3, Grid.DRAW_4X4)
- private val filterNames = Filters.values().map { it.toString().toLowerCase(Locale.ROOT).replace("_", " ").capitalize() as CharSequence }.toTypedArray()
private const val fileNameRandomMin = 100000
private const val fileNameRandomMax = 999999
private val dateFormat = SimpleDateFormat("yyyyMMdd_HHmmss")
private val random = Random()
}
private var currentFlashModeIndex = 0
- private var currentFilterIndex = 0
private var timerDuration = 0
set(value) {
field = value
@@ -77,14 +74,6 @@ class CameraActivity : BaseActivity() {
take_photo_button.onClick = ::onClickTakePhoto
}
- private fun takePhoto() {
- if (currentFilterIndex != 0){
- camera.takePictureSnapshot()
- } else {
- camera.takePicture()
- }
- }
-
private fun onClickTakePhoto() {
val baseName = "IMG_"+dateFormat.format(Date())+"_"
do {
@@ -98,12 +87,12 @@ class CameraActivity : BaseActivity() {
Thread.sleep(1000)
}
runOnUiThread {
- takePhoto()
+ camera.takePicture()
text_timer.visibility = View.GONE
}
}.start()
} else {
- takePhoto()
+ camera.takePicture()
}
}
@@ -181,32 +170,9 @@ class CameraActivity : BaseActivity() {
.show()
}
- private fun openFilterDialog(){
- ColoredAlertDialogBuilder(this)
- .setTitle(getString(R.string.choose_filter))
- .setSingleChoiceItems(filterNames, currentFilterIndex){ dialog, which ->
- camera.filter = Filters.values()[which].newInstance()
- currentFilterIndex = which
- dialog.dismiss()
- }
- .setNegativeButton(R.string.cancel, null)
- .show()
- }
-
- fun onClickFilter(view: View) {
- if (sharedPrefs.getBoolean("filtersFirstOpening", true)){
- ColoredAlertDialogBuilder(this)
- .setTitle(R.string.warning)
- .setMessage(R.string.filters_warning)
- .setPositiveButton(R.string.ok){ _, _ ->
- sharedPrefs.edit().putBoolean("filtersFirstOpening", false).apply()
- openFilterDialog()
- }
- .setNegativeButton(R.string.cancel, null)
- .show()
- } else {
- openFilterDialog()
- }
+ fun onClickClose(view: View) {
+ isFinishingIntentionally = true
+ finish()
}
override fun onDestroy() {
diff --git a/app/src/main/res/drawable/icon_photo_filter.xml b/app/src/main/res/drawable/icon_photo_filter.xml
deleted file mode 100644
index 81dc7e1..0000000
--- a/app/src/main/res/drawable/icon_photo_filter.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
diff --git a/app/src/main/res/layout/activity_camera.xml b/app/src/main/res/layout/activity_camera.xml
index 602e8c4..a85b699 100644
--- a/app/src/main/res/layout/activity_camera.xml
+++ b/app/src/main/res/layout/activity_camera.xml
@@ -51,16 +51,16 @@
android:onClick="onClickGrid"
android:src="@drawable/icon_grid_off"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/image_filter"
+ app:layout_constraintEnd_toStartOf="@+id/image_close"
app:layout_constraintStart_toEndOf="@+id/image_timer"
app:layout_constraintTop_toTopOf="parent" />
3x3
4x4
Choose grid
- Choose filter
- Filters can only be applied to reduced quality images. If you want to take high definition photos, do not apply any filters.
Please enter a numeric value
Failed to retrieve the selected path.
DroidFS doesn\'t have write access to this path. Please try another location.