Skip to content

Commit c884b78

Browse files
author
Arpit Singh
committed
[22/n Dispatcher Refactor] resolving nits from previous review
This CL resolves following nits 1. Adds a reference to avoid copy from ag/31432553 2. Move a deceleration near to the use from ag/31432555 Bug: 245989146 Test: atest inputflinger_tests Flag: EXEMPT refactor Change-Id: I8dcf65251b8ac00fdcde3a97113825197272c326
1 parent 3595275 commit c884b78

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

services/inputflinger/dispatcher/InputDispatcher.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5806,7 +5806,7 @@ bool InputDispatcher::transferTouchGesture(const sp<IBinder>& fromToken, const s
58065806
return false;
58075807
}
58085808

5809-
const auto [toWindowHandle, deviceId, pointers, cancellations, pointerDowns] =
5809+
const auto& [toWindowHandle, deviceId, pointers, cancellations, pointerDowns] =
58105810
result.value();
58115811

58125812
for (const auto& cancellationArgs : cancellations) {
@@ -6252,14 +6252,14 @@ status_t InputDispatcher::pilferPointersLocked(const sp<IBinder>& token) {
62526252
return BAD_VALUE;
62536253
}
62546254

6255-
ScopedSyntheticEventTracer traceContext(mTracer);
6256-
CancelationOptions options(CancelationOptions::Mode::CANCEL_POINTER_EVENTS,
6257-
"input channel stole pointer stream", traceContext.getTracker());
62586255
const auto result = mTouchStates.pilferPointers(token, *requestingConnection);
62596256
if (!result.ok()) {
62606257
return result.error().code();
62616258
}
62626259

6260+
ScopedSyntheticEventTracer traceContext(mTracer);
6261+
CancelationOptions options(CancelationOptions::Mode::CANCEL_POINTER_EVENTS,
6262+
"input channel stole pointer stream", traceContext.getTracker());
62636263
const auto cancellations = *result;
62646264
for (const auto& cancellationArgs : cancellations) {
62656265
LOG_ALWAYS_FATAL_IF(cancellationArgs.mode !=

0 commit comments

Comments
 (0)