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

Commit 64212c54 authored by Jeremy Sim's avatar Jeremy Sim
Browse files

Fix crash condition by adding a null check in DigitalWellBeingToast

Fixes a crash condition where TaskView#getRecentsView() could return null when being called from DigitalWellBeingToast#setBanner(), resulting in a crash.

Fixes: 217671133

Test: Manual
Change-Id: I964384d97d26336e9a5e8e4c025f66ab78c63e0a
parent f1543cb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -306,7 +306,7 @@ public final class DigitalWellBeingToast {


    private void setBanner(@Nullable View view) {
    private void setBanner(@Nullable View view) {
        mBanner = view;
        mBanner = view;
        if (view != null) {
        if (view != null && mTaskView.getRecentsView() != null) {
            setupAndAddBanner();
            setupAndAddBanner();
            setBannerOutline();
            setBannerOutline();
        }
        }