feat(android): Share to Shade — a video from the gallery is sealed on the phone and uploaded
ShadeUpload turns a shared content:// URI into meta and an upload job; KeystoreSecretFile keeps the owner seed under a Keystore key. The demo app takes SEND/SEND_MULTIPLE of video, images, audio and documents, uploads in a foreground service with progress, and its done notification plays the file or shares the link; the player gets a Share button. The live cross-check also uploads a content:// share under Robolectric. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ class UploadJobsTest {
|
||||
val result = jobs.sealedFile(key).also { it.parentFile.mkdirs() }.outputStream().use {
|
||||
MediaSealer.sealStream(ByteArray(200_000) { i -> i.toByte() }.inputStream(), it, meta)
|
||||
}
|
||||
return UploadJobs.Job(result, ByteArray(32) { 9 }, meta, "content://media/1")
|
||||
return UploadJobs.Job(result, ByteArray(32) { 9 }, meta, "content://media/1", server = "https://relay")
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -48,6 +48,7 @@ class UploadJobsTest {
|
||||
assertArrayEquals(job.result.mediaKey, back.result.mediaKey)
|
||||
assertArrayEquals(job.readToken, back.readToken)
|
||||
assertEquals("Kveld.mp4", back.meta.name)
|
||||
assertEquals("https://relay", back.server)
|
||||
assertEquals(listOf(key), jobs.unfinished().map { it.first })
|
||||
|
||||
// Cut short: not resumable.
|
||||
|
||||
Reference in New Issue
Block a user