Make tempTouchState a local variable
Currently, mTempTouchState is a class variable, and it is confusing when
it is being modified in functions such as findTouchedWindowAt.
This variable is only used inside findTouchedWindowTargets, so convert
it to a local variable. This will make it easier to keep track of its
contents.
Bug: none
Test: none
Change-Id: I8b4f45eadf0ba05e5979de39f78ba81fe79bce31
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index 732e054..4707bee 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -190,6 +190,7 @@
EventEntry* mNextUnblockedEvent GUARDED_BY(mLock);
sp<InputWindowHandle> findTouchedWindowAtLocked(int32_t displayId, int32_t x, int32_t y,
+ TouchState* touchState,
bool addOutsideTargets = false,
bool addPortalWindows = false) REQUIRES(mLock);
@@ -302,7 +303,6 @@
GUARDED_BY(mLock);
std::unordered_map<int32_t, TouchState> mTouchStatesByDisplay GUARDED_BY(mLock);
- TouchState mTempTouchState GUARDED_BY(mLock);
// Focused applications.
std::unordered_map<int32_t, sp<InputApplicationHandle>> mFocusedApplicationHandlesByDisplay