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

Commit 4b0d2bf7 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by Android (Google) Code Review
Browse files

Merge "Don't let toasting throw a runtime exception." into oc-dev

parents 190fe086 1d063a1b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3229,8 +3229,12 @@ public class NotificationManagerService extends SystemService {

    private void doDebugOnlyToast(CharSequence toastText) {
        if (Build.IS_DEBUGGABLE) {
            try {
                Toast toast = Toast.makeText(getContext(), toastText, Toast.LENGTH_LONG);
                toast.show();
            } catch (RuntimeException e) {
                Slog.w(TAG, "Unable to toast with text: " + toastText, e);
            }
        }
    }