Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e82c866 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Null-check tooltip view to avoid race condition crash.

I think this happens if you tap the tooltip just as the dialog times out? Can't hurt to check.

Fixes: 191281724
Test: crashes at least as infrequently as before, probably less
Change-Id: I3c83e775a7fd278dc255242518412ba790625fdb
parent 82f0979e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1127,7 +1127,12 @@ public class VolumeDialogImpl implements VolumeDialog,
                    .alpha(0.f)
                    .setStartDelay(0)
                    .setDuration(mDialogHideAnimationDurationMs)
                    .withEndAction(() -> mODICaptionsTooltipView.setVisibility(INVISIBLE))
                    .withEndAction(() -> {
                        // It might have been nulled out by tryToRemoveCaptionsTooltip.
                        if (mODICaptionsTooltipView != null) {
                            mODICaptionsTooltipView.setVisibility(INVISIBLE);
                        }
                    })
                    .start();
        }
    }