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

Commit 7b65a3eb authored by Steve Block's avatar Steve Block
Browse files

Improve a warning message in WebViewCore's EventHub

These warnings appear occasionally and this will help track them down.

Also removes an unused method.

Bug: 5421676
Change-Id: I5ba3f146449623e3457aafc91fd2e7edc367a9d9
parent ca35bc5a
Loading
Loading
Loading
Loading
+4 −13
Original line number Original line Diff line number Diff line
@@ -1662,24 +1662,15 @@ public final class WebViewCore {
                mDrawIsScheduled = false;
                mDrawIsScheduled = false;
            }
            }
            if (mMessages != null) {
            if (mMessages != null) {
                Log.w(LOGTAG, "Not supported in this case.");
                Throwable throwable = new Throwable(
                        "EventHub.removeMessages(int what = " + what + ") is not supported " +
                        "before the WebViewCore is set up.");
                Log.w(LOGTAG, Log.getStackTraceString(throwable));
            } else {
            } else {
                mHandler.removeMessages(what);
                mHandler.removeMessages(what);
            }
            }
        }
        }


        private synchronized boolean hasMessages(int what) {
            if (mBlockMessages) {
                return false;
            }
            if (mMessages != null) {
                Log.w(LOGTAG, "hasMessages() is not supported in this case.");
                return false;
            } else {
                return mHandler.hasMessages(what);
            }
        }

        private synchronized void sendMessageDelayed(Message msg, long delay) {
        private synchronized void sendMessageDelayed(Message msg, long delay) {
            if (mBlockMessages) {
            if (mBlockMessages) {
                return;
                return;