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

Commit f2cf401c authored by Michael Wright's avatar Michael Wright Committed by Android Git Automerger
Browse files

am d46ded88: Merge "Add tracing for pending queue size" into jb-mr2-dev

* commit 'd46ded88':
  Add tracing for pending queue size
parents b91fb8c6 d46ded88
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -245,8 +245,10 @@ public final class ViewRootImpl implements ViewParent,

    // Input event queue.
    QueuedInputEvent mFirstPendingInputEvent;
    int mPendingInputEventCount;
    QueuedInputEvent mCurrentInputEvent;
    boolean mProcessInputEventsScheduled;
    String mPendingInputEventQueueLengthCounterName = "pq";

    boolean mWindowAttributesChanged = false;
    int mWindowAttributesChangesFlag = 0;
@@ -642,6 +644,8 @@ public final class ViewRootImpl implements ViewParent,
                if (view.getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
                    view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
                }

                mPendingInputEventQueueLengthCounterName = "pq:" + attrs.getTitle();
            }
        }
    }
@@ -4427,6 +4431,9 @@ public final class ViewRootImpl implements ViewParent,
            }
            last.mNext = q;
        }
        mPendingInputEventCount += 1;
        Trace.traceCounter(Trace.TRACE_TAG_INPUT, mPendingInputEventQueueLengthCounterName,
                mPendingInputEventCount);

        if (processImmediately) {
            doProcessInputEvents();
@@ -4451,6 +4458,10 @@ public final class ViewRootImpl implements ViewParent,
            q.mNext = null;
            mCurrentInputEvent = q;

            mPendingInputEventCount -= 1;
            Trace.traceCounter(Trace.TRACE_TAG_INPUT, mPendingInputEventQueueLengthCounterName,
                    mPendingInputEventCount);

            final int result = deliverInputEvent(q);
            if (result != EVENT_IN_PROGRESS) {
                finishCurrentInputEvent(result == EVENT_HANDLED);