Make BlobProvider write to disk on a background thread.

Otherwise we hit some weird blocking issues with voice note recording.
This commit is contained in:
Greyson Parrelli
2019-03-19 15:34:04 -07:00
parent 5a8753de85
commit ce0058864f
7 changed files with 27 additions and 13 deletions

View File

@@ -121,7 +121,7 @@ public class GiphyActivity extends PassphraseRequiredActionBarActivity
return BlobProvider.getInstance()
.forData(data)
.withMimeType(MediaUtil.IMAGE_GIF)
.createForSingleSessionOnDisk(GiphyActivity.this);
.createForSingleSessionOnDisk(GiphyActivity.this, e -> Log.w(TAG, "Failed to write to disk.", e));
} catch (InterruptedException | ExecutionException | IOException e) {
Log.w(TAG, e);
return null;