mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Write voice recording data in 1s intervals to drafts.
This commit is contained in:
committed by
Cody Henthorne
parent
7978cc668d
commit
0afa75564f
@@ -551,6 +551,19 @@ public class BlobProvider {
|
||||
{
|
||||
return writeBlobSpecToDiskAsync(context, buildBlobSpec(StorageType.ATTACHMENT_DRAFT));
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the URI for a draft attachment without waiting for the data to be written.
|
||||
* This is useful for getting a URI reference while data is still being written asynchronously.
|
||||
* The URI can be used to check file size and save periodic snapshots.
|
||||
* <p>
|
||||
* It is the caller's responsibility to eventually call {@link BlobProvider#delete(Context, Uri)}
|
||||
* when the blob is no longer in use.
|
||||
*/
|
||||
@WorkerThread
|
||||
public Uri buildUriForDraftAttachment() {
|
||||
return buildUri(buildBlobSpec(StorageType.ATTACHMENT_DRAFT));
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void waitUntilInitialized() {
|
||||
|
||||
Reference in New Issue
Block a user