am 8b4be560: Delete premature optimization.

* commit '8b4be56030c3b8c93dfa45bccac7365f90f377ce':
  Delete premature optimization.
This commit is contained in:
Jeff Brown
2012-02-13 10:33:59 -08:00
committed by Android Git Automerger
2 changed files with 6 additions and 8 deletions

View File

@@ -2076,19 +2076,19 @@ void InputDispatcher::synthesizeCancelationEventsForConnectionLocked(
nsecs_t currentTime = now();
mTempCancelationEvents.clear();
Vector<EventEntry*> cancelationEvents;
connection->inputState.synthesizeCancelationEvents(currentTime,
mTempCancelationEvents, options);
cancelationEvents, options);
if (!mTempCancelationEvents.isEmpty()) {
if (!cancelationEvents.isEmpty()) {
#if DEBUG_OUTBOUND_EVENT_DETAILS
ALOGD("channel '%s' ~ Synthesized %d cancelation events to bring channel back in sync "
"with reality: %s, mode=%d.",
connection->getInputChannelName(), mTempCancelationEvents.size(),
connection->getInputChannelName(), cancelationEvents.size(),
options.reason, options.mode);
#endif
for (size_t i = 0; i < mTempCancelationEvents.size(); i++) {
EventEntry* cancelationEventEntry = mTempCancelationEvents.itemAt(i);
for (size_t i = 0; i < cancelationEvents.size(); i++) {
EventEntry* cancelationEventEntry = cancelationEvents.itemAt(i);
switch (cancelationEventEntry->type) {
case EventEntry::TYPE_KEY:
logOutboundKeyDetailsLocked("cancel - ",

View File

@@ -814,8 +814,6 @@ private:
Queue<EventEntry> mInboundQueue;
Queue<CommandEntry> mCommandQueue;
Vector<EventEntry*> mTempCancelationEvents;
void dispatchOnceInnerLocked(nsecs_t* nextWakeupTime);
// Enqueues an inbound event. Returns true if mLooper->wake() should be called.