Only notify voice note progress handler if activity is not null.

This commit is contained in:
Alex Hart
2021-12-07 11:42:34 -04:00
committed by Cody Henthorne
parent 7dc3454b37
commit 34d4c910f7

View File

@@ -245,7 +245,7 @@ public class VoiceNoteMediaController implements DefaultLifecycleObserver {
}
private void notifyProgressEventHandler() {
if (progressEventHandler == null) {
if (progressEventHandler == null && activity != null) {
progressEventHandler = new ProgressEventHandler(getMediaController(), voiceNotePlaybackState);
progressEventHandler.sendEmptyMessage(0);
}