mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
update commons to 3.13.9
This commit is contained in:
@ -45,7 +45,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:3.8.2'
|
implementation 'com.simplemobiletools:commons:3.13.9'
|
||||||
|
|
||||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
||||||
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
||||||
|
@ -245,7 +245,8 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
|
|||||||
|
|
||||||
private fun showLastMediaPreview() {
|
private fun showLastMediaPreview() {
|
||||||
if (mPreviewUri != null) {
|
if (mPreviewUri != null) {
|
||||||
openFile(mPreviewUri!!, false, BuildConfig.APPLICATION_ID)
|
val path = applicationContext.getRealPathFromURI(mPreviewUri!!) ?: mPreviewUri!!.toString()
|
||||||
|
openPathIntent(path, false, BuildConfig.APPLICATION_ID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
||||||
settings_save_photos_holder.setOnClickListener {
|
settings_save_photos_holder.setOnClickListener {
|
||||||
FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) {
|
FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) {
|
||||||
handleSAFDialog(File(it)) {
|
handleSAFDialog(it) {
|
||||||
config.savePhotosFolder = it
|
config.savePhotosFolder = it
|
||||||
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,8 @@ class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId
|
|||||||
activity.config.savePhotosFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString()
|
activity.config.savePhotosFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString()
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
var document = activity.getFileDocument(path)
|
|
||||||
|
var document = activity.getDocumentFile(path)
|
||||||
document = document?.createFile("", path.substring(path.lastIndexOf('/') + 1))
|
document = document?.createFile("", path.substring(path.lastIndexOf('/') + 1))
|
||||||
fos = activity.contentResolver.openOutputStream(document?.uri)
|
fos = activity.contentResolver.openOutputStream(document?.uri)
|
||||||
} else {
|
} else {
|
||||||
|
@ -680,7 +680,7 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var document = mActivity!!.getFileDocument(mCurrVideoPath)
|
var document = mActivity!!.getDocumentFile(mCurrVideoPath)
|
||||||
if (document == null) {
|
if (document == null) {
|
||||||
mActivity!!.toast(R.string.unknown_error_occurred)
|
mActivity!!.toast(R.string.unknown_error_occurred)
|
||||||
return false
|
return false
|
||||||
|
Reference in New Issue
Block a user