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

Commit 1d063a1b authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by Daniel Sandler
Browse files

Don't let toasting throw a runtime exception.

Not sure why is complaining about the Looper.
(The toast is debug code that will be removed for ship.)

Change-Id: I5e2ecbe40687cd626b235e248fe6d12fea14204a
Fixes: 37455183
Test: runtest systemui-notification
parent 2ed861d5
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);
            }
        }
    }