send the captured photo path as an extra at refresh_media intent

This commit is contained in:
tibbi 2018-04-23 23:04:41 +02:00
parent e8f048801c
commit 9538c47ba0
2 changed files with 3 additions and 5 deletions

View File

@ -45,7 +45,7 @@ ext {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:3.18.10' implementation 'com.simplemobiletools:commons:3.19.10'
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"

View File

@ -23,10 +23,7 @@ import com.simplemobiletools.camera.views.FocusRectView
import com.simplemobiletools.camera.views.Preview import com.simplemobiletools.camera.views.Preview
import com.simplemobiletools.camera.views.Preview.PreviewListener import com.simplemobiletools.camera.views.Preview.PreviewListener
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.BROADCAST_REFRESH_MEDIA import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.helpers.PERMISSION_CAMERA
import com.simplemobiletools.commons.helpers.PERMISSION_RECORD_AUDIO
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
import com.simplemobiletools.commons.models.Release import com.simplemobiletools.commons.models.Release
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
@ -569,6 +566,7 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
scanPath(path) { scanPath(path) {
setupPreviewImage(mIsInPhotoMode) setupPreviewImage(mIsInPhotoMode)
Intent(BROADCAST_REFRESH_MEDIA).apply { Intent(BROADCAST_REFRESH_MEDIA).apply {
putExtra(REFRESH_PATH, path)
`package` = "com.simplemobiletools.gallery" `package` = "com.simplemobiletools.gallery"
sendBroadcast(this) sendBroadcast(this)
} }