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

Commit 4c8a0d0a authored by Clark Scheff's avatar Clark Scheff Committed by Abhisek Devkota
Browse files

Themes: Avoid NPE when setting text in TickerView

It is possible, with the right timing, to receive an NPE in TextSwitcher
when a notification comes in during recreation of the status bar because
of a theme change.

Change-Id: Ia35ad0346f232df905ecff69158b71f3bf61a163
parent 43d14a4f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -77,9 +77,11 @@ public class TextSwitcher extends ViewSwitcher {
     */
    public void setText(CharSequence text) {
        final TextView t = (TextView) getNextView();
        if (t != null) {
            t.setText(text);
            showNext();
        }
    }

    /**
     * Sets the text of the text view that is currently showing.  This does