mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-04-04 02:31:09 +02:00
fix saving for devices without SD card
This commit is contained in:
parent
a4afbfa98e
commit
823bca9c70
@ -7,7 +7,7 @@ import android.support.v4.provider.DocumentFile
|
|||||||
import com.simplemobiletools.camera.Config
|
import com.simplemobiletools.camera.Config
|
||||||
import com.simplemobiletools.filepicker.extensions.getSDCardPath
|
import com.simplemobiletools.filepicker.extensions.getSDCardPath
|
||||||
|
|
||||||
fun Context.needsStupidWritePermissions(path: String) = isPathOnSD(path) && isKitkat()
|
fun Context.needsStupidWritePermissions(path: String) = isPathOnSD(path) && isKitkat() && !getSDCardPath().isEmpty()
|
||||||
|
|
||||||
fun Context.isPathOnSD(path: String) = path.startsWith(getSDCardPath())
|
fun Context.isPathOnSD(path: String) = path.startsWith(getSDCardPath())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user