f
This commit is contained in:
parent
ac1426437e
commit
aea2f93651
3 changed files with 5 additions and 3 deletions
|
@ -65,6 +65,8 @@ private fun fromOKHttp(uri: Uri): InputStreamWithSource? {
|
|||
return null
|
||||
}
|
||||
|
||||
private fun fromContent(ctx: Context, uri: Uri) = InputStreamWithSource(uri.toString(), ctx.contentResolver.openInputStream(uri))
|
||||
private fun fromContent(ctx: Context, uri: Uri) = ctx.contentResolver.openInputStream(uri)?.let {
|
||||
InputStreamWithSource(uri.toString(), it)
|
||||
}
|
||||
|
||||
private fun getDefaultInputStreamForUri(uri: Uri) = InputStreamWithSource(uri.toString(), BufferedInputStream(URL(uri.toString()).openStream(), 4096))
|
||||
|
|
|
@ -33,7 +33,7 @@ class PastLocationsStore constructor(private val sharedPreferences: SharedPrefer
|
|||
|
||||
// feature not available for these versions
|
||||
val locations: Set<String>
|
||||
get() = sharedPreferences.getStringSet(KEY_PAST_LOCATIONS, emptySet<String>())
|
||||
get() = sharedPreferences.getStringSet(KEY_PAST_LOCATIONS, emptySet<String>())?: emptySet()
|
||||
|
||||
companion object {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class ImageEditHelper(private val context: Activity, private val passStore: Pass
|
|||
}
|
||||
|
||||
private fun extractImage(imageReturnedIntent: Intent, name: String) {
|
||||
val extractedFile = imageReturnedIntent.data.loadImage(context)
|
||||
val extractedFile = imageReturnedIntent.data?.loadImage(context)
|
||||
val pass = passStore.currentPass
|
||||
if (extractedFile != null && pass != null && extractedFile.exists()) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue