mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
fix: Prevent externalAudioReader from hogging the main thread
This commit is contained in:
parent
1357c5c062
commit
620fba0a14
12 changed files with 242 additions and 90 deletions
|
|
@ -159,7 +159,7 @@ public class ExternalAudioWriter {
|
|||
if (matches) {
|
||||
ExternalDownloadMetadataStore.recordSize(metadataKey, localLength);
|
||||
recordDownload(child, existingFile.getUri());
|
||||
ExternalAudioReader.refreshCache();
|
||||
ExternalAudioReader.refreshCacheAsync();
|
||||
notifyExists(context, fileName);
|
||||
return;
|
||||
} else {
|
||||
|
|
@ -209,7 +209,7 @@ public class ExternalAudioWriter {
|
|||
ExternalDownloadMetadataStore.recordSize(metadataKey, total);
|
||||
recordDownload(child, targetUri);
|
||||
notifySuccess(context, fileName, child, targetUri);
|
||||
ExternalAudioReader.refreshCache();
|
||||
ExternalAudioReader.refreshCacheAsync();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (targetFile != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue