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

Commit af5e4da2 authored by Joe Onorato's avatar Joe Onorato
Browse files

Don't crash when there's a flood of tickers.

Tell if the queue is empty, not if there's currently something showing.

Change-Id: I6d8530d4c749a7566419741710d588005a698e1a
parent dff2e9a4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ public class TabletTicker extends Handler {
        mQueue[mQueuePos] = notification;

        // If nothing is running now, start the next one
        if (mCurrentNotification == null) {
        if (mQueuePos == 0) {
            sendEmptyMessage(MSG_ADVANCE);
        }

@@ -87,7 +87,7 @@ public class TabletTicker extends Handler {

    public void halt() {
        removeMessages(MSG_ADVANCE);
        if (mCurrentView != null) {
        if (mCurrentView != null || mQueuePos != 0) {
            final int N = mQueue.length;
            for (int i=0; i<N; i++) {
                mQueue[i] = null;