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

This commit is contained in:
Alex Hart
2021-12-08 15:07:22 -05:00
committed by Cody Henthorne
parent 7dc3454b37
commit 34d4c910f7
@@ -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);
}