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

Commit e2d91934 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix crash when attempting to show toast on recently removed display." into main

parents 92cc6761 82503688
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -342,7 +342,10 @@ public class ToastPresenter {
            // to cancel the toast there is an inherent race and we may attempt to add a window
            // after the token has been invalidated. Let us hedge against that.
            Log.w(TAG, "Error while attempting to show toast from " + mPackageName, e);
            return;
        } catch (WindowManager.InvalidDisplayException e) {
            // Display the toast was scheduled on might have been meanwhile removed.
            Log.w(TAG, "Cannot show toast from " + mPackageName
                    + " on display it was scheduled on.", e);
        }
    }
}