History log of /frameworks/base/libs/utils/VectorImpl.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ab561139f9e9c9df8a450f2990ad6588fa690e38 14-Jul-2011 Jeff Brown <jeffbrown@google.com> Minor code cleanups in vector.

Fixed a potential bug where calling replaceAt with a reference to
an existing element in the vector at the same index would cause
the element to be destroyed while being copied to itself.

Refactored the conditions in _grow and _shrink for clarity.
The computations are exactly the same but I think it reads better
this way. In particular, the ssize_t variable 's' is gone: it didn't
need to be signed anyways because its value could never be negative.

Change-Id: If087841c15e6a87160eee874720c4a77eb0e99a6
/frameworks/base/libs/utils/VectorImpl.cpp
11bf79d6e3542e40ebd212b0f5d7cb3370f3068d 14-Jul-2011 Jeff Brown <jeffbrown@google.com> Replace Vector _grow/_shrink checks with assert.

On review of the code, _grow and _shrink are checking for conditions
that cannot happen and that don't even really make sense. For
example, if _shrink is called with where + amount > mCount then
this is really bad, however the check only considered the case
when where >= mCount and then it would arbitrarily choose a new
value for where. Huh?

As it happens, the callers are correctly validating the
arguments before passing them down to these methods so we can
get rid of this code.

Change-Id: I921852dba8997065bb0e9cac733e82028d14afcd
/frameworks/base/libs/utils/VectorImpl.cpp
cf7e3a5984e1709004d3e1138780d60f97f46e75 12-Jul-2011 Mathias Agopian <mathias@google.com> Fix typo in an assert's log

Change-Id: I94883a23a0a92eaf3e4976f942f747a2137499ac
/frameworks/base/libs/utils/VectorImpl.cpp
5c225b1680e696ae8bbf505a1997d6f720672f74 16-Jun-2010 Jeff Brown <jeffbrown@google.com> Even more native input dispatch work in progress.

Added more tests.
Fixed a regression in Vector.
Fixed bugs in pointer tracking.
Fixed a starvation issue in PollLoop when setting or removing callbacks.
Fixed a couple of policy nits.

Modified the internal representation of MotionEvent to be more
efficient and more consistent.

Added code to skip/cancel virtual key processing when there are multiple
pointers down. This helps to better disambiguate virtual key presses
from stray touches (such as cheek presses).

Change-Id: I2a7d2cce0195afb9125b23378baa94fd2fc6671c
/frameworks/base/libs/utils/VectorImpl.cpp
46b9ac0ae2162309774a7478cd9d4e578747bfc2 23-Apr-2010 Jeff Brown <jeffbrown@google.com> Native input dispatch rewrite work in progress.

The old dispatch mechanism has been left in place and continues to
be used by default for now. To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API. Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument. The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points. The ViewRoot then
provides the InputChannel to the InputQueue. Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue. This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event. Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets). Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
/frameworks/base/libs/utils/VectorImpl.cpp
966fcb81eece9096040ccc185bb662335d3964cf 31-Mar-2010 Dianne Hackborn <hackbod@google.com> Revert "fix [2542425] memory leak during video recording"

This reverts commit 544592e14f8d7643238e40ba9879727497900f35.
/frameworks/base/libs/utils/VectorImpl.cpp
544592e14f8d7643238e40ba9879727497900f35 31-Mar-2010 Mathias Agopian <mathias@google.com> fix [2542425] memory leak during video recording

[Sorted|Keyed]Vector<TYPE> would leak their whole storage when resized
from the end and TYPE had trivial dtor and copy operators.

Change-Id: I8555bb1aa0863df72de27d67ae50e20706e90cf5
/frameworks/base/libs/utils/VectorImpl.cpp
d74145285373193af8584ac86ee73c7aea3e1600 29-Mar-2010 Mathias Agopian <mathias@google.com> fix [2542425] memory leak during video recording

Vector::sort() is using _do_copy() incorrectly; _do_copy() calls the
copy constructor, not the assignment operator, so we need to destroy
the "destination" before copying the item.

Change-Id: Iaeeac808fa5341a7d219edeba4aa63d44f31473c
/frameworks/base/libs/utils/VectorImpl.cpp
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/libs/utils/VectorImpl.cpp
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/libs/utils/VectorImpl.cpp
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/libs/utils/VectorImpl.cpp