diff options
author | Mathias Agopian <mathias@google.com> | 2011-07-11 16:26:36 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-07-11 16:26:36 -0700 |
commit | 198fd888add624cf9e53ce31b776568a5d069916 (patch) | |
tree | 400599b48d7125b7548cb4646759c1d04f949300 /services/input | |
parent | cf7e3a5984e1709004d3e1138780d60f97f46e75 (diff) | |
download | frameworks_base-198fd888add624cf9e53ce31b776568a5d069916.zip frameworks_base-198fd888add624cf9e53ce31b776568a5d069916.tar.gz frameworks_base-198fd888add624cf9e53ce31b776568a5d069916.tar.bz2 |
fix a weird use of Vector::appendVector()
operator= is way more efficient.
Change-Id: I61c9adb1413bed230801a77151b8f7000fd11471
Diffstat (limited to 'services/input')
-rw-r--r-- | services/input/InputDispatcher.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 10b9083..da9b55c 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -3154,11 +3154,9 @@ void InputDispatcher::setInputWindows(const Vector<InputWindow>& inputWindows) { mLastHoverWindow = NULL; } - mWindows.clear(); - // Loop over new windows and rebuild the necessary window pointers for // tracking focus and touch. - mWindows.appendVector(inputWindows); + mWindows = inputWindows; size_t numWindows = mWindows.size(); for (size_t i = 0; i < numWindows; i++) { @@ -4560,8 +4558,7 @@ void InputDispatcher::TouchState::copyFrom(const TouchState& other) { split = other.split; deviceId = other.deviceId; source = other.source; - windows.clear(); - windows.appendVector(other.windows); + windows = other.windows; } void InputDispatcher::TouchState::addOrUpdateWindow(const InputWindow* window, |