Switch full load to AUID
parent
f5daa0e557
commit
12d5f137da
|
@ -219,7 +219,7 @@ import java.net.URLDecoder
|
|||
} else if (path.matches(API.IMAGE_PREVIEW)) {
|
||||
makeResponse(image.getPreview(parts[3].toLong()), "image/jpeg")
|
||||
} else if (path.matches(API.IMAGE_FULL)) {
|
||||
makeResponse(image.getFull(parts[3].toLong()), "image/jpeg")
|
||||
makeResponse(image.getFull(query, parts[3].toLong()), "image/jpeg")
|
||||
} else if (path.matches(API.SHARE_URL)) {
|
||||
makeResponse(dlService!!.shareUrl(URLDecoder.decode(parts[4], "UTF-8")))
|
||||
} else if (path.matches(API.SHARE_BLOB)) {
|
||||
|
|
|
@ -37,8 +37,13 @@ class ImageService(private val mCtx: Context) {
|
|||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun getFull(id: Long): ByteArray {
|
||||
val uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id)
|
||||
fun getFull(query: TimelineQuery, auid: Long): ByteArray {
|
||||
val sysImgs = query.getSystemImagesByAUIDs(listOf(auid))
|
||||
if (sysImgs.isEmpty()) {
|
||||
throw Exception("Image not found")
|
||||
}
|
||||
|
||||
val uri = sysImgs[0].uri
|
||||
|
||||
val bitmap =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
|
|
Loading…
Reference in New Issue