• Home
  • History
  • Annotate
  • only in /frameworks/native/include/
History log of /frameworks/native/include/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
04075569b565c949a6db8b4e8a9f10d281de4d9c 25-Oct-2012 Dave Burke <daveburke@google.com> Revert "Revert "put back the unused virtuals in Vector<>""

This reverts commit 225c66a48cdc3acef21ee380dc134449749d3cb3

Change-Id: If31a04b81052cbc7dd7bf237c07107c33066d03d
tils/VectorImpl.h
dd3cb84cfbe8068790c6233b5829fae9c4a0ee93 20-Oct-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add support for secure displays

This change adds support for displays that are not allowed to display surfaces
with the eSecure flag set. All non-virtual displays are considered secure,
while virtual displays have their secure-ness specified at creation time.

Bug: 7368436
Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
ui/ISurfaceComposer.h
ui/SurfaceComposerClient.h
i/DisplayInfo.h
16928bfeca8858a0acae6942fc68c14a040b92ff 19-Oct-2012 Romain Guy <romainguy@google.com> Add runtime debugging capabilities to OpenGL

The shell property debug.egl.trace can now be set to:

0
disables tracing
1
logs all GL calls
error
checks glGetError after every GL call, logs a stack trace on error
systrace
logs each GL call to systrace

Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996
tils/Trace.h
2d5e230292c27d59f4c096bc742a0a19abf811c1 16-Oct-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add animation transactions

This change adds a transaction flag for WindowManager to indicate that a
transaction is being used to animate windows around the screen. SurfaceFlinger
will not allow more than one of these transactions to be outstanding at a time
to prevent the animation "frames" from being dropped.

Bug: 7353840
Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
ui/ISurfaceComposer.h
ui/SurfaceComposerClient.h
45778999c705683ec0fcca3e90c7e9969e081d93 10-Oct-2012 Mathias Agopian <mathias@google.com> Merge "Fence didn't manager sync_wait error codes properly" into jb-mr1-dev
b5c9dcdf3bdab1862047060b8e18c9d1831db8bb 09-Oct-2012 Mathias Agopian <mathias@google.com> Fence didn't manager sync_wait error codes properly

error codes are returned in errno, this caused ::waitForwever()
to only wait for 1 second and return improper error code (-1).

needed to help debugging 7316632

Bug: 7316632
Change-Id: Ie144f614a88393393972a3a770c6b4b0581f961a
i/Fence.h
2a09bb321930e1f782599ec902bca1db58b9af77 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Add blankDisplay/unblankDisplay to SurfaceComposerClient.

Bug: 7309812
Change-Id: Ia401d642094a46c62f0d26c65da1d11341e203a1
ui/SurfaceComposerClient.h
9504eb915c9628e130f45019bdefda0168089886 05-Oct-2012 Jesse Hall <jessehall@google.com> Fix race condition in ConsumerBase::addReleaseFence()

This needs the ConsumerBase mutex locked, but wasn't locking it. Two
of the four places that called it already held the lock so were fine.
Now addReleaseFence() takes the lock itself, and I added
addReleaseFenceLocked() for the two already-locked callers, since in
one of them dropping the lock would be inconvenient.

Bug: 7289269
Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a
ui/ConsumerBase.h
ba607d53c6a94ea8c4c12571980c4ad159af308b 01-Oct-2012 Jesse Hall <jessehall@google.com> Add Fence::waitForever which logs a warning timeout, and use it

Bug: 7217641
Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
i/Fence.h
c01a79d77b829e7de86ef137694e8ad708470ca1 28-Sep-2012 Andy McFadden <fadden@android.com> Pass display arg to blank/unblank

This allows us to blank and unblank displays other than the built-in
display (e.g. HDMI).

Bug: 7240511
Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
ui/ISurfaceComposer.h
7682a9c35a5e9acae738974ea3a73a4ca7796323 28-Sep-2012 Andreas Huber <andih@google.com> Add a way to configure an OMX encoder to emit SPS/PPS before IDR frames.

Change-Id: I71ce254533c8e99bc54d199d8a9828397fe3d99d
related-to-bug: 7245308
edia/hardware/HardwareAPI.h
38b657265ccc5ae45bd7860a68b0d9373b47a2f3 28-Sep-2012 Iliyan Malchev <malchev@google.com> Revert "Compatibility work around for bad graphics driver dependency."

This reverts commit a50b51c03aca449920fc8581a738032a7bce7150

Change-Id: Ibdcd776a7f241dbb2475403ea04f939249774c41
ui/SurfaceComposerClient.h
7b1905113712281c777b230648d3fbb69ae4f42c 26-Sep-2012 Mathias Agopian <mathias@google.com> fix a crasher when running out of memory

MemoryHeapBase::getBase() returns MAP_FAILED in case or
OOM, not null which is what SF was checking against.

This addresses one of the issues of bug 7230543.

Bug: 7230543
Change-Id: I763a88f64a2f9ff75eb139cfbaf9a1a9746c5577
inder/MemoryHeapBase.h
4803b74e2a12a508f7bbfde6f6a962fe3299c61c 25-Sep-2012 Andy McFadden <fadden@android.com> Show build config in dumpsys SurfaceFlinger

This adds a line to the "dumpsys SurfaceFlinger" output that shows
build-time configuration values.

Example:
Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \
[libgui USE_FENCE_SYNC]

Bug 7206633

Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0
ui/GuiConfig.h
i/UiConfig.h
e96e9e1093b5700e9f403a6e2479da7dc36d3b71 25-Sep-2012 Mathias Agopian <mathias@google.com> fix a crasher in SurfaceTexture's setFilteringEnabled

bug: 7211067
Change-Id: Id8658a8df429d76c20ab9112858b38e52343dc9c
ui/SurfaceTexture.h
ff28e201ec0c6d620eaaa29814ab52958487dc31 21-Sep-2012 Mathias Agopian <mathias@google.com> Display events now always carry the display id they happened on

Change-Id: I12de1d883c23927722bc3a71b782f0079de4e831
ui/DisplayEventReceiver.h
148994e5f33ce240ff24ceb5bc0500b7f2001959 20-Sep-2012 Mathias Agopian <mathias@google.com> We now report hotplug events to the framework

Change-Id: I2d6b7787d39e5929485a551e4982498c5053c211
ui/DisplayEventReceiver.h
dbaaa38882b8f13c1ff3a0ea352584cdbbbcba72 19-Sep-2012 Deva Ramasubramanian <dramasub@codeaurora.org> frameworks/native: Amend HDCP API

- Allow caller to set the observer and cookie.
- Add more notifications that the HDCPModule can send to its Observer.

Change-Id: I8bf9cc02a029cd38bbd25d9f0a634452173f4d26
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
edia/hardware/HDCPAPI.h
3941cb240d438bfdebe24920bb2ada86456a0bf9 18-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: default to doing GL sync

This change makes updateTexImage default to performing the necessary
synchronization and adds an argument for SurfaceFlinger to disable that
synchronization so that it can be performed lazily.

Change-Id: I7c20923cc786634126fbf7021c9d2541aa77be5d
Bug: 6991805
ui/SurfaceTexture.h
8dfa92fef9759a881e96ee58d59875d35023aab9 18-Sep-2012 Andy McFadden <fadden@android.com> Plumb display name into SurfaceFlinger

The Surface createDisplay() call takes a display name for debugging.
This change carries it through SurfaceFlinger and displays it in
the "dumpsys SurfaceFlinger" output.

Bug 7058158

Change-Id: I79f3474a8656ff1beb7b478e0dbf2c5de666118a
ui/ISurfaceComposer.h
ui/SurfaceComposerClient.h
6905205c8d130b6ea3a813c1b9283492ed183367 15-Sep-2012 Andy McFadden <fadden@android.com> Fix transform hints

The hints were being set a little too late, so the pre-rotation stuff
wasn't quite working.

Bug 7054997

Change-Id: Id8d5c626db7a76f768ba762a145b315878ee08e6
ui/BufferQueue.h
068d47f29dfead847999a7b33b4217ee9514152b 12-Sep-2012 Mathias Agopian <mathias@google.com> strengthen region validation

Change-Id: I75ee7bc4dd7a2f5357ac8994a23bc8b8bfb6eb44
rivate/ui/RegionHelper.h
i/Region.h
c272430960047de4e9b2f169fb053bd0aedce3b1 12-Sep-2012 Andy McFadden <fadden@android.com> Merge "Watch for SurfaceFlinger death" into jb-mr1-dev
61e04b92bdeafc6fca89052d14dab1bd0c384a71 10-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: use eglWaitSync

This change adds a compile-option to use eglWaitSyncANDROID to ensure that
texturing operations that access the current buffer of a SurfaceTexture do not
occur until the buffer is completely written. It also moves this
synchronization into a new SurfaceTexture method called doGLFenceWait and
changes SurfaceFlinger's Layer class to use that method rather than performing
its own wait on the fence.

Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
ui/SurfaceTexture.h
6652b3edcb7ef5402c05db12f477ceb23c27d6ec 07-Sep-2012 Andy McFadden <fadden@android.com> Watch for SurfaceFlinger death

The ComposerService object wasn't watching for SurfaceFlinger
restarts, which doesn't usually matter because the app framework
restarts when SurfaceFlinger dies. However, mediaserver continues
to run, which means its ComposerService object was trying to use
a dead handle, and playback of DRM movies was failing.

This adds a DeathRecipient listener and some logic to re-establish
the SurfaceFlinger connection.

Bug 6645813

Change-Id: I07581b881d3835601aa57d5358c8259d93bc4515
rivate/gui/ComposerService.h
b27254154642575dfb4bbfa79fbedde7d7ee23dd 06-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: move fence handling into ConsumerBase

This change moves some common fence handling code into the base class for
BufferQueue consumer classes. It also makes the ConsumerBase class initialize
a buffer slot's fence with the acquire fence every time a buffer is acquired.

Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
ui/ConsumerBase.h
ui/SurfaceTexture.h
00e8c7a88a5b9c4104a71013a713acd3e4d3b77b 05-Sep-2012 Mathias Agopian <mathias@google.com> display projection API now has a single function instead of 3

Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
ui/SurfaceComposerClient.h
rivate/gui/LayerState.h
493db47929cdd805339e453062fef265d8985692 04-Sep-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: add a setMaxAcquiredBufferCount check" into jb-mr1-dev
e84ec393bb48e4817eaa280ee51c099af041b14c 04-Sep-2012 Jamie Gennis <jgennis@google.com> Merge "libgui: add BufferQueue test infrastructure" into jb-mr1-dev
13e12578385fdbfa78b19dfa052ffaed4a68234b 04-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add support for "-rtl" in resources" into jb-mr1-dev
c68f2ecfa02037144d1a3856f637a77f523cf416 31-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: add a setMaxAcquiredBufferCount check

This change adds a check to verify the validity of the value passed to
setMaxAcquiredBufferCount.

Change-Id: I39730557aa58261e678bd6e4fce11bab78e98362
ui/BufferQueue.h
50f262fe569b52bb4d44c96de0d296188ce3885e 01-Sep-2012 Mathias Agopian <mathias@google.com> minor SharedBuffer clean-up

Change-Id: If38b7ce85806ae628c00f2c938de4e3f75142543
tils/SharedBuffer.h
2401ead70099c982796ecc3ec63ec8a5570948fc 01-Sep-2012 Mathias Agopian <mathias@google.com> Add a way to retrieve a Region as a SharedBuffer

Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
i/Region.h
tils/SharedBuffer.h
3ab68558fa5a4b8f792a54965a010f03385bd271 31-Aug-2012 Mathias Agopian <mathias@google.com> change how we store Region data internally

We used to keep the bounds of the region as a
separate rectangle. Instead we now store it as the last
element of the Vector<> of Rects.

This has the benefit of being slightly more efficient when
copying regions and reduces the overhead of small regions,
but more importantly will allow us to export the underlaying
SharedBuffer (eventually).

Change-Id: I80790e4fb1a09a747a5616000cfef852ac4ce9e9
i/Region.h
2098517e3e12a401005d7a7510d6c4943707b98d 31-Aug-2012 Mathias Agopian <mathias@google.com> make sure Parcel handles 0-sized LightFlatenables

Change-Id: Ib30a1c0228f8a938abaa0c7c8a6ba32ffd971121
inder/Parcel.h
9e75ddda93888755d0b14144b62e896cd9f78f3a 01-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: add BufferQueue test infrastructure

This change adds some infrastructure for testing the BufferQueue class. It
also includes a test that tests the new check in BufferQueue::acquireBuffer
that prevents the consumer from acquiring more than one buffer beyond the max
acquired buffer count that was set.

Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
ui/ISurfaceTexture.h
8210185fe337ca9d5b01f2bff8590ea60984c31e 31-Aug-2012 Dianne Hackborn <hackbod@google.com> No longer need "original calling uid".

Change-Id: Ifc4a89dd088609a5a8553f6ac6553174e09e8222
inder/IPCThreadState.h
72f096fb1ad0a0deadbfac5f88627461905d38e8 28-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: use max acquired buffer count

This change makes BufferQueue derive the min undequeued buffer count from a max
acquired buffer count that is set by the consumer. This value may be set at
any time that a producer is not connected to the BufferQueue rather than at
BufferQueue construction time.

Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
ui/BufferQueue.h
1847f7fd799f92300b3786e49f5883eaa03f4507 31-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: simplify max buffer count handling" into jb-mr1-dev
2b9776982360a234803665cb79e8abcfeb0e3c79 31-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: clean up buffer counting" into jb-mr1-dev
f196b56d70df6af753cb08bbb68e52498f0f37f1 31-Aug-2012 Wink Saville <wink@google.com> Merge "Revert "A vendor ril depends on a native screen shot code."" into jb-mr1-dev
94f261556cc5f4aa628cd5b71bf923b583f6e3c3 30-Aug-2012 Wink Saville <wink@google.com> Revert "A vendor ril depends on a native screen shot code."

This reverts commit 9b5782baf0a8a2d7afc7129453beb5df7abe7650.

A new ril for toro, hack no longer needed.
ui/SurfaceComposerClient.h
e191e6c34829aec406a9cfe3e95211f884a311ff 25-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: simplify max buffer count handling

This change reworks how the maximum buffer count is computed.

Change-Id: I7d3745814b9bd6f6f447f86bfea8eb7729914ebf
ui/BufferQueue.h
31a353da225af5329735451c761b430d82dfda1b 25-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: clean up buffer counting

This change is a clean up of some of the handling of the maximum number of
buffers that are allowed at once. It mostly renames a few member variables and
methods, but it includes a couple small refactorings.

Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
ui/BufferQueue.h
ui/SurfaceTexture.h
c1396dd14506d29e92fc047141d62b3d9246a72d 29-Aug-2012 Andreas Huber <andih@google.com> Merge "initial checkin of a preliminary HDCP API for vendors to implement." into jb-mr1-dev
a8fc772b5b13e359fa73d5867c0f617b8eae4a41 29-Aug-2012 Andreas Huber <andih@google.com> initial checkin of a preliminary HDCP API for vendors to implement.

Change-Id: If98277efdec1bc8f1e9f4af1ca73324e4c3d469b
edia/hardware/HDCPAPI.h
9b5782baf0a8a2d7afc7129453beb5df7abe7650 29-Aug-2012 Wink Saville <wink@google.com> A vendor ril depends on a native screen shot code.

Add a temporary shim until the vendor fixes the ril.

Bug: 7073467
Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
ui/SurfaceComposerClient.h
3ee454a7bef8bd3d1c9cdd9d17108eb80ebadf2a 28-Aug-2012 Mathias Agopian <mathias@google.com> Eradicate DisplayID.

DisplayDevices are now keyed of the wp<IBinder> the client uses.
DisplayID has now become DisplayType which is just used to identify
physical displays (as opposed to virtual displays such as wifi displays).

Change-Id: I0c5968f2c902dcd699a7e0afacf833ff070c12ea
ui/ISurfaceComposerClient.h
a50b51c03aca449920fc8581a738032a7bce7150 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Compatibility work around for bad graphics driver dependency.

This is a compatibility shim for one product whose drivers
are depending on SurfaceComposerClient::getDisplayInfo(
int, DisplayInfo*) when it really shouldn't.

Revert this patch when the problem has been resolved.

Bug: 7065398
Change-Id: I6542691b81fd1b1e1d79500a62e82d40a3d51db7
ui/SurfaceComposerClient.h
1ae49e3fef34ee38f8dfeb08b5914e3362af3b2f 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove unused "layer" argument from show()." into jb-mr1-dev
e310c3949f7de7183ef43e751526a5dc4cf0d74c 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Banish DisplayID from the SurfaceFlinger API." into jb-mr1-dev
380223bf1b340e7503177254a60d5982f95ab793 27-Aug-2012 Jeff Brown <jeffbrown@google.com> Remove unused "layer" argument from show().

Change-Id: I8944a9f4a27c330b11e5e837c69b88c8f84145ba
ui/Surface.h
ui/SurfaceComposerClient.h
9d4e3d2f42e93e2d12bacabe97d307d30c3c20dd 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Banish DisplayID from the SurfaceFlinger API.

Use only display tokens in the API to refer to new displays.

Don't require the caller to specify the display when creating
a surface (since in general a surface could be shown on
any display).

This is intended to be a minimum change just to update the API.
Note that SurfaceFlinger still uses DisplayID in a few places
internally that might cause some features not to work properly
when there are multiple displays (LayerScreenshot, for example).

Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
ui/ISurfaceComposer.h
ui/ISurfaceComposerClient.h
ui/Surface.h
ui/SurfaceComposerClient.h
f671385e71644b6f34a06f425aff8dd16ffc0105 27-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 9801575a: am 908c8ff5: Merge "Fixed clang build error for libgui"

* commit '9801575a65f2f9d0bdc924ec0a4bbfb6ef071bbe':
Fixed clang build error for libgui
9801575a65f2f9d0bdc924ec0a4bbfb6ef071bbe 27-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 908c8ff5: Merge "Fixed clang build error for libgui"

* commit '908c8ff55482b723eddec54c6308e54a136a3e49':
Fixed clang build error for libgui
225c66a48cdc3acef21ee380dc134449749d3cb3 25-Aug-2012 Mathias Agopian <mathias@google.com> Revert "put back the unused virtuals in Vector<>"

This reverts commit 1648d4c13ba2eff3ea14cd87ee94028458a39f97.

Bug: 6977192

Change-Id: Idbb6b239aaed4fb1c054ce943f6ba06ede3492bb
tils/VectorImpl.h
490aee0fc5012acf2bf0b1dfe9c09e6fcca606fc 24-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: inherit from ConsumerBase (try 2)" into jb-mr1-dev
114e968482a02b9153d9a236376efb5cd43f4a9a 26-Jul-2012 Tareq A. Siraj <tareq.a.siraj@intel.com> Fixed clang build error for libgui

Fixed the order of the statements in ANDROID_SINGLETON_STATIC_INSTANCE
macro so that the templated static member variable initialization
comes before the instantiation of the Singleton class. This
fixes the clang compile error.

Change-Id: Ic47d17e152b657f2dff3191ccc3770753fdf002b
Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>
tils/Singleton.h
9f54ac38860761ef62d9bb8282d54ff51a1a68a3 22-Aug-2012 Jamie Gennis <jgennis@google.com> ui/Fence: change the TIMEOUT_NEVER value to -1

Change-Id: I3ef0a4c06f80990b53a8bf2eda6edbfcbefd0f34
i/Fence.h
04930445031c5f41707806182bb7a152e64ddede 22-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Add BufferItemConsumer, a simple BufferQueue consumer." into jb-mr1-dev
9fea3421ffddf6480f57f55a25936a886043d909 08-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: inherit from ConsumerBase (try 2)

This change makes SurfaceTexture inherit from ConsumerBase. It removes all of
the functionality from SurfaceTexture that is now provided by the base class.
This includes fixes for two bugs that were found after checking this change in
the first time and then reverting it.

Change-Id: Ie2d9f4f27cfef26fdac341de3152e842b01a58d2
ui/ConsumerBase.h
ui/SurfaceTexture.h
e232fdca2a62dc5e81b550f5be8710e36174e7a6 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Add BufferItemConsumer, a simple BufferQueue consumer.

BufferItemConsumer allows for acquiring BufferQueue's BufferItems,
which contain all the data and metadata the BufferQueue has for a
given graphics buffer.

This consumer is useful when direct access to the native buffer_handles
is needed by the client.

Also includes a minor cleanup of CpuConsumer's use of 'virtual'.

Bug: 6243944
Change-Id: If7dc4192b15ac499555f1eda42a85140f2434795
ui/BufferItemConsumer.h
ui/CpuConsumer.h
1648d4c13ba2eff3ea14cd87ee94028458a39f97 21-Aug-2012 Mathias Agopian <mathias@google.com> put back the unused virtuals in Vector<>

some binaries are using these private APIs and broke
(as they should!) with this change. Temporarily restore the
virtuals to work around this.

Bug: 6977550
Change-Id: I7c37f24b16e4d586b89205c493db5169cf87e024
tils/VectorImpl.h
317357fdf7a2b542dfdaa06f42ff7f5f0153f9a3 21-Aug-2012 Mathias Agopian <mathias@google.com> Merge "get rid of mirrorItemAt() which isn't used anywhere" into jb-mr1-dev
84a9a3c0ec35915d3cc40e9e889d4032e189894a 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "CpuConsumer: inherit from ConsumerBase" into jb-mr1-dev
f57e7540d4cf799f18fe87d3536c55f1e0064931 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> CpuConsumer: inherit from ConsumerBase

Change-Id: I55178b1d673ffa0fbc6e63ef47642c64d4d03228
ui/CpuConsumer.h
f4ce7803fe71c9a9433ff1ba2e79db13a7e46290 20-Aug-2012 Mathias Agopian <mathias@google.com> get rid of mirrorItemAt() which isn't used anywhere

Change-Id: Id6f2dbeed21cabc127d39538c0ff464077ada83f
tils/SortedVector.h
tils/Vector.h
729f48082e2c7660e94830e52006f7af4efb747a 20-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "Revert "SurfaceTexture: inherit from ConsumerBase"" into jb-mr1-dev
ce7a6c0fc9d75b80da030d1790321e84475f956a 20-Aug-2012 Jamie Gennis <jgennis@google.com> Revert "SurfaceTexture: inherit from ConsumerBase"

This reverts commit ed059a8d754770c3cf28b78dba30f7a6ba475dbe

Change-Id: I72542c2595771a40c2c88251e0d6eb54e305b99b
ui/ConsumerBase.h
ui/SurfaceTexture.h
483bccd0d9f7e5e7aa452e9e3e53056387f4b25c 20-Aug-2012 Jamie Gennis <jgennis@google.com> Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"

This reverts commit f8d33c652b930abbfb0722f3a2928cbc2ea71078

Change-Id: I1ff2e1cc85824a8fac1051f573d2931db81af511
ui/SurfaceTexture.h
f8d33c652b930abbfb0722f3a2928cbc2ea71078 20-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: call ConsumerBase::freeBufferLocked

This change fixes SurfaceTexture::freeBufferLocked so that it calls the base
class implementation.

Change-Id: I45d76fb2eb02c1fa6e4e917823ead83e2086bd15
ui/SurfaceTexture.h
2c7eb92b6394427bfe81962668d46194959bc722 18-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: inherit from ConsumerBase" into jb-mr1-dev
818b46058aa3006e1d3c178abd36d4f10823f5d9 17-Aug-2012 Mathias Agopian <mathias@google.com> display states can't share the dirty flags

Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
rivate/gui/LayerState.h
ed059a8d754770c3cf28b78dba30f7a6ba475dbe 08-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: inherit from ConsumerBase

This change makes SurfaceTexture inherit from ConsumerBase. It removes all of
the functionality from SurfaceTexture that is now provided by the base class.

Change-Id: I4a881df42810a14ee32d4ef7c8772a8f2510f4c7
ui/ConsumerBase.h
ui/SurfaceTexture.h
8855e6f1c59954ef8de651987fec0cbba0394e9b 21-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Add support for "-rtl" in resources

Change-Id: I0aaf10caf7b6a6d9e76b67dcabf01e4267b407bb
ndroid/configuration.h
f0083bf5288e0d430b0dc5cbc4b4852bce2ff1af 14-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Add a very simple helper function to log slow functions." into jb-mr1-dev
8683fca395d01734ec7946e9f0595ec5d7b754c6 13-Aug-2012 Mathias Agopian <mathias@google.com> improve [un]marshalling of non-binder objects

this change introduces a new class LightFlattenable<> which is
a protocol to flatten simple objects that don't require
binders or file descriptors; the benefit of this protocol is that
it doesn't require the objects to have a virtual table and give us
a consitant way of doing this.

we also introduce an implementation of this protocol for
POD structures, LightFlattenablePod<>.

Parcel has been update to handle this protocol automatically.

Sensor, Rect, Point and Region now use this new protocol.

Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
inder/Parcel.h
ui/Sensor.h
i/Point.h
i/Rect.h
i/Region.h
tils/Flattenable.h
6f12d573251528086636707dde2fb01a8b7199b8 11-Aug-2012 Jeff Brown <jeffbrown@google.com> Add a very simple helper function to log slow functions.

Change-Id: I2e2e072206d02b572a330dd25857c161b5b563bf
tils/Log.h
e57f292595bec48f65c8088b00ff6beea01217e9 10-Aug-2012 Mathias Agopian <mathias@google.com> make multi-display more real

- displays are represented by a binder on the client side
- c++ clients can now create and modify displays

Change-Id: I203ea5b4beae0819d742ec5171c27568f4e8354b
ui/ISurfaceComposer.h
ui/SurfaceComposerClient.h
rivate/gui/LayerState.h
3165cc21cfea781988407b19bd83292b19f05f55 09-Aug-2012 Mathias Agopian <mathias@google.com> libgui includes refactoring

Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
ui/ISurfaceComposer.h
ui/ISurfaceComposerClient.h
rivate/gui/LayerState.h
69973992d531ae7df20916c6fb3034b08a6d53c4 10-Aug-2012 Mathias Agopian <mathias@google.com> improve Vector<> safety checks

- make errors that will always cause a memory corruption always fatal
(for eg: KeyedVector<>::editValue{For|At}() failure)
- make other errors fatal in debug mode, those that can be caught by
the caller.
- fix typos

Change-Id: I65cc7d81035c37ce2906fc4500c50e5d5b5c49eb
tils/KeyedVector.h
tils/SortedVector.h
tils/Vector.h
tils/VectorImpl.h
14bd369e4b711bfb267279c2161358542ed75b29 07-Aug-2012 Jamie Gennis <jgennis@google.com> Merge changes Ic3d35a93,I46ec942d into jb-mr1-dev

* changes:
SurfaceTexture: fix an out of bounds array access
surfaceflinger: refactor FrambufferSurface
1a4d883dcc1725892bfb5c28dec255a233186524 03-Aug-2012 Jamie Gennis <jgennis@google.com> surfaceflinger: refactor FrambufferSurface

This change refactors the FramebufferSurface class to inherit from the new
ConsumerBase class.

Bug: 6620200
Change-Id: I46ec942ddb019658e3c5e79465548b171b2261f2
ui/BufferQueue.h
ui/ConsumerBase.h
53095e25d69206bea1ac15a7382ab8b61155c0c1 05-Aug-2012 Mathias Agopian <mathias@google.com> libutils cleanup: remove unused or seldom used code from misc.{cpp|h}

Change-Id: I72206f16619d81887e3b85603494563faab3b445
tils/misc.h
92efd84f37ce5a8aae74dc9086f825a67b6894e9 03-Aug-2012 Mathias Agopian <mathias@google.com> screen-off animation won't be handled by SF anymore

Change-Id: Idc41386804ae7d7eb981c36e1bc55c270870c8d0
ui/ISurfaceComposer.h
92a979a92c34b7de609ce2b1662c73bb8a2728b9 03-Aug-2012 Mathias Agopian <mathias@google.com> We now have a real list of displays.

displays can be dynamically added or removed, and the
list is part of the SF's transaction.

Change-Id: I4186ea39f1317c0e7c044f869004017738968fab
tils/KeyedVector.h
747c480b0e3cf9401ff53421be6a82b23fdc04c2 28-Jul-2012 Ed Heyl <ed@google.com> Merge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-dev

Conflicts:
include/media/hardware/CryptoAPI.h

Change-Id: I84bf34edbef000558f088bbf1d1e5b55d6217d2e
c666cae2d5995097ec49a87e375e2afdd92802b7 26-Jul-2012 Mathias Agopian <mathias@google.com> get rid of the shared-memory control block

Change-Id: If814060aca1d2ff2619d4adcd57296983d207f7f
ui/ISurfaceComposer.h
ui/SurfaceComposerClient.h
rivate/gui/ComposerService.h
rivate/gui/SharedBufferStack.h
i/DisplayInfo.h
8785578391eacd4192333d7b0ce3afedd7d163e6 25-Jul-2012 Mathias Agopian <mathias@google.com> add a layerStack attribute to Layers.

this attribute can be set through a regular transaction using
SurfaceComposerClient (just like any other attribute, eg: position or size)

Change-Id: I701a47c677ea6442ca713728a93335328cd2b172
ui/ISurfaceComposer.h
ui/SurfaceComposerClient.h
rivate/gui/LayerState.h
8b33f032327f8de0dcc0e6d0d43ed80f834b51f6 25-Jul-2012 Mathias Agopian <mathias@google.com> update SF binder protocol to support setting display attributes

no change of functionality -- the old behavior is implemented
on top of this new protocol.
this new protocol will allow, eventually, to pass informations
about displays and layer stacks.

Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
ui/ISurfaceComposer.h
rivate/gui/LayerState.h
074cd0c0765d1aec5a4ff5ac460f0685ae067fb1 19-Jul-2012 Nick Pelly <npelly@google.com> Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.

Change-Id: I4231c8ca32663e6e2cb5b7c126d091f837373807
tils/SystemClock.h
tils/Timers.h
e64a4035523aa5e15091a4b6b15612a5bcd1ad01 17-Jul-2012 Edwin Wong <edwinwong@google.com> Merge from jb-dev for "sample video corruption in MediaCodec mode." DO NOT MERGE

jb-dev commit: fa2b8f243eb048fb2b8e5a14356190f69eb31a36

Change-Id: Ic2a28663d25e3007c95e15ecbb0d44b820045f85
related-to-bug: 6732061
edia/hardware/CryptoAPI.h
3ad182ff6343cf3fa997038163fac3e9957d0368 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove unused layer flags."
6d7e32c672189ef2b900fc5467dbf603f84dce54 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove unused layer flags.

Change-Id: Ia85365f18770a9a2c0a0e30ae56b6c2226d41be6
ui/ISurfaceComposer.h
fefad4367476aeda48970843f1741938a850e4cb 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove freeze(), unfreeze() and setFreezeTint()."
74bf0721471accbf604143e000f6c444d63d376b 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove freezeDisplay(), which is no-op."
6501e9944df131b3b7e293007084735dfa217f24 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freeze(), unfreeze() and setFreezeTint().

This is all dead code.

Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce
ui/ISurfaceComposer.h
ui/Surface.h
ui/SurfaceComposerClient.h
rivate/gui/LayerState.h
f9176a93a5c9061fe001c91bca50dd0a58d54f10 16-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freezeDisplay(), which is no-op.

Change-Id: I2b70249a1545636fd6d98b58057b22f9529cad21
ui/SurfaceComposerClient.h
85324d954674a556927f6afb2fc5827979d4d63e 14-Jul-2012 Edwin Wong <edwinwong@google.com> am 647336c7: am e0daeb39: Fixed sample video corrupted in MediaCodec mode.

* commit '647336c76e8da68fb44ca52ec14a8a2c6d5735bb':
Fixed sample video corrupted in MediaCodec mode.
e0daeb3933e034f037630715e4cd2ecb3880498b 11-Jul-2012 Edwin Wong <edwinwong@google.com> Fixed sample video corrupted in MediaCodec mode.

Change-Id: Ibe11a83199f3db1ba6266a1a9e11c7fc24ceb554
related-to-bug: 6732061
edia/hardware/CryptoAPI.h
4fec873a98f7b4380720cd1ad006f74c8cdc73da 29-Jun-2012 Mathias Agopian <mathias@google.com> one more step towards multiple display support

- remove dependency on cached state in validateVisibility
- get rid of mVertices and mTransformedBounds
- get rid of validateVisibility
- get rid of unlockPageFlip
- handleTransaction now returns a dirty region
- computevisibileregion now uses window-manager space
tils/Vector.h
0bc64be3f5198f8dda1ced21bbc957a1d76efbb7 29-Jun-2012 Naseer Ahmed <naseer@codeaurora.org> libs/ui: Add support for triple framebuffers

Change-Id: I90dd38deeeda9a3785b87286cc7d252c6f948750
i/FramebufferNativeWindow.h
dc5b485f74edf2d2f31c62054eb6c180421a3ade 30-Jun-2012 Jesse Hall <jessehall@google.com> Pass fence to HWC on first use of buffer

Also do a CPU-wait on the fence before using it for GL composition.

Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
ui/SurfaceTexture.h
b42b1ac1587aebda5e2f334d95b620271fafba4e 28-Jun-2012 Jesse Hall <jessehall@google.com> Return fence from acquireBuffer

Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666
ui/BufferQueue.h
c777b0b3b9b0ea5d8e378fccde6935765e28e329 28-Jun-2012 Jesse Hall <jessehall@google.com> Pass fences with buffers from SurfaceTextureClient

Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3
ui/BufferQueue.h
ui/ISurfaceTexture.h
i/Fence.h
962174da0303d94180af7648faf90e112b851192 29-Jun-2012 Jesse Hall <jessehall@google.com> Merge "Return fence to client in dequeuBuffer"
f9783af225aa3b41ec0af36f90941a714269abb7 25-Jun-2012 Jesse Hall <jessehall@google.com> Return fence to client in dequeuBuffer

Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9
i/Fence.h
3094df359d1e6e2ae8ca4e935cc093f563804c96 19-Jun-2012 Mathias Agopian <mathias@google.com> First prototype atttempting to support an external display

both API and implementation will change, this is just a prototype
intended to show feasability.

SurfaceFlinger is passed an ISurfaceTexture through a new
callback, it is in turn used to create an EGLSurface which
surfaceflinger will draw into in addition to the main screen.

Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21
ui/ISurfaceComposer.h
f78575400977f644cf0b12beb2fa5fc278b6ed4c 15-Jun-2012 Jesse Hall <jessehall@google.com> Pass fences from BufferQueue to SurfaceTextureClient

ISurfaceTexture::dequeueBuffer now returns the buffer's fence for the
client to wait on. For BufferQueue, this means passing it through
Binder so it can be returned to the SurfaceTextureClient. Now
SurfaceTextureClient is responsible for waiting on the fence in
dequeueBuffer instead of BufferQueue: one step closer to the goal.

Change-Id: I677ae758bcd23acee2d784b8cec11b32cccc196d
ui/BufferQueue.h
ui/ISurfaceTexture.h
ef19414bd8b77a26f5751f3845be79025a8263fe 14-Jun-2012 Jesse Hall <jessehall@google.com> Transfer HWC release fences to BufferQueue

After a HWC set, each SurfaceFlinger Layer retrieves the release fence
HWC returned and gives it to the layer's SurfaceTexture. The
SurfaceTexture accumulates the fences into a merged fence until the
next updateTexImage, then passes the merged fence to the BufferQueue
in releaseBuffer.

In a follow-on change, BufferQueue will return the fence along with
the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the
fence to signal before returning.

The releaseFence default value for BufferQueue::releaseBuffer() is
temporary to avoid transient build breaks with a multi-project
checkin. It'll disappear in the next change.

Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
ui/BufferQueue.h
ui/SurfaceTexture.h
i/Fence.h
07912f50930cf8cea2bc5f8f94e014c31af583b6 21-Jun-2012 Haynes Mathew George <hgeorge@codeaurora.org> Add vendor specific color format to OMX_IVCommon.h

- Add Qualcomm specific color format to OMX_IVCommon.h

Change-Id: I77a7196307d079348a50d7bb67c80cd2642a72df
edia/openmax/OMX_IVCommon.h
d8e812ce6fe9ae0388e98b08456e1d18b9498239 14-Jun-2012 Jamie Gennis <jgennis@google.com> Update ANativeWindow clients for sync

This change updates the uses of ANativeWindow to use the new ANW functions that
accept and return Sync HAL fence file descriptors.

Change-Id: I3ca648b6ac33f7360e86754f924aa072f95242f6
ui/SurfaceTextureClient.h
i/FramebufferNativeWindow.h
f25e183a70bd631f75dce51e85b7d568472a0cdb 14-Jun-2012 Jamie Gennis <jgennis@google.com> libui: add the Fence class

This change adds the Fence class to libui for to wrap the libsync
functionality.

Change-Id: I93a31baeee608b93c14da807a32013dabf783f84
i/Fence.h
db403e8ff0d7727015e1a5009bab20eb7ec205bc 19-Jun-2012 Mathias Agopian <mathias@google.com> split-up Client.h out of SurfaceFlinger.h

Change-Id: I1993bf23e417163749d886283563a93d50b361b4
inder/PermissionCache.h
d3076aca0f6106dbc6c5a1588f560c62567752a4 16-Jun-2012 Mathias Agopian <mathias@google.com> Merge "Implement SurfaceFlinger's ANW on top of BufferQueue"
b6d00dcf3e0c65b1642ad0011c1b4605b80a56e1 15-Jun-2012 Jeff Brown <jeffbrown@google.com> am 0512af11: am 16272efb: Add ASSIST keycode.

* commit '0512af11f4b790fb032dc7c344dcdac527faf8ad':
Add ASSIST keycode.
16272efb7af0692266fecdc53b2c6d995bf397b7 15-Jun-2012 Jeff Brown <jeffbrown@google.com> Add ASSIST keycode.

Bug: 6594275
Change-Id: I032b055207d16bfff93ee8a350c0dc52b9102926
ndroid/keycodes.h
3e87601170141229d661df93e2f59e1ced73474b 08-Jun-2012 Mathias Agopian <mathias@google.com> Implement SurfaceFlinger's ANW on top of BufferQueue

SF now has its own implementation of ANW for the
framebuffer and it uses BufferQueue. FramebufferNativeWindow
is now only used by stand-alone apps.

Change-Id: Iddeb24087df62bd92b0f78e391dda9b97ddc859c
ui/BufferQueue.h
8e533069e5721e55cb9768e140e16546c3a4a8b6 07-Jun-2012 Colin Cross <ccross@android.com> surfaceflinger: replace early suspend with binder call from PowerManager

SurfaceFlinger will no longer directly synchronize with early suspend.
Instead, PowerManagerService will synchronize with SurfaceFlinger to
ensure that a black frame has been drawn on the display, and then
trigger all early suspend handlers.

Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
ui/ISurfaceComposer.h
9a6b4c73face8005352fc0db1ecf09b2b8bdedcb 01-Jun-2012 Jeff Brown <jeffbrown@google.com> am d5085da3: am 4467bba7: Merge "Support looper callbacks based on smart pointers." into jb-dev

* commit 'd5085da3c0c103bba0c2c927382f7d414275b661':
Support looper callbacks based on smart pointers.
ad7b3760ced1c5ca40b3641e97911803810a839b 01-Jun-2012 Jeff Brown <jeffbrown@google.com> am 80586761: am dad23789: Merge "Delete unused poll() code." into jb-dev

* commit '805867612c0c11d3bb494cbf454cbb2de21a1b75':
Delete unused poll() code.
27d928474d05c8cf976d9da88be876feda7e10f3 01-Jun-2012 Jeff Brown <jeffbrown@google.com> am dce1547d: am 9e2e781a: Merge "Remove unused statistics code." into jb-dev

* commit 'dce1547d65877b89cec4e52ee8e5b39830911d00':
Remove unused statistics code.
4467bba73a91161da01d5d969cf7ba3e2309d989 01-Jun-2012 Jeff Brown <jeffbrown@google.com> Merge "Support looper callbacks based on smart pointers." into jb-dev
dad2378911a244607afa3899928c429b340031cb 01-Jun-2012 Jeff Brown <jeffbrown@google.com> Merge "Delete unused poll() code." into jb-dev
9e2e781acaead54d0fb095d55a1c44b32563248f 01-Jun-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove unused statistics code." into jb-dev
af567f73ac828b9c319c12fd92760c4c92f0dfa4 01-Jun-2012 Jeff Brown <jeffbrown@google.com> Support looper callbacks based on smart pointers.

Bug: 6559630
Change-Id: I5a667f219f431838638acefbc9fa6afa610971bd
tils/Looper.h
1737e57a861326e96f3de19090975564f98a8fda 01-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Add camera as an ATRACE tag

Change-Id: Ib4f22d593836c4b973d122efa114d359f1529914
tils/Trace.h
588d5c8280c89c646aa7c8c54900225ee04176ea 31-May-2012 Jeff Brown <jeffbrown@google.com> Delete unused poll() code.

We don't need this code anymore and it is just in the way.

Bug: 6559630
Change-Id: I1dc9decf85d5ea1feab159c2985da6c20baffdd5
tils/Looper.h
1ea51bf519bdfc0e04daa88b8788f06105c5599b 31-May-2012 Jeff Brown <jeffbrown@google.com> Remove unused statistics code.

Bug: 6559630
Change-Id: Iacdf4bb4c1c125c09305cbd8cb443c7c80cfc010
tils/Looper.h
2466e402a054669ecda0d2b0dcb9cc08c4a9559a 30-May-2012 Mathias Agopian <mathias@google.com> am 584fcb32: am 2c8207e9: add the ability to reject buffers in SurfaceTexture::updateTexImage

* commit '584fcb3218e07d7b4cc0aeaef41faa4e891b45a4':
add the ability to reject buffers in SurfaceTexture::updateTexImage
2c8207e9627fe6c7a90e31fae8d71ae49df56845 24-May-2012 Mathias Agopian <mathias@google.com> add the ability to reject buffers in SurfaceTexture::updateTexImage

SurfaceFlinger is using this new feature to reject buffers that
don't have the right size.

Bug: 6498869
Change-Id: I8a7250a47db6c082a357b703feb3b9d0fc8d3443
ui/SurfaceTexture.h
a07d473c11da1389d4b5989577488f11f6d7cd61 16-May-2012 Eino-Ville Talvala <etalvala@google.com> am e804aa48: Merge "Move CameraParameters header to join rest of camera library." into jb-dev

* commit 'e804aa4819a764e1f3929f4c578e9a44593a1467':
Move CameraParameters header to join rest of camera library.
e804aa4819a764e1f3929f4c578e9a44593a1467 16-May-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Move CameraParameters header to join rest of camera library." into jb-dev
41caf6dff296488cbfedbf49f0a133ac4cf958b3 16-May-2012 Eino-Ville Talvala <etalvala@google.com> Move CameraParameters header to join rest of camera library.

CameraParameters was moved over to frameworks/native before
frameworks/av was created, since it is referenced by HAL
implementations. Move it to frameworks/av to keep it together with its
implementation.

Bug: 6500863
Change-Id: Iffd890c861a334930da71a2722553572bad1cb54
amera/CameraParameters.h
a74eb25cbc42a9dde0df6b2303fda9027f77f393 15-May-2012 Jamie Gennis <jgennis@google.com> am dd739965: Merge changes I32fbc2b6,Ifd0ed05b into jb-dev

* commit 'dd73996552938ac5165a35f09d389abedcf421ef':
SurfaceFlinger: recompute visible regions less
libgui: remove setPostTransformCrop
8d057994a0061f56614ff020a2af1d59c894a7d0 15-May-2012 Glenn Kasten <gkasten@google.com> am bd113224: Merge "Fix log spam about CPU frequency on one device" into jb-dev

* commit 'bd1132249479e52ddd128171da24327358e2191c':
Fix log spam about CPU frequency on one device
15e23859ba8dc3d64eb384b72521a834c86648dd 15-May-2012 Mathias Agopian <mathias@google.com> am 9cab4ca1: Merge "minor Rect.h cleanup" into jb-dev

* commit '9cab4ca1ca74068e50192296badd0ae7a61f3927':
minor Rect.h cleanup
dd73996552938ac5165a35f09d389abedcf421ef 15-May-2012 Jamie Gennis <jgennis@google.com> Merge changes I32fbc2b6,Ifd0ed05b into jb-dev

* changes:
SurfaceFlinger: recompute visible regions less
libgui: remove setPostTransformCrop
e41b318bc4708e1dee9364e73215ff0d51fb76a1 17-Apr-2012 Eino-Ville Talvala <etalvala@google.com> Add a BufferQueue CPU consumer.

Aimed for use cases where gralloc buffers need to be consumed by CPU
users, such as camera image data streams.

The CpuConsumer is a synchronous queue, which exposes raw pointers to
the underlying graphics buffers to applications. Multiple buffers may
be acquired at once, up to the limit set at time of construction.

Change-Id: If1d99f12471438e95a69696e40685948778055fd
ui/BufferQueue.h
ui/CpuConsumer.h
bd1132249479e52ddd128171da24327358e2191c 15-May-2012 Glenn Kasten <gkasten@google.com> Merge "Fix log spam about CPU frequency on one device" into jb-dev
542af12d10e5923a6e811c72e2bbe4e7507b6448 14-May-2012 Glenn Kasten <gkasten@google.com> Fix log spam about CPU frequency on one device

Previous kernels have allowed opening the CPU frequency file regardless
whether the CPU is up or not. This fixes some log spam on one device
with dynamic hot plug CPU feature, which does not allow opening the CPU
frequency file if CPU is down.

Also, since the file descriptors are global and have long lives, add
the close-on-exec flag.

Change-Id: Ia14a2b9e20038dfb96a573920176a47a96bd3f5a
pustats/ThreadCpuUsage.h
b7a6b96301c00c630610df4cb55a45d666200817 14-May-2012 Jamie Gennis <jgennis@google.com> libgui: remove setPostTransformCrop

This change removes the setPostTransformCrop function from
SurfaceTextureClient. It also includes a small logging fix in BufferQueue.

Bug: 6299171
Change-Id: Ifd0ed05b95dad6085e7a8267fda4d69b76ea3bad
ui/SurfaceTextureClient.h
b82203a6601728a507bc3e7d5b2b042356004aae 14-May-2012 Mathias Agopian <mathias@google.com> minor Rect.h cleanup

add getBounds(), getWidth(), getHeight(), width() and height()
are kept for backward compatibility.

Change-Id: I83837abf17dc2f8bded1beff73430e8c7d9bbdb3
i/Rect.h
b194ec926bf3fb3c546244b135f602ceb3a0a6b0 11-May-2012 Jamie Gennis <jgennis@google.com> libutils: add a tracing tag for video

Change-Id: Icbecc7184844e95ee81a558b0a54d5513d5cf59f
tils/Trace.h
f15a83f5814219c167f87cb8aaea622fc8493499 11-May-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add a crop to the layer state

This change adds a crop rectangle specified in window coordinates to the layer
state. The all window pixels outside this crop rectangle are treated as though
they were fully transparent. This change also adds the plumbing necessary for
WindowManager to set that crop.

Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
ui/ISurfaceComposer.h
ui/Surface.h
ui/SurfaceComposerClient.h
rivate/gui/LayerState.h
i/Rect.h
3c32e5da5b3f12bd498ae7016604b20ba61f5756 10-May-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "OMX IL header additions for FLAC" into jb-dev
224c78405f14b95416d2278e317b98cdb97497cc 30-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> OMX IL header additions for FLAC

Bug 5525503

Change-Id: I8d305d5351d3780f8ca933b8e602f2bf88e9ac78
edia/openmax/OMX_Audio.h
edia/openmax/OMX_Index.h
555f89d8df316cdc5a25dbedb8614c2ac7a5e0a9 09-May-2012 Dianne Hackborn <hackbod@google.com> Add callback hack to find out when to reload system properties.

Every IBinder object can accept a new transaction to tell it that
it might want to reload system properties, and in the process
anyone can register a callback to be executed when this happens.

Use this to reload the trace property.

This is very much ONLY for debugging.

Change-Id: I55c67c46f8f3fa9073bef0dfaab4577ed1d47eb4
inder/IBinder.h
tils/Trace.h
tils/misc.h
82c53806ada5c314124431ec0a49fa15a6b5f1d6 09-May-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: improve texture matrix computation" into jb-dev
cae7c0b955efba6986d9e1fe5a68e48e7a2f806b 09-May-2012 Jamie Gennis <jgennis@google.com> Merge "libgui: Add support for post-xform crops." into jb-dev
59df82f355ac4bb3c08f678432a38c3ef29b3637 09-May-2012 Jamie Gennis <jgennis@google.com> Merge "libui: add the Rect::transform method" into jb-dev
5c1139fea3cc0fd9847a6594d853a458152b2fbc 09-May-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: improve texture matrix computation

This change reduces the shrinking of the crop rectangle in some cases. It adds
a way to inform the SurfaceTexture that its texture will be used without
bilinear interpolation, and uses knowledge of the pixel format to avoid
shrinking unecessarily.

Change-Id: I72365f39f74ecb7fcc51b4cf42f2d0fa97727212
ui/SurfaceTexture.h
d72f233ffa125856a44976a50a66ceb669f49ab2 07-May-2012 Jamie Gennis <jgennis@google.com> libgui: Add support for post-xform crops.

This change adds support for specifying a crop rectangle to a
SurfaceTextureClient that is in post-transformed coordinate space.

Change-Id: I247901de343e71b32850f7ae3bac62dfa612ad3d
Bug: 6299171
ui/BufferQueue.h
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
59332804306c054082a39e9b004146bd03ae1d30 07-May-2012 Jamie Gennis <jgennis@google.com> libui: add the Rect::transform method

This change adds a method to Rect to transform a rectangle by a graphics HAL
transform.

Change-Id: Ic0d0988e731bdb5662faee41a5927b1242891658
Bug: 6299171
i/Rect.h
5b38a1dfe8e90734fc878ef47df1bd967480a946 07-May-2012 Glenn Kasten <gkasten@google.com> Add audio tag to systrace

Change-Id: I4a558c43e4ccd81a4ed94684c5fad6b3c486bd14
tils/Trace.h
081c80c2e0f97fb50595b138271d14892aea1b4a 04-May-2012 Andy Stadler <stadler@google.com> Add System Tracing capability to Sync Manager

See also: Change-Id: Ia8bc01adbba345a568405b0ac8ade96e56b40cc1

Change-Id: I2678974cf85464fbc09072b06f647a0787e6e23f
tils/Trace.h
627f471812871d4a3d02abe87e190ffe24e0ff41 27-Apr-2012 Dianne Hackborn <hackbod@google.com> Merge "Add traces for window manager and activity manager." into jb-dev
1cb93ba130241dbb70b81a1fa4d2704386c6dae8 26-Apr-2012 Dianne Hackborn <hackbod@google.com> Add traces for window manager and activity manager.

Change-Id: I6677ca64164f234efc7856ddd173ad6989b4f59e
tils/Trace.h
8e846fd6b3e09f5a52f47311e97b8d8f683833d4 25-Apr-2012 Dave Burke <daveburke@google.com> Define OMX_AUDIO_AACObjectELD

Change-Id: Icfbcbddb46fc0bf185e00b193462bc9e035c222b
edia/openmax/OMX_Audio.h
efc7ab6dcea8c22ddd7c0259ef4ab4bbf1e93044 18-Apr-2012 Jamie Gennis <jgennis@google.com> libgui: Add plumbing for active rectangle

This change adds the plumbing to SurfaceTextureClient, BufferQueue, and
SurfaceTexture to get the active rectangle passed to the ANativeWindow to
the buffer consumer.

Change-Id: I35da0889b266327ebb079b6a7136fa3e2e8b00e6
ui/BufferQueue.h
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
2488b20aec097accb20a853d9876bb0a5dc04636 21-Apr-2012 Mathias Agopian <mathias@google.com> add a way to query whether an ANativeWindow consumer is running ahead of the producer

Change-Id: Ibccfa1feb56db2ab11f0c0934ce2d570a2b65ae2
ui/ISurfaceTexture.h
ui/SurfaceTextureClient.h
24202f5676c32edeef6544cf36e06b9fc970dbde 23-Apr-2012 Mathias Agopian <mathias@google.com> update the binder protocol for connect to match that of queueBuffer

indeed, connect and queueBuffer return the same data, so it's
easier to have them use the same protocol.

Change-Id: I4f9fa3be0a80c9ab0a7a4039b282ae843aab02e1
ui/BufferQueue.h
ui/ISurfaceTexture.h
a0db308c3d62301ae41b2e2bcf295c4ee4c7b08e 23-Apr-2012 Mathias Agopian <mathias@google.com> remove SurfaceTexture::connect()

use BufferQueue::connect() instead

Change-Id: I04aab7cf11304bf962cde38470747f3b19ddba42
ui/SurfaceTexture.h
0f00cca1681c6fab9ad2ac9d93536213ba36e399 24-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "Scheduling group cleanup"
64a1e08b86d72cb375f9dfdf4eb6307f71817350 20-Apr-2012 Mathias Agopian <mathias@google.com> SF doesn't need more than a few binder threads

Change-Id: Ic4659fb81f9990cc7caf84a496a8ae659a1d16a9
inder/BinderService.h
383190e475d7bdbe90359dbb99721041773a8646 19-Apr-2012 Andreas Huber <andih@google.com> Allow the crypto plugin to specify error detail if it returns an error

in the range ERROR_DRM_VENDOR_MIN..ERROR_DRM_VENDOR_MAX.

Change-Id: Ic5d53e98cf6d98d92ad305d51f848e03d0bf3a84
related-to-bug: 6365261
edia/hardware/CryptoAPI.h
a26e1cfbbcb7dc5e0b1cd79a815362d6a048ef26 16-Mar-2012 Glenn Kasten <gkasten@google.com> Scheduling group cleanup

Remove C++ APIs androidSetThreadSchedulingGroup and
androidGetThreadSchedulingGroup, and the ANDROID_TGROUP_* constants.

Former callers of these should now use the C APIs set_sched_policy and
get_sched_policy, and the SP_* constants.

Note: debug.sys.noschedgroups is not supported by the C APIs,
this needs to be discussed.

Change-Id: I32bbfc539ef4090faf9ef0320380e8cca9eae07c
tils/AndroidThreads.h
tils/ThreadDefs.h
9798ff28b80051185e432230000eb663d3cc8453 19-Apr-2012 Mathias Agopian <mathias@google.com> Merge "add set thread count"
1b80f793d2328dd94a151411a1cc3a676121ffc7 18-Apr-2012 Mathias Agopian <mathias@google.com> add set thread count

Change-Id: I70f02908d8362a465eb8a2a24356f6989847f7ba
inder/ProcessState.h
85b217668d6840c8e6a109adfb99461313676f8d 14-Apr-2012 Eino-Ville Talvala <etalvala@google.com> Remove fixed USAGE_HW_TEXTURE flag from BufferQueue.

USAGE_HW_TEXTURE applies to SurfaceTexture, not to all uses of
BufferQueue. Refactor accordingly.

Change-Id: Ic7add5e1f2bbec3d3e796ba7f15eaa0633945d8f
ui/SurfaceTexture.h
992b4c556b111fac50cd07f0f0e06fedfb0301e5 18-Apr-2012 Jeff Brown <jeffbrown@google.com> Merge "Support tokenizing arbitrary content."
a8be8fa0966521afe78324351e805b4a8351dbd9 18-Apr-2012 Jeff Brown <jeffbrown@google.com> Support tokenizing arbitrary content.

Bug: 6110399
Change-Id: I37be63b68934fd451e6dffbf7d6079553619c0a3
tils/Tokenizer.h
4851e21d2ae4bbb2cdb0873c0e91e8e0bf7a81a8 17-Apr-2012 Chris Craik <ccraik@google.com> Merge "Add webview tracing bit"
3aecbb0715cb6928e0530ff1e4caa9c0993cc371 17-Apr-2012 Mathias Agopian <mathias@google.com> fix Region const_iterator.

- it returned an empty rect when the region was empty, instead
of returning an empty list of rect.

- also fixed an infinite loop when boolean_operation was given
an empty list of rects

Change-Id: I62225c7dcd2832025bb8f12e6cb3762f2a7b36cb
rivate/ui/RegionHelper.h
6acafadea0ef48acff794d12f5a64a81bcd7ef7c 17-Apr-2012 Chris Craik <ccraik@google.com> Add webview tracing bit

Change-Id: I82e54f5eeb2666a255e372fd3bfcc54c1b3d76a0
tils/Trace.h
ac6035a12aec38eeb14d0c13636ec980066d9a8f 13-Apr-2012 Mathias Agopian <mathias@google.com> s/w rendered apps can now use n-buffering (n>2)

Bug: 6311881
Change-Id: I6e52e281e8d432430aad011f6d9dcf35d7b4ac7d
ui/SurfaceTextureClient.h
016c8cbce4dde21f2703b9865f52d16b8d5d5ae2 04-Apr-2012 Daniel Lam <dalam@google.com> Enabled cropping support in SurfaceTexture

SurfaceTexture will modify the crop rect so it matches
the desired output aspect ratio when the scaling
mode is NATIVE_WINDOW_SCALING_MODE_CROP. Added a test
for this new scaling mode.

Change-Id: I60f24dcbc294b65cd10a393d9e27d40f07d27bb6
ui/SurfaceTexture.h
55a701459de964ae3504264a6b8c4dc37f54a9e8 10-Apr-2012 Michael I. Gold <gold@nvidia.com> SurfaceTextureClient: support for application buffer dimensions

Add a new API native_window_set_buffers_user_dimensions to allow native
applications to override the native window size for the default buffer size.
This has lower precedence than the existing
native_window_set_buffers_dimensions and allows the two to co-exist.

Change-Id: Ie73590e1c94ef0dadbce500bd0941dfabbcace3c
ui/SurfaceTextureClient.h
f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246 10-Apr-2012 Mathias Agopian <mathias@google.com> use in/out structures for queueBuffer() IPC

Change-Id: Ie125df2444b62a9a2200586a717dca268852afc9
ui/BufferQueue.h
ui/ISurfaceTexture.h
fbcda930dd8b2823cfeb160fd0131f5897b7522f 10-Apr-2012 Daniel Lam <dalam@google.com> BufferQueue returns proper code on acquire

Also removed unnecessary debug messages from
SurfaceTextureClient.

Change-Id: I291897a44170142f9d42a007b008823fad4683e0
ui/BufferQueue.h
abe61bfda4938abd932465e27c29ba9e41aea606 27-Mar-2012 Daniel Lam <dalam@google.com> BufferQueue no longer hardcodes buffer counts

BufferQueue is now more flexible as it can be used
by SurfaceMediaSource in addition to SurfaceTexture.

Change-Id: I4222be8918d63372c44fcd412d9ad241c6a3eeb9
ui/BufferQueue.h
ui/SurfaceTextureClient.h
8cce8a9a75d172e0077960223ac5f2d06df33892 06-Apr-2012 Jamie Gennis <jgennis@google.com> Merge "Fixed disconnect bug in SurfaceTexture"
9b71221171774cc37b35bfd861cb4082d7f021ab 04-Apr-2012 Mathias Agopian <mathias@google.com> Merge "use a socketpair instead of a pipe in BitTube"
cf0db31c323676ba9cfab81c7032a37c09256e48 03-Apr-2012 Andreas Huber <andih@google.com> New Crypto "HAL" API.

Change-Id: I225cdfeffb7663a2d639a01cfe704aa12f9014b8
related-to-bug: 6275919
edia/hardware/CryptoAPI.h
7b5be95cb3903087742f1079fe89cddd8abe3696 03-Apr-2012 Mathias Agopian <mathias@google.com> use a socketpair instead of a pipe in BitTube

Bug: 6252830
Change-Id: Ia7a7b08409517214136261c05569dc5959a597ab
ui/BitTube.h
ui/DisplayEventReceiver.h
ui/SensorEventQueue.h
a1ec30ef2647fb7ee7ca1e0b8e089c42a082370c 10-Feb-2012 Yang Chuang <Yang_Chuang@asus.com> Add Japanese specific key codes

These keys are specific to Japanese hardware keyboard which can be
used by input method.

Patch ported from AOSP, with the addition of KANA.

Change-Id: I1474f0eb8971ed5d632822b1f9825c426f4817eb
ndroid/keycodes.h
9abe1ebc9575dc5a19bf1dfce6e9b02e03374457 27-Mar-2012 Daniel Lam <dalam@google.com> Fixed disconnect bug in SurfaceTexture

BufferQueue's disconnect could race with updateTexImage
where invalid buffers could be released. Additionally
fixed similar bug with setBufferCount. Tests were added
to stress the disconnect mechanism.

Change-Id: I9afa4c64f3e025984e8a9e8d924852a71d044716
ui/BufferQueue.h
ui/SurfaceTexture.h
0e1080f887bcd80c75910cabe7b2eca224bf739c 02-Apr-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: add context attach & detach"
74bed55fff0132be319bcd1703970516ae28b3a9 29-Mar-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: add context attach & detach

This change adds the detachFromContext and attachToContext methods to
SurfaceTexture. These methods allow the SurfaceTexture to switch from
one consumer GLES context to another. This change also includes a few
cleanups to the error return codes in updateTexImage.

Change-Id: I0df1eb599aa7b6f58f07431f242f8f09269559ed
ui/SurfaceTexture.h
851ef8f1bfbb164d61b1528a529a464f0a60dbaf 30-Mar-2012 Mathias Agopian <mathias@google.com> reduce IPC with BufferQueue

collapse setCrop, setTransform and setScalingMode to queueBuffer()
this ends up simplifying things quite a bit and reducing the numnber
of IPC needed per frame.

Change-Id: I3a13c07603abe4e76b8251e6380b107fde22e6d9
ui/BufferQueue.h
ui/ISurfaceTexture.h
ui/SurfaceTextureClient.h
9285a16450323d0e91513e2c270c2ac03c8b940c 29-Mar-2012 Jamie Gennis <jgennis@google.com> Merge "Refactored DummyConsumer"
b731ae01b15682a3326dc4145f614f919b2789b5 28-Mar-2012 Colin Cross <ccross@android.com> Move services/powermanager from frameworks/base to frameworks/native

Move services/powermanager into frameworks/native so audioflinger can
use it. Note that this is not the same as a PowerManagerService,
which is part of systemserver and handles turning the screen on and
off, etc. This is just a binder interface to allow taking wakelocks.

Change-Id: I6b6a8b41cdbad17e826fda45aab5f059f22fc64e
owermanager/IPowerManager.h
owermanager/PowerManager.h
9d61a28d72d85ac0460fb7fba9f85f8a955354c7 27-Mar-2012 Daniel Lam <dalam@google.com> Refactored DummyConsumer

DummyConsumer no longer uses a ProxyConsumerListener

Change-Id: I0a99428b3f9dae82cb47d5da3589de77653f3d7c
ui/DummyConsumer.h
87579669e088950692280f677a929b7652e350d1 27-Mar-2012 Jamie Gennis <jgennis@google.com> Merge "Added a DummyConsumer for use with BufferQueue."
f71c4ae136f7749b9dfdaa2dd64d771868eeeb2d 24-Mar-2012 Daniel Lam <dalam@google.com> Added a DummyConsumer for use with BufferQueue.

The DummyConsumer is a consumer that can connect to BufferQueue
that does nothing. It is required as BufferQueue checks
if a consumer is connected. Also fixes a bug where SurfaceTexture
was reusing old texture slots.

Bug: 6172739
Change-Id: I5e7a118dd4d07807ba4c763200242b5ee7d3412b
ui/BufferQueue.h
ui/DummyConsumer.h
0b94dcd03d8764eab7f1fb00f0f1f37904732aa1 26-Mar-2012 Glenn Kasten <gkasten@google.com> mv libcpustats from frameworks/base to /native

OK to lose history

Change-Id: I563fec271e0bc240e4a09a8b9647c7439badd85b
pustats/CentralTendencyStatistics.h
pustats/README.txt
pustats/ThreadCpuUsage.h
e1c61d3cc8458ce9a15d8109f728e60f5248939d 23-Mar-2012 Mathias Agopian <mathias@google.com> move ndk headers to frameworks/native

Change-Id: Ib740333753818ff8f8230ed009211b447e30cbee
ndroid/asset_manager.h
ndroid/asset_manager_jni.h
ndroid/bitmap.h
ndroid/configuration.h
ndroid/input.h
ndroid/keycodes.h
ndroid/looper.h
ndroid/native_activity.h
ndroid/native_window.h
ndroid/native_window_jni.h
ndroid/obb.h
ndroid/rect.h
ndroid/sensor.h
ndroid/storage_manager.h
ndroid/window.h
b0e76f456afaada43ddb0968bb37145219f90cd3 23-Mar-2012 Mathias Agopian <mathias@google.com> remove dependency of EGL on ndk header

Change-Id: Ia6e489b5b4f028864bdf54923e81f604710dd8ad
ui/SurfaceTextureClient.h
163d5a9fa742e6a39f058fb9ed726fc31f4ecb28 23-Mar-2012 Colin Cross <ccross@android.com> frameworks/native: move Zip* from libandroidfw to libutils

ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: Ib8c41134ccdec6d6aa8d49860f8dddef49a24783
tils/ZipFileCRO.h
tils/ZipFileRO.h
tils/ZipUtils.h
4639dcfb2a348ef3f627e7aa1fba07bb75d126e9 23-Mar-2012 Kenny Root <kroot@google.com> Add UniquePtr.h to frameworks/native

This is a copy of libcore's UniquePtr.h header which is used until we
get C++11 which has std::unique_ptr which is essentially the same.

Taken from libcore project at commit
3e6dd45baa0d7f9b4fa06f4ade76e088b59cc7bf

Change-Id: I7537b016f9eae33bfc4c57b24f86260909719ab8
tils/UniquePtr.h
de3b072b124110f0ed4ea5c1ffe4039cb8aee281 20-Mar-2012 Jamie Gennis <jgennis@google.com> Merge "libgui: have ST::updateTexImage check the GL ctx"
782cb13c12ea597288e60d6e90e6548c9b6237aa 20-Mar-2012 Jamie Gennis <jgennis@google.com> Merge "libgui: add BQ consumer buffer free notifications"
ce561372186c7549a8a5fe996ac5965cda087007 20-Mar-2012 Jamie Gennis <jgennis@google.com> libgui: have ST::updateTexImage check the GL ctx

This change adds a check to SurfaceTexture::updateTexImage to verify
that the current GL context is the same as the one that was used for
previous updateTexImage calls.

Change-Id: If02d2f787bcfdb528046dc9ddf6665f8a90e1bf4
ui/SurfaceTexture.h
fa5b40ebb8923133df12dc70591bfe35b3f1c9b3 15-Mar-2012 Jamie Gennis <jgennis@google.com> libgui: add BQ consumer buffer free notifications

This change adds a new callback for BufferQueue consumers to be notified
when the BufferQueue frees some or all of its buffers. This is needed
to retain SurfaceTexture behavior where all buffers would be freed when
the producer disconnects. This change also modifies the
SurfaceTextureGLToGLTest.EglDestroySurfaceUnrefsBuffers test to catch
when the buffers are not freed.

The implementation is a little complicated because it needs to avoid
circular sp<> references across what will be a binder interface (so wp<>
can't be used directly). It also needs to avoid the possibility of
locking the BufferQueue and consumer (e.g. SurfaceTexture) mutexes in
the wrong order.

This change also includes a few additional fixes and test cleanups.

Change-Id: I27b77d0af15cb4b135f4b63573f634f5f0da2182
ui/BufferQueue.h
ui/SurfaceTexture.h
0818b0921ef6cda07f41b56d2ef19b2849dfefd1 17-Mar-2012 Jeff Brown <jeffbrown@google.com> Add a simple work queue abstraction.

Makes it easy to schedule a bunch of work to happen in parallel.

Change-Id: Id9c0e52fc8b6d78d2b9ed4c2ee47abce0a01775c
tils/AndroidThreads.h
tils/WorkQueue.h
e6d77c593d1a25b45c23bf9292ec7ee09fc14b6e 16-Mar-2012 Jeff Brown <jeffbrown@google.com> Add traits to common utils data structures.

Many of our basic data structures are trivially movable using
memcpy() even if they are not trivially constructable, destructable
or copyable. It's worth taking advantage of this *ahem* trait.

Adding trivial_move_trait to String16 reduces appt running
time on frameworks/base/core/res by 40%!

Change-Id: I630a1a027e2d0ded96856e4ca042ea82906289fe
tils/BitSet.h
tils/KeyedVector.h
tils/RefBase.h
tils/SortedVector.h
tils/String16.h
tils/String8.h
tils/TypeHelpers.h
tils/Vector.h
599ebfd48d43933e2edcfd4f18a0b1a9a9d7ff38 16-Mar-2012 Andreas Huber <andih@google.com> Remove all traces of long obsolete OMXComponentBase class.

Change-Id: I749994fe1560363afc95beae45b66ea56a20caa8
edia/hardware/OMXPluginBase.h
642b9e58a3d2a41a5684ffd4c202b56355ce5843 15-Mar-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Move CameraParameters.h to frameworks/native."
8c511a9d0c1b3228c1be49ed2f4c42eb29eb9193 15-Mar-2012 Eino-Ville Talvala <etalvala@google.com> Move CameraParameters.h to frameworks/native.

CameraParameters.h is indirectly required to implement the Camera
HAL. Move it to frameworks/native.

Bug: 6171735
Change-Id: If4ccb273ea7ca79f54402ebc00febf1c3e59799f
amera/CameraParameters.h
b267579ba8dfe3f47d2a481c5a3c2254e3d565a1 23-Feb-2012 Daniel Lam <dalam@google.com> SurfaceTexture: Fully refactored from BufferQueue

SurfaceTexture and BufferQueue are separate objects.

Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
ui/BufferQueue.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
9f70b92f1bca0e09fdfdeec7be053f41271478ed 13-Mar-2012 James Dong <jdong@google.com> Copy one more file to /frameworks/native

o related-to-bug: 6044887

Change-Id: I920c487089eb258ada87603134f2597db6fe14e9
edia/hardware/MetadataBufferType.h
e56a5852713776c16a0a3d75f6e7c18abd94688d 12-Mar-2012 James Dong <jdong@google.com> Merge "Copied some headers from /frameworks/base to /frameworks/native to support PDK effort"
4d0f9674842e12311aa188254e2b6350d1540518 12-Mar-2012 Jeff Brown <jeffbrown@google.com> Merge "Expose the set of enabled tags."
334de520b0369215b7931fefa424fb92d295f0eb 12-Mar-2012 James Dong <jdong@google.com> Copied some headers from /frameworks/base to /frameworks/native to support PDK effort

o added some minor header include changes
o related-to-bug: 6044887

Change-Id: Ia8e7ba861c509a4fb688ab2ed1e81151a708861a
edia/hardware/HardwareAPI.h
edia/hardware/OMXPluginBase.h
edia/openmax/OMX_Audio.h
edia/openmax/OMX_Component.h
edia/openmax/OMX_ContentPipe.h
edia/openmax/OMX_Core.h
edia/openmax/OMX_IVCommon.h
edia/openmax/OMX_Image.h
edia/openmax/OMX_Index.h
edia/openmax/OMX_Other.h
edia/openmax/OMX_Types.h
edia/openmax/OMX_Video.h
e936584ac1216e4d23dc9edd963f9785a77bf6b0 12-Mar-2012 James Dong <jdong@google.com> Move II420ColorConverter.h to /frameworks/native/include/media/editor

o related-to-bug: 6044894

Change-Id: Ib8f5406e32bd6c190d65e4a2e014f73e759d4415
edia/editor/II420ColorConverter.h
45b80c69ad8057fde0c0a76f7da3a2183a2aab96 09-Mar-2012 Jeff Brown <jeffbrown@google.com> Expose the set of enabled tags.

This is used by the Java trace wrappers to avoid JNI overhead
when trace tags are disabled.

Also added a new tag for the input subsystem and view hierarchy.

Change-Id: Ia04a507e42a37b1d3bbb19859e6c07a92f4fe9aa
tils/Trace.h
bc48ce68e6d17bbf78ac44645808a432110d9a37 01-Mar-2012 Andreas Huber <andih@google.com> Instead of hardcoding OMX component names in our code, support

a config file instead.

Change-Id: I5835903ab9f1c4a22ccc605ca99ed966767adf57
tils/Vector.h
7a7524810a0950c1c2b18014a8f1c637275165c4 28-Feb-2012 Mathias Agopian <mathias@google.com> get rid of MemoryHeapPmem

MemoryHeapPmem is not used any longer. PMEM is not a supported
type of memory by the system anymore. a particular device might
use PMEM and need something like MemoryHeapPmem, in this case this
should be implemented in device specific code (HAL).

This will most likely break older no longer supported targets.

Change-Id: I434e4291219950018de8b793b0403bb2d92dd5cc
inder/MemoryHeapPmem.h
89d353a4c52197695f06e37267ade99dc627e7e0 28-Feb-2012 Mathias Agopian <mathias@google.com> move CursorWindow from libbinder to libandroidfw

Change-Id: I3b304e4f74e0d0ec8b20c57296c62449c9a0f792
inder/CursorWindow.h
eae59d2ea77ef57aab203fb185a880ce37ac38d6 23-Jan-2012 Daniel Lam <dalam@google.com> Removed dependecies between BufferQueue and SurfaceTexture

Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: I938e63e085128148c58d0e26c7213b30145c109f
ui/BufferQueue.h
ui/SurfaceTexture.h
015b8420414f3eb516b105103eccba8cdb448d79 27-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "libutils: add a system-wide tracing utility"
fbb16559168b88e30ffbe6d466f4c044366f503c 27-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "Revert "Removed dependecies between BufferQueue and SurfaceTexture""
90ac799241f077a7b7e6c1875fd933864c8dd2a7 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
ui/BufferQueue.h
ui/IGraphicBufferAlloc.h
ui/ISurface.h
ui/ISurfaceComposer.h
ui/ISurfaceComposerClient.h
ui/Surface.h
ui/SurfaceComposerClient.h
rivate/gui/LayerState.h
rivate/gui/SharedBufferStack.h
rivate/surfaceflinger/LayerState.h
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/IGraphicBufferAlloc.h
urfaceflinger/ISurface.h
urfaceflinger/ISurfaceComposer.h
urfaceflinger/ISurfaceComposerClient.h
urfaceflinger/Surface.h
urfaceflinger/SurfaceComposerClient.h
f91bb05132dccbb61a69351752d9ae47cc31f30d 26-Feb-2012 Mathias Agopian <mathias@google.com> split utils/threads.h into multiple headers

AndroidDefs.h - C/C++ enums and types
Mutex.h - Mutex class declaration
Condition.h - Condition class declaration
RWLock.h - RWLock class declaration
Thread.h - Thread class declaration
AndroidThreads.h - low-level thread creation functions
threads.h - includes all the above for backward source compatibility

Change-Id: Ia2f80c175333b59a41d1720985810bb2346e94cb
Note: implementations are still in Threads.cpp
tils/AndroidThreads.h
tils/Condition.h
tils/Mutex.h
tils/RWLock.h
tils/Thread.h
tils/ThreadDefs.h
tils/threads.h
864d2afbb3b8ffa17b408660624b384b518ef752 26-Feb-2012 Mathias Agopian <mathias@google.com> libagl shouldn't export anything

Change-Id: Ia823dbc56aab2a0b8a6063df4348fe6baac124c6
rivate/opengles/gl_context.h
9b10c47e112afc3600380895046a4a56e34cf6a8 27-Feb-2012 Daniel Lam <dalam@google.com> Revert "Removed dependecies between BufferQueue and SurfaceTexture"

This reverts commit a631399f71dbc7659d2f241968f85d337726ae61
ui/BufferQueue.h
ui/SurfaceTexture.h
32167056348f55609b896a5f6b15bd1dd42d8d19 27-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "Removed dependecies between BufferQueue and SurfaceTexture"
f64b1ca000e0a5bb176f4e53f568e48dd1ecc71a 23-Feb-2012 Jamie Gennis <jgennis@google.com> libutils: add a system-wide tracing utility

This change adds some utility functionality for doing userland tracing
into the kernel trace log.

Change-Id: Id0a8cee9ea515b1d8765afd1cecf472a88b4b9e8
tils/Trace.h
5f2165f9455d4893b581b73a67c5431f4344b47e 25-Feb-2012 Mathias Agopian <mathias@google.com> remove dependency on android_native{s_priv|buffer}.h

Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
ui/SurfaceTextureClient.h
rivate/ui/android_natives_priv.h
urfaceflinger/Surface.h
i/ANativeObjectBase.h
i/EGLNativeSurface.h
i/FramebufferNativeWindow.h
i/GraphicBuffer.h
i/android_native_buffer.h
i/egl/android_natives.h
870b8aa15cb5c722b5d8eb7726eaa5f1a7c23d69 25-Feb-2012 Mathias Agopian <mathias@google.com> remove libui dependency on libEGL

Change-Id: I1194f04085637d5c384e134967249430cc43b6ee
i/EGLUtils.h
ff615cc7a1cceedd705b0623b058c54669b29596 24-Feb-2012 Mathias Agopian <mathias@google.com> deprecate L_8, LA_88 and RGB_332 in sdk

re-add support for pixelformats L_8, LA_88 and RGB_332 in libui
for backward compatibility.

This may or may not fix 6058926

Bug: 6049685
Change-Id: Ic1b8b4cc994522f7fe664da64c0ef76b98bc6d53
i/PixelFormat.h
bd16dd1b3839ce39997020afa89f1aef6cda8c5f 23-Feb-2012 Jean-Baptiste Queru <jbq@google.com> am 32916f7a: am fc4215ee: am 2d03a93e: Merge "Xcode 4.3 compatibility checkin"

* commit '32916f7a22f2abf5c1e7021f44c2337ca172f2e5':
Xcode 4.3 compatibility checkin
333023884112259f145bb23c41a05211198d9792 23-Jan-2012 Daniel Lam <dalam@google.com> Removed dependecies between BufferQueue and SurfaceTexture

Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: Iff55e740e36a7f70c9f7a17ee7a5af38e3d21f0f
ui/BufferQueue.h
ui/SurfaceTexture.h
42e2458144778596281ea2c4a98ad671053234e0 22-Feb-2012 Mathias Agopian <mathias@google.com> remove libui's dependency on libpixelflinger

this also remove support for unused pixelformats.

Change-Id: I2c759a6d2daa740f3786ed62095def8047ae933d
i/PixelFormat.h
579c2b4dc12543f53cf3c885b4a8525cfe4a533d 19-Feb-2012 Al Sutton <al@funkyandroid.com> Xcode 4.3 compatibility checkin

The update compiler in Xcode 4.3 (and 4.4) requires lookups into dependant
bases of class templates to be qualified. This checkin fixes the issues
raised by the compiler by implementing the this-> recommendation from
the llvm page at http://clang.llvm.org/compatibility.html#dep_lookup_bases

Signed-off-by: Al Sutton <al@funkyandroid.com>
tils/KeyedVector.h
a3a38812087f7ac19bb5cc79ceb7b80384d6bd2e 18-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring.

step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
tils/Asset.h
tils/AssetDir.h
tils/AssetManager.h
tils/BackupHelpers.h
tils/ObbFile.h
tils/ResourceTypes.h
tils/StreamingZipInflater.h
tils/ZipFileCRO.h
tils/ZipFileRO.h
tils/ZipUtils.h
80c39180425d6053ca536f68351bee3c5a351cc4 18-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring.

First step. Move libui includes to their new home: androidfw.

Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
i/Input.h
i/InputTransport.h
i/KeyCharacterMap.h
i/KeyLayoutMap.h
i/Keyboard.h
i/KeycodeLabels.h
i/PowerManager.h
i/VirtualKeyMap.h
94d0070b96f8635428bf1ee9d74bbe87fea59e3e 15-Feb-2012 Jeff Brown <jeffbrown@google.com> Merge "Clean up InputChannel file descriptor data type."
1eea29f48dd63dcfee106ae5fabe5740bf766c6e 15-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "Refactored query function from SurfaceTexture into BufferQueue"
9491e81ff6a3e29ea31c9582ee1c6ab23c0e3e54 15-Feb-2012 Jeff Brown <jeffbrown@google.com> Clean up InputChannel file descriptor data type.

File descriptors are ints.

Change-Id: Ie36733bf36ddfeaa9a09ef6ebd7bd2f1788f5d27
i/InputTransport.h
87548ee2b380c1e76086d21047854fa3425a8f06 19-Jan-2012 Glenn Kasten <gkasten@google.com> Update comments

We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
tils/KeyedVector.h
a18829ab231384858456a8a67b06a3f1e37d2794 13-Feb-2012 Jeff Brown <jeffbrown@google.com> Accurately track the sequence numbers of batched events.

Instead of sending finished signals immediately when appending to
a batch, record the chain of sequence numbers that were part of
the batch and then send finished signals all at once when done.
This change helps the dispatcher keep track of the true state
of the application and can improve ANR detection slightly.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420
Change-Id: I463c2221e2aa8fdf1c3d670c18e39e59ab69b0db
i/InputTransport.h
0a63adaff2ffa945f5e105ee39aec9dcf22954e7 13-Feb-2012 Jeff Brown <jeffbrown@google.com> Enable deferred input messages to be batched.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420
Change-Id: I6874d2128e880a35c6c33890c858cc6ee22af0fd
i/InputTransport.h
f0490c94d01aa7536e4fd3bdf6a888099ba9a5c6 07-Feb-2012 Jeff Brown <jeffbrown@google.com> Implement batching of input events on the consumer side.

To support this feature, the input dispatcher now allows input
events to be acknowledged out-of-order. As a result, the
consumer can choose to defer handling an input event from one
device (because it is building a big batch) while continuing
to handle input events from other devices.

The InputEventReceiver now sends a notification when a batch
is pending. The ViewRoot handles this notification by scheduling
a draw on the next sync. When the draw happens, the InputEventReceiver
is instructed to consume all pending batched input events, the
input event queue is fully processed (as much as possible),
and then the ViewRoot performs traversals as usual.

With these changes in place, the input dispatch latency is
consistently less than one frame as long as the application itself
isn't stalled. Input events are delivered to the application
as soon as possible and are handled as soon as possible. In practice,
it is no longer possible for an application to build up a huge
backlog of touch events.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: I42c01117eca78f12d66d49a736c1c122346ccd1d
i/InputTransport.h
6cdee9831d8d2bf8393c2d130cbdc2eced125e15 04-Feb-2012 Jeff Brown <jeffbrown@google.com> Rewrite input transport using sockets.

Since we will not longer be modifying events in place, we don't need
to use an ashmem region for input. Simplified the code to instead
use a socket of type SOCK_SEQPACKET.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
i/InputTransport.h
a94f129a7bbaa8ea45c50e49ba3e6127ca2a15ec 10-Feb-2012 Dianne Hackborn <hackbod@google.com> Some hardening of isolated processes by restricting access to services.

Services now must explicitly opt in to being accessed by isolated
processes. Currently only the activity manager and surface flinger
allow this. Activity manager is needed so that we can actually
bring up the process; SurfaceFlinger is needed to be able to get the
display information for creating the Configuration. The SurfaceFlinger
should be safe because the app doesn't have access to the window
manager so can't actually get a surface to do anything with.

The activity manager now protects most of its entry points against
isolated processes.

Change-Id: I0dad8cb2c873575c4c7659c3c2a7eda8e98f46b0
inder/BinderService.h
inder/IServiceManager.h
b856052c00dfef70d0957482c72c2979ffc4733a 31-Jan-2012 Daniel Lam <dalam@google.com> Refactored query function from SurfaceTexture into BufferQueue

Change-Id: Id1cb6cc38d01edb4fcfcad867c5a7693bdcc3ab1
ui/BufferQueue.h
ui/SurfaceTexture.h
d94bb5c8834d134adaa0bf382fb7bf84e918e8f7 09-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "Refactored ISurfaceTexture calls from SurfaceTexture into BufferQueue."
b8a2e98cd7edbe7513543670c94f6b5efa74462f 08-Feb-2012 Romain Guy <romainguy@google.com> Preliminary support for clipRect(Rect, Op)

This adds basic support for clip regions. It is currently disabled at compile
time. Enabling clip regions will require setting up a stencil buffer.

Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
i/Region.h
6b091c53000c843211c218ce40287a7edca9bc63 23-Jan-2012 Daniel Lam <dalam@google.com> Refactored ISurfaceTexture calls from SurfaceTexture into BufferQueue.

Change-Id: I514f6b802f6b49c9ae27bed37bf0b9d23da03c9a
ui/BufferQueue.h
ui/SurfaceTexture.h
a11edd8dc179e9e20a80c18b6a28b44973dadcd0 03-Feb-2012 Amith Yamasani <yamasani@google.com> Merge "Multi-user - 1st major checkin"
4e975bb488bb3947703e95cb33a4838adda680f7 04-May-2011 Amith Yamasani <yamasani@google.com> Multi-user - 1st major checkin

Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
inder/IPCThreadState.h
064b68d1bc6eaef1722fb0fe033a762e439365fa 03-Feb-2012 Mathias Agopian <mathias@google.com> Merge "separate transactions from updates"
a1eee39f581249ae137ce3cb372fbf92ed1344bf 02-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Thread::getTid returns pid_t gettid() after run"
99ce5cdeb383216dee95af4d90e47406b0948ea1 01-Feb-2012 Mathias Agopian <mathias@google.com> separate transactions from updates

with this changes, SF transactions are handled as soon as possible
but do not trigger updates. the update is delayed until the next
vsync.

this allows us to work much better without requiring triple-buffering.

Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
ui/DisplayEventReceiver.h
baf1c68c749e872a1278bcb2f401f7a0a3025841 01-Feb-2012 Mathias Agopian <mathias@google.com> Merge "fix an issue with vsync event delivery"
3cf199aef6250552555344944c3e3a6e4ab05f92 01-Feb-2012 Mathias Agopian <mathias@google.com> fix an issue with vsync event delivery

vsync events were sometimes delivered to connected
client who didn't request them. this happened if
another client requested the delivery and that client
was first in the client list.

also fix the vsync test which didn't request any events as
well as DisplayEventReveiver documentation which was misleading
about the necessity to request vsync events.

Change-Id: Ie990fda3f337f8f0042745c4b2cde67936c45686
ui/DisplayEventReceiver.h
60b133efc357df4da1a1ec55a4a83241a6635f46 31-Jan-2012 Dianne Hackborn <hackbod@google.com> aapt now sorts the strings in the resource string pool.

In our current environment with very many translations, this can
save a lot of RAM -- for example over 200K in Gmail just by sorting
the strings in the Gmail .apk (not the framework).

Also add a new aapt command to print the contents of the resource
table string pool.

Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
tils/ResourceTypes.h
907e08f2de1e904b74806338ea299c6f38b54848 26-Jan-2012 Dianne Hackborn <hackbod@google.com> Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc.

Change-Id: I519d6cdc527a402d93b98df17a64fc1da52ad598
tils/ResourceTypes.h
5b11920b1ac845fa6d5890e0e107c576b57a4c4a 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)

Change-Id: I26f76452ac49e2890b14d133c065493d8df0fb4a
tils/ResourceTypes.h
00469f19408b3af36c3bf0fc0d2c07157f546bb9 12-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOG() to (IF_)ALOG()

Change-Id: If49c81a2793182771c6160fbca93905daa6f44c1
inder/CursorWindow.h
ba699cb0f7f95f665593541d2b37e12fb10b85f1 12-Jul-2011 Glenn Kasten <gkasten@google.com> Thread::getTid returns pid_t gettid() after run

This is needed when the parent or any other thread besides the child
needs access to the child's kernel tid.

Change-Id: Ib148505913eb78314cfd76657c30d7b20663dffd
tils/threads.h
fcc24a5b4de5cd53e77bba75db2f87f7c5d2448e 14-Jan-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix compilation with Clang."
97470659e99ea0edb7154a6f0730c786bc881762 13-Jan-2012 Evgeniy Stepanov <eugenis@google.com> Fix compilation with Clang.

warning: extraneous template parameter list in template specialization
template<>

Change-Id: If3e3e1d06a018343b40ac0984dfd9ecc12629f8d
tils/TypeHelpers.h
55ef343331f5efbfe3e01bc9993d94faea236048 07-Jan-2012 Mathias Agopian <mathias@google.com> remove dead/usnused code

Change-Id: I6fa2bc6ee01790abd2c1533f043d61a5e5c8d26e
i/GraphicLog.h
e6f43ddce78d6846af12550ff9193c5c6fe5844b 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
tils/GenerationCache.h
a19954ab377b46dbcb9cbe8a6ab6d458f2e32bca 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
tils/ResourceTypes.h
99c520a069c4afceac4676279e5d658e49a4cb52 15-Dec-2011 Joe Onorato <joeo@google.com> Add a new ui mode for "appliance"

The idea is that this is a device which is more-or-less headless. It
might have some limited interaction capabilities, but it's not something
that you want to rely on having.

Change-Id: Ib92f53a120bf83de781728011721a4859def7d9f
tils/ResourceTypes.h
b634cd3f138bf4df6895cb91edf0aefd120e5521 09-Dec-2011 Romain Guy <romainguy@google.com> Merge "GenerationCache::get would return a random value instead of NULL Bug #5401917"
870165d2a20d9be2fd7d8420ae2dbdcecda3c666 09-Dec-2011 Romain Guy <romainguy@google.com> GenerationCache::get would return a random value instead of NULL
Bug #5401917

This was causing a ton of random crashes in apps.

Change-Id: I9069a060824ec89115cd3bcd38beaeb9ecc4488e
tils/GenerationCache.h
478ae5eb5a0047e1b2988c896cff6363b455ee50 07-Dec-2011 Mathias Agopian <mathias@google.com> Improve the VSYNC api a bit.

- add the ability to set the vsync delivery rate, when the rate is
set to N>1 (ie: receive every N vsync), SF process' is woken up for
all of vsync, but clients only see the every N events.

- add the concept of one-shot vsync events, with a call-back
to request the next one. currently the call-back is a binder IPC.

Change-Id: I09f71df0b0ba0d88ed997645e2e2497d553c9a1b
ui/DisplayEventReceiver.h
ui/IDisplayEventConnection.h
a4fbecd1198899a3a4e55795406a06e7c111b13e 30-Nov-2011 Mathias Agopian <mathias@google.com> am 55d3880e: am bb1e7d43: Merge changes I7e973a35,Ib3386fcc into ics-mr1

* commit '55d3880eed3450748eb7b97281e030902ee29c2a':
SurfaceTexture: add EGL_KHR_fence_sync option
SurfaceTexture: add a blit-to-FBO test
27d22dc8625d4ccc2304a125de320f7ac49e2552 30-Nov-2011 Jamie Gennis <jgennis@google.com> am c040e1e7: am 6f1dd757: Merge "SurfaceMediaSource: use the vid enc usage bit" into ics-mr1

* commit 'c040e1e77923d81050f2d3dbdac5d07e01be72f6':
SurfaceMediaSource: use the vid enc usage bit
0c740a46d2877cedc3315e57ab967019240f5a15 30-Nov-2011 Mathias Agopian <mathias@google.com> Merge changes I7e973a35,Ib3386fcc into ics-mr1

* changes:
SurfaceTexture: add EGL_KHR_fence_sync option
SurfaceTexture: add a blit-to-FBO test
e06a1748a48317adfb1bbe4ae4f49164cba03268 30-Nov-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceMediaSource: use the vid enc usage bit" into ics-mr1
86edf4f6470ee0f108bf40d3c1d23bf0a78c9c38 14-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add EGL_KHR_fence_sync option

This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.

Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
ui/SurfaceTexture.h
47c70d98d42d3cfe3cdf07ee6b3c405e7d2408b3 29-Nov-2011 Jeff Brown <jeffbrown@google.com> am c339fe30: am be6ab576: Merge "Fix application launch shortcuts." into ics-mr1

* commit 'c339fe302bc5083f0a110569eec06676be511088':
Fix application launch shortcuts.
d0566bc26fcf6ca396118701fa11900b627f2c09 18-Nov-2011 Mathias Agopian <mathias@google.com> Add support for sending VSYNC events to the framework

use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.

Bug: 1475048
Change-Id: Ia720f64d1b950328b47b22c6a86042e481d35f09
ui/DisplayEventReceiver.h
ui/IDisplayEventConnection.h
urfaceflinger/ISurfaceComposer.h
439cf8576d3b846c0aa0944d84372259bf075d51 29-Nov-2011 Mathias Agopian <mathias@google.com> Fix build.

Revert "Add support for sending VSYNC events to the framework"

This reverts commit f3918c5bd4bc9f02f74da42995564150ca2dd382.

Change-Id: I998e3e1aa3fa310829ae973b64fe11b01f6f468f
urfaceflinger/ISurfaceComposer.h
9ee44c8f9456a9fc49d78b24e8cdeb9efa632c41 28-Nov-2011 Jeff Brown <jeffbrown@google.com> Fix application launch shortcuts.

Improved quick launch bookmarks to support category-based shortcuts
instead of hardcoding package and class names for all apps.

Added a set of Intent categories for typical applications on the
platform.

Added support for some of the HID application launch usages to
reduce reliance on quick launch for special purpose keys. Some
keyboard vendors have hardcoded launch keys that synthesize
"Search + X" type key combos. The goal is to encourage them
to stop doing this by implementing more of HID.

Bug: 5674723
Change-Id: I79f1147c65a208efc3f67228c9f0fa5cd050c593
i/KeycodeLabels.h
461afeb9fde149f9455acbadf1257d08d33e8eb3 18-Nov-2011 Mathias Agopian <mathias@google.com> Add support for sending VSYNC events to the framework

use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.

Bug: 1475048
Change-Id: If4126023fc9c067e56087ec7d16a8fd542ce1794
urfaceflinger/ISurfaceComposer.h
41f673c9b3aac0d96e41c928845c39186d565212 18-Nov-2011 Mathias Agopian <mathias@google.com> split ComposerService out of SurfaceComposerClient.h

Change-Id: I1eb691f7ca263d5895d871ab675bb5826e0323c6
rivate/gui/ComposerService.h
urfaceflinger/SurfaceComposerClient.h
48585f35c7f0ef0dbe7eb67bed90b79e5fd426f6 24-Nov-2011 Jeff Brown <jeffbrown@google.com> Use sized integer typedefs in hash_type specializations.

Change-Id: I3f9e004db2f3be1cb43a885c3ae142f251fd6845
tils/TypeHelpers.h
66fbde305047b7a606d083a9ec8994fa693cc7d7 15-Nov-2011 Jeff Brown <jeffbrown@google.com> Add a basic hashtable data structure, with tests!

The basic hashtable is intended to be used to support a variety
of different datastructures such as map, set, multimap,
multiset, linkedmap, generationcache, etc.

Consequently its interface is fairly primitive.

The basic hashtable supports copy-on-write style functionality
using SharedBuffer.

The change introduces a simple generic function in TypeHelpers for
specifying hash functions. The idea is to add template
specializations of hash_type<T> next to the relevant data structures
such as String8, String16, sp<T>, etc.

Change-Id: I2c479229e9d4527b4fbfe3b8b04776a2fd32c973
tils/BasicHashtable.h
tils/TypeHelpers.h
185a0a0420f54f9588ec1c7230313023a7a2259b 22-Nov-2011 Jamie Gennis <jgennis@google.com> am c2597295: am 53cf2020: Merge changes I37fd43b5,I91eb29db,I0491ce35 into ics-mr1

* commit 'c25972950c2ea62fb085524dbe737c2bf0f08f4a':
SurfaceTexture: fix a couple tests
EGL: default to swap interval 1
SurfaceTexture: clean up some tests
b7d87c40ef3f922fb10f6a4f24e6e1437ab3c7ae 22-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceMediaSource: use the vid enc usage bit

This change makes SurfaceMediaSource add the VIDEO_ENC usage bit when
allocating its GraphicBuffers rather than the HW_TEXTURE bit.

Change-Id: Ie20e225c894fdbc31cad6bb82b3b64c7e98074eb
i/GraphicBuffer.h
59769469e4b9b2d8b12c020eb44b030b3927a50b 20-Nov-2011 Jamie Gennis <jgennis@google.com> EGL: default to swap interval 1

This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.

Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
ui/SurfaceTexture.h
8bee68fac2dba0a72a58a243601d5d7d12e116e6 19-Nov-2011 Mathias Agopian <mathias@google.com> am d0df44b5: am 4d71053b: Merge "attempt to fix bug 5313580" into ics-mr1

* commit 'd0df44b5c979e00a19187cea35768ba26557e447':
attempt to fix bug 5313580
a36bcd53ac075054bb39ef506687f4daaf9bac6b 18-Nov-2011 Mathias Agopian <mathias@google.com> attempt to fix bug 5313580

the working theory here is that a Surface object has become non-promotable
because it lost its last reference; later Surface::readFromParcel is called
the previous surface is found in the cache, but can't be promoted. this causes
a new Surface object to be created which will promptly try to connect to the
CPU_API -- this in turn will fail because the previous (now dead) surface is
still connected.

To fix this, we make sure to disconnect from the SurfaceTexture when
Surface[TextureClient] is destroyed.

Change-Id: I422234868a05d7b7d283e9d5a85f7ab79e65d8a9
ui/SurfaceTextureClient.h
ccf5b9febc9486c67ace40fbfc53b49eadf2c159 17-Nov-2011 Jamie Gennis <jgennis@google.com> am 7765fc65: am fd6b64f6: Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1

* commit '7765fc651a9519dd2f0ac9d3374a50e9865c5c99':
SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
c1ef3c4d7d008b04331c56490ec755f040b3e57a 16-Nov-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1
0c5ccc081a0214074a2aac886aa1581faab51f08 16-Nov-2011 Jeff Brown <jeffbrown@google.com> am 4c0e0dd2: am 3e7497b4: Merge "Eliminate hw.keyboards system properties." into ics-mr1

* commit '4c0e0dd29dcce33e7521b11d01d21d9431f3b264':
Eliminate hw.keyboards system properties.
882b0a59d834be5b595713079f31a2389c32fdda 16-Nov-2011 Jeff Brown <jeffbrown@google.com> Eliminate hw.keyboards system properties.

Stop using system properties to publish information about
the key character map path. Instead, we can retrieve it
on demand by asking the window manager.

It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.

Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
i/Input.h
i/KeyCharacterMap.h
i/Keyboard.h
a929748ddb67cbece3337c7fda7877fdeb973aa4 10-Nov-2011 Sunita Nadampalli <sunitan@ti.com> SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call

Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.

Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.

This is fixed by checking all the free slots and returning the oldest buffer.

Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
ui/SurfaceTexture.h
4e8650d546ea05395c12655b77d180c85a5b56b2 15-Nov-2011 Jeff Brown <jeffbrown@google.com> Merge "Clean up GenerationCache."
8c11963dda80d4add300520a8863bed39231825d 14-Nov-2011 Mathias Agopian <mathias@google.com> am 738d8cae: am c93a151f: Merge "Define, document, and test the behavior of very large SurfaceTextures" into ics-mr1

* commit '738d8cae2239d194429676f2889cfae3c8f7ba08':
Define, document, and test the behavior of very large SurfaceTextures
b4293fe4081d899446cf0b782da041d4af55d2f9 12-Nov-2011 Jeff Brown <jeffbrown@google.com> Clean up GenerationCache.

Use const references to keys and values where appropriate to avoid
copying them unnecessarily.

Deleted some dead code.

Simplified a few pieces that were doing unnecessary redundant work.

Change-Id: Ib2145b7094a40db2d679e05dafe050fe1e87b846
tils/GenerationCache.h
194c76c0477189700fda068e19b953b1d9af201a 10-Nov-2011 Mathias Agopian <mathias@google.com> Define, document, and test the behavior of very large SurfaceTextures

updateTexImage() now throws a runtime exception when its native
counterpart fails

Bug: 5506633

Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
ui/SurfaceTexture.h
c17f56fdf11d5c5207d02d457692a40252aa3f34 07-Nov-2011 Jeff Brown <jeffbrown@google.com> am 88061d6b: am 5462bc63: Fix a leak in Parcel::writeBlob.

* commit '88061d6b38cfb4bf374039846b753a3b21ac61e1':
Fix a leak in Parcel::writeBlob.
efd912c05c0ef550a1c5ba7a14281261f6a0f9f4 05-Nov-2011 Jeff Brown <jeffbrown@google.com> am 5462bc63: Fix a leak in Parcel::writeBlob.

* commit '5462bc6318b4b70e7a58c66994e2bd79f59d9739':
Fix a leak in Parcel::writeBlob.
93ff1f985e233fe04412a65041e977c9f0c21f5b 05-Nov-2011 Jeff Brown <jeffbrown@google.com> Fix a leak in Parcel::writeBlob.

Was mistakenly assuming that Parcel::writeFileDescriptor took
ownership of the fd that was passed in. It does not!
Added some comments and a default parameter to allow the caller
to specify whether it wishes the Parcel to take ownership.

Bug: 5563374
Change-Id: I5a12f51d582bf246ce90133cce7690bb9bca93f6
inder/Parcel.h
7fbb39960e5af2319aeed653ee07751762d6bd8a 03-Nov-2011 Jamie Gennis <jgennis@google.com> am 236aea35: Merge changes Ibc99cb1c,Ie1f4f6f8 into ics-mr1

* commit '236aea3579787961fdd41d87574760b63323c0c1':
BlobCache: implement cache serialization
BlobCache: remove the mutex locking
0e1bc174293d4802f06641187dc5bf632f4e938a 13-May-2011 Jamie Gennis <jgennis@google.com> BlobCache: implement cache serialization

This change adds serialization and deserialization functionality to
BlobCache, conforming to the Flattenable interface.

Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
tils/BlobCache.h
93ca6fb91c613c7dfa287571f32c5c44a797961f 31-Oct-2011 Jamie Gennis <jgennis@google.com> BlobCache: remove the mutex locking

This change removes the mutex from the BlobCache class. The caller must
be responsible for thread synchronization in order to properly implement
the Flattenable interface, which is coming soon. Otherwise would be the
potential for the cache contents to change between the call to the
getFlattenedSize and flatten methods. Because the caller must do this
synchronization anyway there's no reason to also some synchronization
inside BlobCache.

Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
tils/BlobCache.h
7796e962da502e0adaff0d407023f731a83a422f 26-Oct-2011 Mathias Agopian <mathias@google.com> Merge "Rename SensorChannel to BitTube"
9f760150f6e0f39b9923cfdc875373606839ee00 12-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/141576

Bug: 5449033
Change-Id: I42575e7c29cf1c0f465c357a5c97ab118df6f473
inder/CursorWindow.h
e27d62bbf24272d72fcbad5e6f8b69608151205b 20-Oct-2011 Jeff Brown <jeffbrown@google.com> Use libcorkscrew for stack unwinding.

Change-Id: Iee1ee5a2018ab8cfc1ce12ec2a124809245eaa02
tils/CallStack.h
5cae0d0699a169e468fff3e21165f35db12f2cde 21-Oct-2011 Mathias Agopian <mathias@google.com> Rename SensorChannel to BitTube
ui/BitTube.h
ui/ISensorEventConnection.h
ui/SensorChannel.h
ui/SensorEventQueue.h
818fb243572f8e1f408ba9fc35ef61bbedbd9ce1 19-Oct-2011 Dave Burke <daveburke@google.com> am 70ac412b: Merge "Add a LayerScreenshot" into ics-mr0

* commit '70ac412b2fe7be2507189a9fdfb30c43b36d56ac':
Add a LayerScreenshot
118d0245ee0a3b107055782aa8b555404b6f0280 14-Oct-2011 Mathias Agopian <mathias@google.com> Add a LayerScreenshot

A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Make sure to call compositionComplete() after rendering into a FBO.

Bug: 5446982, 5467587, 5466259
Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
urfaceflinger/ISurfaceComposer.h
7731f4eb63a128b31484d4014c18e74c6a32c18a 18-Oct-2011 Mathias Agopian <mathias@google.com> am 9a0732af: Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0

* commit '9a0732af1bd96a7d8247dee124a7da389137a52f':
SensorManager reconnects to sensor service when the later dies
0ee55fd4e51bb340587730a68f4b52cce288d97b 18-Oct-2011 Mathias Agopian <mathias@google.com> Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0
cdec8f01aae14ed59fbc57cb2ce97a6602f4b9a1 17-Oct-2011 Mathias Agopian <mathias@google.com> am 840b8a67: Revert "Add a LayerScreenshot"

* commit '840b8a678537519c27ddf2f818494eaa20a135d4':
Revert "Add a LayerScreenshot"
090cb44b945bfe2711344a5331814bd6412ab437 17-Oct-2011 Elliott Hughes <enh@google.com> Merge branch 'master' of ssh://android-git:29418/platform/frameworks/base
cb2de7182ee689cdb77242474def26938e852bf3 17-Oct-2011 Jamie Gennis <jgennis@google.com> Merge changes I4e5ff00c,Id5e3ca1d,I97cbba61

* changes:
SurfaceFlinger: Remove display freezing code
SurfaceFlinger: add some layer update tests
SurfaceFlinger: make sync transactions explicit
c33f784c4b5f4a30049cda99a23c9aefb8b9c49e 17-Oct-2011 Mathias Agopian <mathias@google.com> am 57337eb7: Merge "Add a LayerScreenshot" into ics-mr0

* commit '57337eb78e65c160fb9c46a01e04c476d1bfdca1':
Add a LayerScreenshot
e9800c83114988b6f8cc25bb9d508ebb322f9903 17-Oct-2011 Mathias Agopian <mathias@google.com> Revert "Add a LayerScreenshot"

This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
urfaceflinger/ISurfaceComposer.h
1a2b83a17d3bdb2440b8b5b96136f7916a5528b5 17-Oct-2011 Mathias Agopian <mathias@google.com> SensorManager reconnects to sensor service when the later dies

if system process ever restarted, processes using a SensorManager
would loose the ability to use it, resulting to a crash.
we now listen for sensor service death and reconnected if necessary.

Bug: 5445240
Change-Id: Ia47f8b26cdcecb729fa22bf11d55e10fcaef8cfc
ui/SensorManager.h
a402c4c9913cfbc6c3da21719c57a93a11f091f0 15-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceFlinger: Remove display freezing code

This change removes the dead code from SurfaceFlinger that resulted from
disabling support for freezing the display.

Change-Id: I4e5ff00c94b4c7a79af2f65c9850c135210068ed
urfaceflinger/ISurfaceComposer.h
28378392fd5aa3e0a392c9eb64634055678c3987 13-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceFlinger: make sync transactions explicit

This change enables a layer or orientation update transaction sent to
SurfaceFlinger to explicitly request a synchronous transaction.

Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
urfaceflinger/ISurfaceComposer.h
urfaceflinger/SurfaceComposerClient.h
f171ab6da9cf9793093e50947aacdab8f2b0c9b2 14-Oct-2011 Mathias Agopian <mathias@google.com> Add a LayerScreenshot

A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Bug: 5446982
Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
urfaceflinger/ISurfaceComposer.h
3e2fb7056ab4f459c63c6204d60abd537adf8442 13-Oct-2011 Jeff Brown <jeffbrown@google.com> Deprecate local-only CursorWindows.

There is no difference and has never really been a difference
between local-only and remotable CursorWindows. By removing the
distinction officially in the API, we will make it easier to
implement CrossProcessCursor correctly. CrossProcessCursor
is problematic currently because it's not clear whether a call
to getWindow() will return a local-only window or a remotable window.
As a result, the bulk cursor adaptor has special case handling
for AbstractWindowedCursors vs. ordinary CrossProcessCursors
so that it can set a remotable window before the cursor fills it.
All these problems go away if we just forget about local-only
windows being special in any way.

Change-Id: Ie59f517968e33d0ecb239c3c4f60206495e8f376
inder/CursorWindow.h
0d602e072cdc03b08d8472e84536bc277a62c01f 12-Oct-2011 Romain Guy <romainguy@google.com> Merge "Reduce the size of libhwui by 50%"
5c78b6861fd4c9246cc88d37178a5567fb668f5b 12-Oct-2011 Romain Guy <romainguy@google.com> Reduce the size of libhwui by 50%

This change removes unnessary symbols. All symbols are hidden by
default, public APIs with exported symbols are explicitly marked
with ANDROID_API.

Change-Id: I692fde432a86c12108de1cfd1f6504919a7d5f3f
tils/Singleton.h
a799380eea309d85a68836a1e947f45636c2cfd4 12-Oct-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceFlinger: update orientation via transactions" into ics-mr0
b8d69a55f1c187a35ac41e69de63251f5501b6f4 11-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceFlinger: update orientation via transactions

This change merges the ISurfaceComposer::setOrientation functionality
into ISurfaceComposer::setTransactionState. It enables the window
manager to atomically update both the display orientation and the
position and size of the windows in a single transaction with
SurfaceFlinger.

Bug: 5439574
Change-Id: I18a8ccc564d7d760ef8afb2d015ccdb7a7963900
urfaceflinger/ISurfaceComposer.h
urfaceflinger/SurfaceComposerClient.h
ec4e0063a1c5cc6e01472cc2a9d27609ce3827d7 10-Oct-2011 Jeff Brown <jeffbrown@google.com> Use ashmem for CursorWindows.
Bug: 5332296

The memory dealer introduces additional delays for reclaiming
the memory owned by CursorWindows because the Binder object must
be finalized. Using ashmem instead gives CursorWindow more
direct control over the lifetime of the shared memory region.

The provider now allocates the CursorWindows and returns them
to clients with a read-only protection bit set on the ashmem
region.

Improved the encapsulation of CursorWindow. Callers shouldn't
need to care about details like how string fields are allocated.

Removed the compile-time configuration of string and numeric
storage modes to remove some dead weight.

Change-Id: I07c2bc2a9c573d7e435dcaecd269d25ea9807acd
inder/CursorWindow.h
de27227026e01c26a9debef77e4e268f242e713e 07-Oct-2011 Jeff Brown <jeffbrown@google.com> Fix regression in CursorWindow.copyStingToBuffer.
Bug: 5332296

Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
tils/Unicode.h
cc0bf53f214d8c9029ce27ac3985dc5c18d5130a 06-Oct-2011 Jeff Brown <jeffbrown@google.com> Clean up CursorWindow code.
Bug: 5332296

The code is functionally equivalent, but a little more efficient
and much easier to maintain.

Change-Id: I90670a13799df05831843a5137ab234929281b7c
inder/CursorWindow.h
7746cc318829358bb2c4dc0a03d40a7856a6d13e 04-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix handling of "allow fds" state.

Didn't take into account nesting of bundles. Boo.

Change-Id: Ic8cf21ad8d6f4938a3e105128624c9d162310d01
inder/Parcel.h
5707dbf15d0b44c88fbaa6dd271097f2d42932e0 24-Sep-2011 Jeff Brown <jeffbrown@google.com> Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: If385a66adf4c6179a0bb49c0e6d09a9567e23808
inder/Parcel.h
8938ed2c8e906fc332301b64787728d4d34da571 29-Sep-2011 Dianne Hackborn <hackbod@google.com> Add mechanism for Parcel to not allow FDs to be written to it.

This is to help implement issue #5224703.

Change-Id: I026a5890495537d15b57fe61227a640aac806d46
inder/Parcel.h
tils/Errors.h
fb1b5a2f333800574b0da435d1200cf9b13d723f 28-Sep-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: parameterize the texture target

This change adds a hack to allow Android Browser to use a SurfaceTexture
to stream RGBA images to a GL_TEXTURE_2D texture object.

Change-Id: Idb90064d5d4b920959ef3be7451362ac5012460e
ui/SurfaceTexture.h
fa28c35c21d1bf8b38f541758c291bc17a2d7270 17-Sep-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add name support

This change adds support for setting a string that can be used to
identify a SurfaceTexture object in log messages.

Change-Id: Ib4ee085f36c8830dc964c05ef1654f5a55dfcd60
ui/SurfaceTexture.h
21230c6410bdab13cd2bd274da54b1e4061b6035 21-Sep-2011 Jeff Brown <jeffbrown@google.com> Handle orientation changes more systematically.
Bug: 4981385

Simplify the orientation changing code path in the
WindowManager. Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out. For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.

Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.

Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes. The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.

Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise. We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.

Delete dead code related to animFlags.

Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened. We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.

Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
urfaceflinger/ISurfaceComposer.h
000e95e7ebf1a60bbb7fda604b54092f45c87f89 20-Sep-2011 Mathias Agopian <mathias@google.com> fix the float Rect in OpenGLRenderer to handle NANs

- we want functions like isEmpty() to return true if NANs are
involved in the Rect

- also clean-up the intersect familly of calls

- minor cleanup in the int32_t Rect as well

These played a role in http://b/5331198.

Bug: 5331198

Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
i/Rect.h
1d60b9629c022811e5efca71eb4d03f8b16a4cb0 15-Sep-2011 Andreas Huber <andih@google.com> A new API "androidGetThreadPriority"

Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
tils/threads.h
73aaf0d8d22fa18e9336bdfcb97a01a242d17a23 14-Sep-2011 Jeff Brown <jeffbrown@google.com> Velocity Tracker II: The Revenge of Velocity Tracker
Bug: 5265529

Rewrote the velocity tracker to fit a polynomial curve
to pointer movements using least squares linear regression.
The velocity is simply the first derivative of this polynomial.

Clients can also obtain an Estimator that describes the
complete terms of the estimating polynomial including
the coefficient of determination which provides a measure
of the quality of the fit (confidence).

Enhanced PointerLocation to display the movement curve predicted
by the estimator in addition to the velocity vector.

By default, the algorithm computes a 2nd degree (quadratic)
polynomial based on a 100ms recent history horizon.

Change-Id: Id377bef44117fce68fee2c41f90134ce3224d3a1
i/Input.h
137c3c549504a1bf52b85aa983c97f10533c7083 10-Sep-2011 Jeff Brown <jeffbrown@google.com> Tweak VelocityTracker.
Bug: 5265529

Calculate the velocity using the most recent touch sample as the
point of reference instead of the oldest. This change more heavily
weights recent touch samples and reduces the sample time window
used for calculation. This significantly improves the accuracy
of fling gesture detection.

Change-Id: Ib1940933e786e5f6a731552a99bcd9400741d55f
i/Input.h
41b6aabf356d8a505da37b1d046bc9010028fe8b 31-Aug-2011 Mathias Agopian <mathias@google.com> fix Surface positions are not floats

Added Surface.setPosition(float, float) which allows to set a surface's
position in float.

Bug: 5239859
Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
rivate/surfaceflinger/LayerState.h
urfaceflinger/SurfaceComposerClient.h
940673f92ed8a0f4e6448b86ec08cee91ef3fc45 29-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Add C++ thread API androidGetThreadSchedulingGroup"
3599bf2c0727bc33e8136f5163eee6f398545e05 10-Aug-2011 Jamie Gennis <jgennis@google.com> SurfaceFlinger: use the HWC gralloc usage bit

This change makes SurfaceFlinger always use the
GRALLOC_USAGE_HW_COMPOSER usage bit when allocating buffers that may be
passed to the HWComposer.

Change-Id: I70362a8ede2b359fb2046853f85149d597465817
i/GraphicBuffer.h
ecc7adef2ef88428bd493ca1b21fc42a26b0fdb8 18-Aug-2011 Jeff Brown <jeffbrown@google.com> Input system bug fixes, particularly for stylus.
Bug: 5049148

Finished stylus support, including support for indirect stylus
and mouse tools.

Added TILT axis. When stylus tilt X/Y is available, it is transformed
into an orientation and tilt inclination which is a more convenient
representation and a simpler extension to the exiting API.

Touch devices now only report touch data using a single input
source. Previously touch devices in pointer mode would report
both absolute touch pad data and cooked pointer gestures.
Now we just pick one. The touch device switches modes as needed
when the focused application enables/disables pointer gestures.
This change greatly simplifies the code and reduces the load
on the input dispatcher.

Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE
would be zero whenever the stylus was in direct contact. It appears
that the correct way to determine whether the stylus is in direct
contact (rather than hovering) is by checking for a non-zero
reported pressure.

Added code to read the initial state of tool buttons and axis values
when the input devices are initialized or reset. This fixes
problems where the input mapper state might have the wrong initial
state.

Moved responsibility for cancelling pending inputs (keys down,
touches, etc.) to the InputDispatcher by sending it a device reset
notification. This frees the InputReader from having to synthesize
events during reset, which was cumbersome and somewhat brittle
to begin with.

Consolidated more of the common accumulator logic from
SingleTouchInputMapper and MultiTouchInputMapper into
TouchInputMapper.

Improved the PointerLocation output.

Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
i/KeycodeLabels.h
7f7e85898f6dd9325418a2d2a30a8df48e52b66d 18-Aug-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: fix queues-to-composer"
582270d69db94286a248bd829f1ae6f910d45124 18-Aug-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix queues-to-composer

This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of
Surface and SurfaceTextureClient. Surface now uses the inherited
SurfaceTextureClient implementation of this query. SurfaceTextureClient
now queries SurfaceFlinger to determine whether buffers that are queued
to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to
some other process).

Change-Id: Iff187e72f30d454229f07f896b438198978270a8
urfaceflinger/ISurfaceComposer.h
9a6e71d14f1f8122aa63a89d0372fccd396600f4 18-Aug-2011 Mathias Agopian <mathias@google.com> Merge "don't return the current buffer from dequeueBuffer"
29b5762efc359022168e5099c1d17925444d3147 18-Aug-2011 Mathias Agopian <mathias@google.com> don't return the current buffer from dequeueBuffer

we were not reseting mCurrentTexture in some situations
which in turn caused dequeueBuffers() return a
"FREE" buffer that was also current.
Very often it was harmless, but it created a race with
updateTexImage() which could cause the following
queueBuffers() to fail.

Bug: 5156325
Change-Id: If15a31dc869117543d220d6e5562c57116cbabdb
ui/SurfaceTexture.h
de16a5a62ba218efaf829e9fed0cdf4b175c343b 17-Aug-2011 Xavier Ducrohet <xav@android.com> am ddf155b8: am 5dcda1fd: am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"

* commit 'ddf155b8338eb894a97612e4cb21257c11d8434a':
Fix String16 operator+ to actually work
754b249bcd2d72b90b4fbe82d0d9b636790717df 17-Aug-2011 Xavier Ducrohet <xav@android.com> am 5dcda1fd: am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"

* commit '5dcda1fda53bdc6dfe80cf37e62cacdc216224b1':
Fix String16 operator+ to actually work
242915f3d017582186eeebd8bd341a4290e31ff8 17-Aug-2011 Xavier Ducrohet <xav@android.com> am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"

* commit '88512f59bc051a42f4dd70acc8af5622f7e99db6':
Fix String16 operator+ to actually work
35302266fa2cadb23e2b5005943b6f63372b7ab8 17-Aug-2011 Xavier Ducrohet <xav@android.com> am a8313e71: Merge "Fix String16 operator+ to actually work"

* commit 'a8313e71fe8b483448d14e22610101c5f3672744':
Fix String16 operator+ to actually work
37bf88e54743640d29e99095bead3d8fd52af15c 17-Aug-2011 Josiah Gaskin <josiahgaskin@google.com> Fix String16 operator+ to actually work

This change fixes the String16 utility's operator+ function.

Change-Id: Ibed7b07277b50bf178febc72b6ce497893e66f17
tils/String16.h
cbe527884acf0f8f8c550c54f99b4dd864ac1e70 11-Aug-2011 Mathias Agopian <mathias@google.com> fix a memory leak and memory corruption in RefBase

we would leak a weakref_impl if a RefBase was never incWeak()'ed.
there was also a dangling pointer that would cause memory corruption
and double-delete when a custom destroyer was used to delay the
execution of ~RefBase.

it turns out that the custom destroyer feature caused most of the
problems, so it's now gone. The only client was SurfaceFlinger
who now handles things on its own.

RefBase is essentially back its "gingerbread" state, but the
code was slightly cleaned-up.

Bug: 5151207, 5084978
Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
tils/RefBase.h
37717b58dc012f934c09d90e166106728dd9b431 12-Aug-2011 Jean-Baptiste Queru <jbq@google.com> am b654e6e5: am d144748d: Merge "Add missing include"

* commit 'b654e6e55a3e8d7e8c2e0b8b1ff4bb4f76c10e05':
Add missing include
e636a8ad44d5b3cb5ff174bc0ec20a352c4e83b3 12-Aug-2011 Jean-Baptiste Queru <jbq@google.com> am d144748d: Merge "Add missing include"

* commit 'd144748d4767b2ccfb13857e23f78bc944e9531d':
Add missing include
2327ffac7dd70dcfc4b5d1a7ea68afd91941a9e1 11-Aug-2011 Jean-Baptiste Queru <jbq@google.com> Add missing include

Change-Id: I00181029e80a2ba75320550c14e950fadbab8a64
ui/SurfaceTexture.h
65adf39c3850c198f3ceac147e8ea717610f9f6c 11-Aug-2011 Jean-Baptiste Queru <jbq@google.com> am 44874c23: am c962512c: Merge "added stub for getting buffer from surface texture"

* commit '44874c236de282b0d898f179fc9fdafa84aae40d':
added stub for getting buffer from surface texture
9f3a33a671bfbd13f27cdfc96b0e53cd3199b857 11-Aug-2011 Jean-Baptiste Queru <jbq@google.com> am c962512c: Merge "added stub for getting buffer from surface texture"

* commit 'c962512cac19e2bb1103c0c1a5f739d40d4d7740':
added stub for getting buffer from surface texture
f81c168a7aac86af5e4741ea4c81b3ceba8d719e 11-Aug-2011 Chris Craik <ccraik@google.com> added stub for getting buffer from surface texture

Change-Id: If61153cacdd8027848f40f8d9035f7c4aead0a98
ui/SurfaceTexture.h
f440f670a4448a9b9aec96b53c94aeee7bb4602e 11-Aug-2011 Mathias Agopian <mathias@google.com> Merge changes I5174a6ec,I1f8538b6,Idb71fdcf

* changes:
fix a crasher in SurfaceTexture::updateTexImage()
rework dequeueBuffer()'s main loop.
error out when SurfaceTexture APIs are called while not connected
8e19c2e97e11505ee2ecf336275fd956f2ccfa22 11-Aug-2011 Mathias Agopian <mathias@google.com> fix a crasher in SurfaceTexture::updateTexImage()

we now make sure to drain the buffer queue on disconnect.
this happens only when in synchrnous mode. in async mode
we clear all buffers except the head of the queue.

for extra safety we also catch the null pointer
in updateTexImage (which should never happen) and return
an error.

Bug: 5111008

Change-Id: I5174a6ecbb0de641c6510ef56a611cbb4e9e1f59
ui/SurfaceTexture.h
2560d14ce8e38984032d999e3fdf8da9a47baf3c 11-Aug-2011 Mathias Agopian <mathias@google.com> rework dequeueBuffer()'s main loop.

this simplifies the code a bit and also makes sure
we reevaluate mAbandoned and mConnectedApi each time
we come back from waiting on mDequeueCondition

Change-Id: I1f8538b62ad321b51ed79d953b700036daba796d
ui/SurfaceTexture.h
ef51b992192adf4fc432686ab346f5fc7a13bc95 11-Aug-2011 Mathias Agopian <mathias@google.com> error out when SurfaceTexture APIs are called while not connected

- also log a warning when freeAllBuffers is called with a non empty buffer queue
- rename freeAllBuffers to freeAllBuffersLocked

Change-Id: Idb71fdcf233b9ccae62d5a2a7c3c4bad2501d877
ui/SurfaceTexture.h
9f213739b9bd1aea8a65b51cb56186e0e6557cca 10-Aug-2011 Jeff Brown <jeffbrown@android.com> am ca97671e: am 6f5a837c: Merge "Fix getSwitchState according to device capabilities."

* commit 'ca97671e2b74ed31b5bef6fd0b39e489f1ec5f51':
Fix getSwitchState according to device capabilities.
38b77d4373cbf56cf501eaa78b488c7cb3961a05 10-Aug-2011 Jeff Brown <jeffbrown@android.com> am 6f5a837c: Merge "Fix getSwitchState according to device capabilities."

* commit '6f5a837c9c4a55c82111c6cd5af6055b63fcb5a9':
Fix getSwitchState according to device capabilities.
c6d6863c9b0177096d355035d7609ca8c8e4799c 10-Aug-2011 Jeff Brown <jeffbrown@android.com> Merge "Fix getSwitchState according to device capabilities."
a11499a0266687a8d7281f29db84a62a93004f21 10-Aug-2011 Mathias Agopian <mathias@google.com> Fix typos and use new HAL_PRIORITY_URGENT_DISPLAY constant

Change-Id: I703f8a96dd0dfec427e74363ad95729bfefc95c7
tils/threads.h
5bfc24515bb5c8ea7975f72d538df37753733a2f 09-Aug-2011 Mathias Agopian <mathias@google.com> return correct value from query after connecting a surface

the first time a surface was connected, the values returned
by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
to queueBuffer was performed.

Bug: 5137366, 5121607
Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
6b115451bfe4ec933cb9be96752d0077bb660161 03-Aug-2011 Jean-Baptiste Queru <jbq@google.com> am 98c531dc: am 9b0c6bee: Merge "Fix a compiling error when trying to use setBufferCount"

* commit '98c531dca9e52af280ca002658bbe38775b3f6ae':
Fix a compiling error when trying to use setBufferCount
8fdbdf461a35048569c1af3d4cb99ddd6abb9e63 03-Aug-2011 Jean-Baptiste Queru <jbq@google.com> am 9b0c6bee: Merge "Fix a compiling error when trying to use setBufferCount"

* commit '9b0c6beed2cd5463655712ad80ed160c08611ff8':
Fix a compiling error when trying to use setBufferCount
697bce061c1b9bd76fa7f1998ab66ade331029db 03-Aug-2011 Teng-Hui Zhu <ztenghui@google.com> Fix a compiling error when trying to use setBufferCount

Change-Id: I1aefaf7ec111340a584e0beeeea60b845e16bb1f
ui/SurfaceTexture.h
5873ce46adc9e98efd6e5acbe21639a0a4d25c69 28-Jul-2011 Jeff Brown <jeffbrown@google.com> Refactor input reader to add stylus support.
Bug: 5064702

Introduced the concept of an InputListener to further decouple
the InputReader from the InputDispatcher. The InputListener
exposes just the minimum interface that the InputReader needs
to communicate with the outside world. The InputReader
passes arguments to the InputListener by reference, which makes
it easy to queue them up.

Consolidated all of the InputReader locks into one simple global
Mutex. The reason this wasn't done before was due to potential
re-entrance in outbound calls to the InputDispatcher. To fix this,
the InputReader now queues up all of the events it wants to send
using a QueuedInputListener, then flushes them outside of the
critical section after all of the event processing is finished.
Removing all of the InputMapper locks greatly simplifies the
implementation.

Added tests for new stylus features such as buttons, tool types,
and hovering.

Added some helpers to BitSet32 to handle common code patterns
like finding the first marked bit and clearing it.

Fixed a bug in VelocityTracker where the wrong pointer trace
could get cleared when handling ACTION_POINTER_DOWN. Oops.

Changed PointerCoords so it no longer stores useless zero
axis values. Removed editAxisValue because it is not very
useful when all zero value axes are absent and therefore
cannot be edited in place.

Added dispatch of stylus hover events.

Added support for distance and tool types.

Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
i/Input.h
tils/BitSet.h
33e86c7a9143f89ae932034bbfe4c3a9f71114fd 29-Jul-2011 Derek Sollenberger <djsollen@google.com> resolved conflicts for merge of b7f09f28 to honeycomb-plus-aosp

Change-Id: Iebde13c41a2adf4e693d87e808cb0659f913e4e6
bbfbd30383bb8410604f257512a206c2d672776b 29-Jul-2011 Derek Sollenberger <djsollen@google.com> am b7ed8471: am 01caec8c: Merge "Adding an optional param to the SurfaceTexture constructor."

* commit 'b7ed8471f1b96aff901149cf9ac29e4b32672f93':
Adding an optional param to the SurfaceTexture constructor.
adbba1fda08cd19355a11857f06be0c3e10e7532 29-Jul-2011 Derek Sollenberger <djsollen@google.com> am 01caec8c: Merge "Adding an optional param to the SurfaceTexture constructor."

* commit '01caec8c4165a6cce2f276f8016b9eadab966944':
Adding an optional param to the SurfaceTexture constructor.
77c988cf4e01cce948c25e09986aa05ed9bf6816 29-Jul-2011 Derek Sollenberger <djsollen@google.com> Adding an optional param to the SurfaceTexture constructor.

Change-Id: I0fdbccf483a16af8039b85c0562f19a34ebce536
ui/SurfaceTexture.h
5aa3d79025c6565ee274945a032a269fc86db85f 29-Jul-2011 Michaël Burtin <mburtin@gmail.com> Fix getSwitchState according to device capabilities.

When querying switch state for a given device id, ensure that the device
exposes the given switch in its capabilities, report AKEY_STATE_UNKNOWN
otherwise.
This fix a bug in InputManager that reports an incorrect switch state
(down) when a device exposes at least one switch in its capabilites and
another switch is queried. For example, this can leads in always
reporting LID state open (SW_LID down) if only SW_HEADPHONE_INSERT is
exposed in capabilities.

Change-Id: I4e5265ec02af918c317673789e7948529842aa2d
Signed-off-by: Michaël Burtin <mburtin@gmail.com>
i/EventHub.h
b313559b212f6c22bb414c14937fb6a6d4b6c45a 28-Jul-2011 Kenny Root <kroot@google.com> Merge "Move extract native libraries to JNI code"
aa599086f84ec35d11cf5dce2e012845fb0636d7 14-Jun-2011 Mathias Agopian <mathias@google.com> DO NOT MERGE. may fix build on some version of gcc

Change-Id: Id99d390862731fd3fbc009dbffdf1d2a59dbe348
tils/RefBase.h
96e108271bb5da44a130c8b5976fc63879403735 26-Jul-2011 Mathias Agopian <mathias@google.com> Merge "remove dead code and member variables."
49a65e5526ed3a5353765b3e429c49543d1f3b8c 12-Jul-2011 Kenny Root <kroot@google.com> Move extract native libraries to JNI code

The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.

Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.

Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
tils/ZipFileRO.h
3fbce7c56082e4e0d23f1c1c89983d3841853ed7 26-Jul-2011 Mathias Agopian <mathias@google.com> remove dead code and member variables.

also fix some comments and improve debugging logs.

Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
ui/SurfaceTextureClient.h
fa1e002cec5dc33ebe52685dc81d644f783811a8 25-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: enable RGB external textures"
8d14330bd7c8ce855efb2284b306a314759ac4df 25-Jul-2011 Ted Bonkenburg <tedbo@google.com> Merge "Add support for creating a Surface from a a SurfaceTexture."
bd050ab2af1421d527d1a80ce59dd8d9940a838c 16-Jul-2011 Ted Bonkenburg <tedbo@google.com> Add support for creating a Surface from a a SurfaceTexture.

The Surface is already using SurfaceTexture internally and it is parcelable. This
is intended to replace and phase out ParcelSurfaceTexture in favor of creating a
new Surface.java object from an existing SurfaceTexture.

Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
urfaceflinger/Surface.h
1f8e09f40d16ae377164d86e91385ad3d8e78e82 20-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: enable RGB external textures

This change removes support for conditionally using the GL_TEXTURE_2D
target for SurfaceTexture textures with RGB buffers. It also enables
and fixes the RGB-based SurfaceTexture tests.

Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
ui/SurfaceTexture.h
7b305fffc39d0fe0926e7fd2d7f6a524fbce62b7 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add the abandon method.

This change adds the 'abandon' method to the SurfaceTexture C++ class.
This method may be used to put the SurfaceTexture in an abandoned state,
causing all ISurfaceTexture methods to fail.

Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
1259e9d6ac474f3e9dec8569fb694c61eeeef4d3 22-Jul-2011 Jamie Gennis <jgennis@google.com> Merge changes I799532f7,I5cffa6eb

* changes:
SurfaceTexture: fix a comment
SurfaceTexture: remove getAllocator
acb7b5dfc804d2e6b2e75b688f536fd38d75641a 11-Jun-2011 Pannag Sanketi <psanketi@google.com> Adding SurfaceEncoder for encoding FilterFrames

Adding SurfaceEncoder which can be used to encode
custom frame data. In a sense, it is reverse
of what SurfaceTexture does.

SurfaceEncoder takes in frames from a native window and
passes them to an encoder, thus acting like a MediaSource.
It uses GRAlloc buffers underneath for passing data.
The client side sets the geometry, format in the beginning,
which cannot be changed while the recording is going on.

Currently, there is no common pixel format that both
GRAlloc and HAL understand.
Also, the encoder cannot encode using the data from the GRAlloc
buffers.

The SurfaceEncoder_test examines mainly the buffer passage
since true encoding cannot be done at this point.
SimpleDummyRecorder 'reads' the frames in the same thread
as the start(), whereas DummyRecorder 'reads' in a separate
thread much like the MPEG4Writer. The test with DummyRecorder
is much closer to the real encoding implementation.

Related to bug id: 4529323

Change-Id: I58ec19a150f8fe4d6195196dc44f55002b46c7c8
i/PixelFormat.h
29c870271e8d3f8c40c356283650ba54fe71a16b 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a comment

Change-Id: I799532f77f8fbb6b8ee6888fdd8852b6f28e8c33
ui/SurfaceTexture.h
976f494d53cb239307fd810ce592b5b5de1cbc41 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: remove getAllocator

This change removes the SurfaceTexture::getAllocator method, as it's no
longer needed. Proper refcounting of the Gralloc buffers is now handled
by the IGraphicBufferAlloc binder marshalling code.

Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
ui/ISurfaceTexture.h
ui/SurfaceTextureClient.h
aa5e67192120306d716ec991eedaef5aa2c776c9 21-Jul-2011 Mathias Agopian <mathias@google.com> Merge "clean-up. get rid ofunused code and members in Surface[Control].cpp"
c10d9d90b2088a3304076e0dc4bf05cdbb5d45ab 21-Jul-2011 Mathias Agopian <mathias@google.com> clean-up. get rid ofunused code and members in Surface[Control].cpp

Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
ui/ISurfaceTexture.h
urfaceflinger/ISurfaceComposerClient.h
urfaceflinger/Surface.h
585ef1e14a31bfdc83ec40f3362dc1d92c8de977 21-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove unimplemented memory pool.

dlmalloc does such a great job that we don't need a pool anyways.

Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
tils/Pool.h
97c602c5af5f3ffd69009bf496d86347b71a2b4c 20-Jul-2011 Mathias Agopian <mathias@google.com> implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation"

Bug: 4487161
Change-Id: I883f34efe542c2a566d04966f873374f40c50092
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
7734ebfe47f42f980c1b44c1f284a91d8ad1d6c7 14-Jul-2011 Mathias Agopian <mathias@google.com> Add set_scaling_mode() to ANativeWindow.

This allows to specify the scaling mode independently from
the buffer size.

Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
8f9dbf9e13b927de2524116c30544f7dfbbbf56c 14-Jul-2011 Mathias Agopian <mathias@google.com> move lock/unlock implementaion outside of Surface into SurfaceTextureClient

This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work
with ANativeWindows implemented by Surface and SurfaceTextureClient.

Also, Surface now inherits directly from SurfaceTextureClient.

Bug: 5003724
Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
ui/SurfaceTextureClient.h
urfaceflinger/Surface.h
677517ae3f380e701a47abe4738b748fb3ca161d 15-Jul-2011 Jamie Gennis <jgennis@google.com> Merge changes Id9aa1003,I8c154189

* changes:
SurfaceTexture: make (dis)connect into an IPC
SurfaceTexture: add support for new connect values
fe0a87b54654a1392650e7f1862df473287d8332 14-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: make (dis)connect into an IPC

This change makes the ANativeWindow connect and disconnect calls result
in an IPC to the SurfaceTexture object. This will allow us to prevent
multiple simultaneous connections from different processes.

Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
c2be743a9c366a17d64c6afb5a299664ddfcd32f 13-Jul-2011 Mike Lockwood <lockwood@android.com> Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build

Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
rivate/binder/binder_module.h
0d0c5a6d6b434d3d7890f4bd9eca90084ba4e780 12-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "EGL: fix the ANativeWindow size/fmt override"
bee205fd58a27c10a0895de5339e76025d429d2b 01-Jul-2011 Jamie Gennis <jgennis@google.com> EGL: fix the ANativeWindow size/fmt override

This change fixes how the Android EGL layer overrides the size and
format of an ANativeWindow in eglCreateWindowSurface. The new behavior
is to leave the size untouched when overriding the format. The previous
behavior was to reset the ANativeWindow to use the default size set by
the ANativeWindow implementation.

It also adds two new 'perform' methods to the ANativeWindow interface:
set_buffers_dimensions and set_buffers_format, and redefines the
behavior of set_buffers_geometry to be the combination of these two new
methods.

Additionally, this change adds an error check for the return value of
the new native_window_set_buffers_format call, which required adding a
(stub) handler for to FramebufferNativeWindow.

Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
ui/SurfaceTextureClient.h
e16986cae281f118ecd563c384b7f6e5a4b937b5 09-Jul-2011 Jeff Brown <jeffbrown@google.com> Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
inder/ProcessState.h
4fb24275919aab88d0ce346f530c9911d6c08422 23-Jun-2011 Glenn Kasten <gkasten@google.com> Add C++ thread API androidGetThreadSchedulingGroup

This API is intended for applications that need to read a thread's
scheduling group, while using the higher-level (C++) family of thread APIs.

Change-Id: I5e58017f74c3989b20b5b1cc2bc4483c95720520
tils/threads.h
be3c018f8b00738cd7e884058966f82597b8e370 06-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Add Thread::join"
7946e416b67d95cc9d0c6a4bd4a6d1311c19ca77 06-Jul-2011 Mathias Agopian <mathias@google.com> Merge "return an error code with gralloc buffer allocation failures"
f44c896b091cbbea4a96a6c47ddd65f77ba54b32 06-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Thread ID zero for androidSetThreadSchedulingGroup"
2e0b543c09fad0f588b2eb65863ff881efa31546 02-Jul-2011 Jeff Brown <jeffbrown@google.com> Workaround apps that make assumptions about pointer ids.

Modified the touch input mapper to assign pointer ids sequentially
starting from 0 instead of using the tracking id or slot index
supplied by the driver. Applications should not depend on this
ordering but some do. (sigh)

Bug: 4980884
Change-Id: I0dfeb3ac27c57a7102a13c960c760e2a02eb7669
tils/BitSet.h
d9e8c64c3dce1612eb948a5c16ba4ff62202b423 01-Jul-2011 Mathias Agopian <mathias@google.com> return an error code with gralloc buffer allocation failures

Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
urfaceflinger/IGraphicBufferAlloc.h
19e0a8bfe9a15543b0bd7991cce08e5362e9f5cd 01-Jul-2011 Pannag Sanketi <psanketi@google.com> Merge "Minor fix in SurfaceTexture"
292a31a4c2ae2f6faf134e8e4a726583017dad06 24-Jun-2011 Pannag Sanketi <psanketi@google.com> Minor fix in SurfaceTexture

Change-Id: Ic859715becf3e6d5107bd8beb8c577034d00ec52
ui/SurfaceTexture.h
e6786c92d7d839ac238fc741f3a1a2906199a9a0 30-Jun-2011 Mathias Agopian <mathias@google.com> Merge "SF transactions are now O(1) wrt IPC instead of O(N)."
698c0873cf2e07bdc7fd1e72169aee2a19fa40d7 29-Jun-2011 Mathias Agopian <mathias@google.com> SF transactions are now O(1) wrt IPC instead of O(N).

Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
rivate/surfaceflinger/LayerState.h
urfaceflinger/ISurfaceComposer.h
urfaceflinger/ISurfaceComposerClient.h
urfaceflinger/SurfaceComposerClient.h
tils/SortedVector.h
tils/Vector.h
acfc4829e4c67cc3acfcff1a6b4dd0752b6097a7 29-Jun-2011 Jason Simmons <jsimmons@google.com> Merge "Add a linear transform library to libutils"
73b607f9ce5c91fed6709495c31a5a7878732205 29-Jun-2011 Xavier Ducrohet <xav@google.com> am 54146a63: Merge "DO NOT MERGE. may fix build on some version of gcc" into gingerbread

* commit '54146a634e0e66a5e4732ba1a80079a1e93bdd8a':
DO NOT MERGE. may fix build on some version of gcc
c18d4da5e4d2d41fd5423c10da993d70c2b1b9e0 29-Jun-2011 Jason Simmons <jsimmons@google.com> Add a linear transform library to libutils

Change-Id: Icdec5a6bebd9d8f24b3f335f8ec8b09a5810a774
tils/LinearTransform.h
67b4cff399eef982a831dbe9c63e43e9846473a5 28-Jun-2011 Jamie Gennis <jgennis@google.com> Merge changes I9fb59763,I8b2c6e00

* changes:
SurfaceTexture: consume buffers after err checks
SurfaceTexture: change onFrameAvailable behavior
bae6579eb2690498528dfbc9381419badc8be733 27-Jun-2011 Andy McFadden <fadden@android.com> Remove native EventRecurrence parser

Switch over to the new parser.

Bug 4575374

Change-Id: If78d8042fb266182900398f7fc464a048c779966
im/EventRecurrence.h
99b49840d309727678b77403d6cc9f920111623f 28-Jun-2011 Mathias Agopian <mathias@google.com> PermissionCache caches permission checks

This is intended to absorb the cost of the IPC
to the permission controller.
Cached permission checks cost about 3us, while
full blown ones are two orders of magnitude slower.

CAVEAT: PermissionCache can only handle system
permissions safely for now, because the cache is
not purged upon global permission changes.

Change-Id: I8b8a5e71e191e3c01e8f792f253c379190eee62e
inder/Permission.h
inder/PermissionCache.h
3d8063b02e06020c8062addcc9ec49048d3bdb9a 27-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: change onFrameAvailable behavior

This change alters the conditions under which the onFrameAvailable
callback gets called by the C++ SurfaceTexture class. The new behavior
is to call the callback whenever a frame gets queued that will be
visible to the buffer consumer. This means that buffers queued in
synchronous mode always trigger the callback, as those buffers will
remain pending until they are consumed. Buffers queued in asynchronous
mode will only trigger the callback if there was not previously an
unconsumed buffer pending.

The new behavior means that a consumer should perform a draw operation
exactly once for every onFrameAvailable call that it recieves. This
change also modifies SurfaceFlinger and the SurfaceTexture JNI to
support of the new behavior.

Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
ui/SurfaceTexture.h
5728a92e29c1c9729017a82c5d0bc18fc1069923 22-Jun-2011 Anu Sundararajan <sanuradha@ti.com> MemoryHeapBase: Save and binderize the offset

The offset that is used in the creation of the MemoryHeapBase must be saved, so
that it can be used to recreate the Heap when an IMemory object is passed
across process boundary through the binder.

Change-Id: Ie618fb5c0718e6711f55ed9235616fd801e648dc
Signed-off-by: Anu Sundararajan <sanuradha@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
inder/IMemory.h
inder/MemoryHeapBase.h
cf949e64a9e0ad2ecceb860de03d891d8120b7cf 24-Jun-2011 Jean-Baptiste Queru <jbq@google.com> am f458d5fd: Merge "Tweak for forward-compatibility"

* commit 'f458d5fdb8a48747d6fdd5fd0d0a44a6a8ed89e9':
Tweak for forward-compatibility
a614150d74f37ccd05483e81d2fc37460fe20384 24-Jun-2011 Jean-Baptiste Queru <jbq@google.com> Tweak for forward-compatibility

Change-Id: Ic5e4d949c1c80a2ebdc2ec802c35b5d3d7f9661d
ui/SurfaceTexture.h
14a0e58074f2698829b6554f578e6762c377caa3 24-Jun-2011 Grace Kloba <klobag@google.com> Add allowSynchronousMode to SurfaceTexture constructor.

Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
ui/SurfaceTexture.h
58e012d1e37e1272d43c9ff0f56c9b236dd1d7f1 23-Jun-2011 Glenn Kasten <gkasten@google.com> Add Thread::join

This new API will be used by applications that previously used the
lower-level pthread APIs (including pthread_join). Centralizing on the
Thread class instead of pthread will permit additional functionality to
be added later in only one location.

Change-Id: I8460169ac9c61ac9f85752405ed54c94651058d7
tils/threads.h
ce63396effb32212501658c25f2ec6d1bd8b0307 23-Jun-2011 Glenn Kasten <gkasten@google.com> Thread ID zero for androidSetThreadSchedulingGroup

Already implemented by androidSetThreadPriority but not documented

Change-Id: I85302b17092952065f3f3a4214d8d8abdd465dbd
tils/threads.h
1e7fa9e945d98eab76ff92f37c25040429a6c0a0 23-Jun-2011 tedbo <tedbo@google.com> Add method to create a ParcelSurfaceTexture from android.view.Surface.

Change-Id: I05e343ab7e327478f60322af9373574b70c148f5
urfaceflinger/Surface.h
b36bb97ae37a0fbcb6a35770eb86ac5931409d0d 21-Jun-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: fix a NULL ptr dereference."
1c4414091cfb93206067fb64eba445653739d40f 20-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a NULL ptr dereference.

This change adds a NULL check when searching the slot list in
SurfaceTextureClient for the slot corresponding to a buffer being
queued or canceled.

Bug: 4645023
Change-Id: I806cbc1e34da118ea33a83c4f25ce8193ba1c3ad
ui/SurfaceTextureClient.h
75e3e4936bdcc9f7e717e14f530b9ac74ad81bd7 20-Jun-2011 Jean-Baptiste Queru <jbq@google.com> am e3b05d09: Merge "Tweaks for forward-compatibility"

* commit 'e3b05d09163257b888c86f2a560e10c48f4cf029':
Tweaks for forward-compatibility
3f3f5af40e409fe5d2f2af2c4906dbb28a982f43 18-Jun-2011 Jean-Baptiste Queru <jbq@google.com> Tweaks for forward-compatibility

Change-Id: Iec525edc186e78d5d865f82dd5b1f56263c22e86
ui/SurfaceTexture.h
i/GraphicBuffer.h
i/android_native_buffer.h
66ff46b366eb4df531d0a25104d7cea3b28bbcc4 14-Jun-2011 Mathias Agopian <mathias@google.com> DO NOT MERGE. may fix build on some version of gcc

Change-Id: Id99d390862731fd3fbc009dbffdf1d2a59dbe348
tils/RefBase.h
e2fc756f7d946da72991feeb8b569258f0b203eb 17-Jun-2011 Mathias Agopian <mathias@google.com> am 48294b0d: am e7d3ee9d: Revert "merge various SF fixes from gingerbread to honeycomb-mr2" (DO NOT MERGE)

* commit '48294b0d9388cff632f0e6ae5220305d342c76fb':
Revert "merge various SF fixes from gingerbread to honeycomb-mr2" (DO NOT MERGE)
debc234c242cfe30f9447f017d13bb4da89527c3 17-Jun-2011 Mathias Agopian <mathias@google.com> Revert "merge various SF fixes from gingerbread to honeycomb-mr2" (DO NOT MERGE)

Also revert all dependent changes:
This reverts commit 8e18668d14adf601cbe5973030c310ec23d88461.
This reverts commit 69b4587bfbb3e98f793959d9123340360fa233a2.
This reverts commit a9c9a4baf24700e8817d47d8ea8da1742caea0b5.
This reverts commit 2c0042b666a969091c931614f2fc0dce2f1cfac8.
This reverts commit f6c8206735e7e078461e5f2aef6e1a1446fdd075.
This reverts commit 24855c09173a6caaec7dcedd0c2d7ce15121d39b.

Change-Id: I33e699640f3f59e42fa03c99a9a1b7af0d27d4d8
tils/RefBase.h
e397ce2880020b7c04a711e481fc6faf8b52cecd 16-Jun-2011 Mathias Agopian <mathias@google.com> am 0887b8c2: am 8e18668d: revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)

* commit '0887b8c2e583e682cd2c1bc909cb3fdbec704004':
revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)
dbe60ddd85abf4b18f3b9a97b33e0efa95b0dd8e 16-Jun-2011 Mathias Agopian <mathias@google.com> am d5244e0a: am 52a43990: Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"

* commit 'd5244e0a88ed2f843651aa5ffdc71a45c968e0f3':
Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"
111280a8de1700f718744f48d163789473b9da30 16-Jun-2011 Kenny Root <kroot@google.com> Use rand() for MinGW

The version of MinGW we use doesn't have nrand48() which is really lame,
but we need to use libutils in the Windows SDK.

Change-Id: If854c03dbf02bc29e79f49e4539f08c2bf057517
tils/BlobCache.h
1b2c2a9ea0108cd182a56c47997ec68ee8de02b3 16-Jun-2011 Mathias Agopian <mathias@google.com> revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)

This reverts commit 52a43990880b27808bcf562afcc4209d34728e6e.

Change-Id: I1856a48f863b051395b8091ddfd1e01292fa1b1e
tils/RefBase.h
63ad28fb53a1b3b652495e57eb5fe52eb2a0ec80 16-Jun-2011 Mathias Agopian <mathias@google.com> Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"

This reverts commit af6edba59e250adbdfa5b3c3be134f70d8c38a16.

Change-Id: I7793d3ca8a4d20a2b188364f47854328ab5f586d
tils/RefBase.h
e776586a081bddb734441a64f62ea28bee05a96f 16-Jun-2011 Mathias Agopian <mathias@google.com> am 7ecdeb6e: am d20d72d1: Merge "revert surfaceflinger leak fix as it uncovered a crasher on xoom" into honeycomb-mr2

* commit '7ecdeb6e548ff71d4f70b343e30136e89eaa3e33':
revert surfaceflinger leak fix as it uncovered a crasher on xoom
3790e7997a9a4444ef95c862046cf0053ab4703f 16-Jun-2011 Mathias Agopian <mathias@google.com> revert surfaceflinger leak fix as it uncovered a crasher on xoom

Bug: 4600244
Change-Id: Ia68ebf0f243a051ff6a21b3863e3e5d259bbf7ac
tils/RefBase.h
35cc0fcd51cb8c5580c516247407623e4e8e0cfa 15-Jun-2011 Mathias Agopian <mathias@google.com> am afffa8fa: fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)

* commit 'afffa8fa9f82a7343e1158bf921931fd3e3df615':
fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
fbb8272db3eaf332671f1e558b0b55aeb16e532f 14-Jun-2011 Mathias Agopian <mathias@google.com> am a9007fbd: am 69b4587b: DO NOT MERGE. may fix build on some version of gcc

* commit 'a9007fbdae6671f66535da4b9dad04b19aaf9186':
DO NOT MERGE. may fix build on some version of gcc
7b1ef58d56eb97032a0d3a6aef1dcf4894391868 14-Jun-2011 Mathias Agopian <mathias@google.com> DO NOT MERGE. may fix build on some version of gcc

Change-Id: Iff6d9ab3a7caf58f65fc3f60633a3bd577b7af25
tils/RefBase.h
7a87ec7115882134a00ed04792b488e53172e707 14-Jun-2011 Mathias Agopian <mathias@google.com> may fix build on some version of gcc

Change-Id: Ia88787c0432ec84d51fe505fd6a2b6f98ebe8f33
tils/RefBase.h
ddc31c3e2bc6ffe66695c385d23e8ccc3c6dad06 13-Jun-2011 Mathias Agopian <mathias@google.com> fix RefBase so it retains binary-compatibility with gingerbread

Bug: 4595257
Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
tils/RefBase.h
a67932fe6864ac346e7f78b86df11cf6c5344137 20-Apr-2011 Mathias Agopian <mathias@google.com> unify SurfaceTexture and Surface

Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/IGraphicBufferAlloc.h
urfaceflinger/ISurface.h
urfaceflinger/ISurfaceComposer.h
urfaceflinger/ISurfaceComposerClient.h
urfaceflinger/Surface.h
urfaceflinger/SurfaceComposerClient.h
7794b30589786098756e4734794f0cca30109557 13-Jun-2011 Mathias Agopian <mathias@google.com> am 77079399: am a9c9a4ba: fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)

* commit '77079399fca3e9c71e2ac06f3da26934e1c278b9':
fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
76feee7a58af9626371a3540e6acc936662faabe 13-Jun-2011 Mathias Agopian <mathias@google.com> fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)

Bug: 4595257
Change-Id: I4773cf4fe59b2509db0ed733739eb6961d473b25
tils/RefBase.h
867740df0509e1f9b44f16187d1428ba8f351811 13-Jun-2011 Mathias Agopian <mathias@google.com> fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)

Bug: 4595257
Change-Id: I1db83149107d7dab1f0b7e73c684e0ff82e17e62
tils/RefBase.h
ac642349ba89c8839c421502fb779bee5cebfee3 13-Jun-2011 Jamie Gennis <jgennis@google.com> Merge "libutils: add a binary blob cache implementation."
72f6af86305cd7fa1db6ebedff10a28c3c4f26f4 13-Jun-2011 Jamie Gennis <jgennis@google.com> Merge changes I56779420,I044e44e1,Ic5adfa29,Ied541ab8

* changes:
SurfaceTexture: add some GL->GL tests.
SurfaceTexture: fix up a comment.
SurfaceTexture: add getTransformMatrix tests.
SurfaceTexture: fix a getTransformMatrix crash.
ae468f43418c3cbae74c7f546283f6bb4e4df690 12-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix up a comment.

Change-Id: I044e44e17319e08af657a7ec9fa39100876fe862
ui/SurfaceTexture.h
736aa9573bb7b78f9c315f396c104491b3639426 13-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a getTransformMatrix crash.

This change moves the computation of the transform matrix out of
getTransformMatrix and instead performs the computation when
updateTexImage gets called. This is needed in order for
getTransformMatrix to succeed even if the buffers have been freed (e.g.
by changing the buffer count) because the computation depends upon the
properties of the current GraphicBuffer.

Change-Id: Ied541ab8747b7ad604f862717135f9a16a816be9
Bug: 4490420
ui/SurfaceTexture.h
c4a0feaaf4dbf8052ee2c231a522a5f596dec42f 13-Jun-2011 Glenn Kasten <gkasten@google.com> Merge "Remove redundant memory barrier"
d9e1bb76fe1e01fb79bb65959b92051aa18fddbe 02-Jun-2011 Glenn Kasten <gkasten@google.com> Remove redundant memory barrier

pthread_create already includes the necessary memory barriers:
- parent at pthread_create : pthread_mutex_unlock(start_mutex)
- child at __thread_entry : pthread_mutex_lock(start_mutex)

Add lock around uses of mThread.

Added comments:
- uses of mThread require lock
- androidCreateRawThreadEtc returned ID is not safe for direct use from non-parent threads.

Change-Id: I18cb296b41ddaf64cf127b57aab31154319b5970
tils/threads.h
66168d4bb452492907765084de886b8cff2fd5b1 10-Jun-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of f51ded0f to master

Change-Id: Ida356524a68aeb2b9b0013dfbb6ab4bd11e616e2
199512446d07e15797d1ae8b21b92ae61a372352 10-Jun-2011 Dianne Hackborn <hackbod@google.com> am a8d7ea06: am 220cd77d: Merge "Enforce public resource restriction on bag parents." into honeycomb-mr2

* commit 'a8d7ea067cf22baeee2ff0a33e5a8c5a35936942':
Enforce public resource restriction on bag parents.
d4bfc93113bd1a73145935dbf13e1560d151ae17 09-Jun-2011 Dianne Hackborn <hackbod@google.com> Enforce public resource restriction on bag parents.

Need to put some more styles in the SDK to avoid breaking apps.

Also, welcome Android 3.2.

Change-Id: Ia31d07c9b1b91ad868d8630437fdc1b5ae24f37d
tils/ResourceTypes.h
5d99f17e827a927938e450076857f4cf145074c2 08-Jun-2011 Jeff Brown <jeffbrown@android.com> am 61220e88: am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2

* commit '61220e880ac4d9d76b7fd50744439e68e929c697':
Revert velocity damping. Bug: 4364920
b7edd04f7adc8ed8c0c22a3c6601c22d355fc4da 07-Jun-2011 Jeff Brown <jeffbrown@android.com> am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2

* commit 'bbbab26ebe9bc789ba9abac757895a6c31de7cc5':
Revert velocity damping. Bug: 4364920
1d3a7130f957b0234ab24e9ea544e847869ce9af 07-Jun-2011 Jeff Brown <jeffbrown@android.com> Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2
7ca7ba2064d4be0989b310907f5ddca218b58556 07-Jun-2011 Jeff Brown <jeffbrown@android.com> Revert velocity damping.
Bug: 4364920

Velocity damping proved to be a bad idea because it would
cause a significant ramp in velocity at the beginning of
a gesture, instead of the desired smooth behavior. Oh well.

Change-Id: Ie631946f47ef2492bd71fbed1ab44bbb39a875a8
i/Input.h
f3d939c5e5c2fa9b1ffea817fde3eece869e2bec 06-Jun-2011 Mathias Agopian <mathias@google.com> merge various SF fixes from gingerbread to honeycomb-mr2 (DO NOT MERGE)

Fix a race that could cause GL commands to be executed from the wrong thread.
RefBase subclasses can now decide how they want to be destroyed.
Fix a race in SurfaceFlinger that could cause layers to be leaked forever.
Fix a race-condtion in SurfaceFlinger that could lead to a crash.

initial cherry-pick:
resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp

Change-Id: I2a335e03fff219e35c18a7b0089b3a11d636576f
tils/RefBase.h
0129f1a27f13e175c9055e6f169096e5ac40602d 06-Jun-2011 Marco Nelissen <marcone@google.com> resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp

Change-Id: I1d86ea56b3d1d1b69f6671e5b0df0ca3f0c79643
36f49c133ec0d9d14ba3a06039f9db435e4731ea 04-Jun-2011 Jeff Brown <jeffbrown@android.com> am 56503b8d: am 8186a5f0: am 10c3f367: Merge "Implement pointer acceleration." into honeycomb-mr2

* commit '56503b8ddfe5c82407da32e18061e725f668432d':
Implement pointer acceleration.
576768ca0d7acf79a86b2662ce4f4f31c3e72f7e 03-Jun-2011 Jeff Brown <jeffbrown@android.com> am 8186a5f0: am 10c3f367: Merge "Implement pointer acceleration." into honeycomb-mr2

* commit '8186a5f065fac2b82c90cd18d79cd234bc221402':
Implement pointer acceleration.
b18d467bbc0f3325d6239a9741df3b2073e4ec82 03-Jun-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 54cb63e2 to master

Change-Id: I5b741a1781e3f76c03fc1534ffce871117effd10
dccd0899927c7a146e1523319f069b918f3211ea 03-Jun-2011 Dianne Hackborn <hackbod@google.com> am da9837fb: am c058d386: am ff762299: Merge "Small fixes and cleanup of resource config handling." into honeycomb-mr2

* commit 'da9837fb61c8aa53c67921682016d97655332089':
Small fixes and cleanup of resource config handling.
adab62038365be512aa9c21cf64df642dd075704 01-Jun-2011 Jeff Brown <jeffbrown@android.com> Implement pointer acceleration.

Bug: 4124987
Change-Id: I1f31a28f1594c55302ccabe13fe3ca6d2ff71d50
i/Input.h
b62013f6aafee08cfad25a2712dc32264e44f783 18-May-2011 Mathias Agopian <mathias@google.com> 9-axis sensor fusion with Kalman filter

Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion

Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
ui/Sensor.h
caf5f71308b627c109ed11905f3dd3b7967bb07c 27-May-2011 Dianne Hackborn <hackbod@google.com> am 528c49f1: am b96cbbd1: Add "tv" density for 720p screens.

* commit '528c49f112dce5f9687f30a9751e783196eca0c6':
Add "tv" density for 720p screens.
c6291e0ff45375176d8cceb1a3aad2fd9ec13101 27-May-2011 Dianne Hackborn <hackbod@google.com> Add "tv" density for 720p screens.

Change-Id: I028969b007f2fceea66947d77a2ae31ef1d1a630
tils/ResourceTypes.h
fff4e3f140e8353045538341f5427f225a69a50f 27-May-2011 Dianne Hackborn <hackbod@google.com> am c058d386: am ff762299: Merge "Small fixes and cleanup of resource config handling." into honeycomb-mr2

* commit 'c058d38602a1ffe00e14b4ab32c876c252eabe6d':
Small fixes and cleanup of resource config handling.
c3f07924a55dc5ed8d0451219b20d0cc60e83bcf 27-May-2011 Dianne Hackborn <hackbod@google.com> Small fixes and cleanup of resource config handling.

Change-Id: I402c31b68f2b4825cb4c610a65ee8e1da471c7bb
tils/ResourceTypes.h
98d1f99704b78cd17c7cdaa5d4898d3547428a28 25-May-2011 Jeff Brown <jeffbrown@google.com> am 8148cc3e: am 86ea1f5f: Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)

* commit '8148cc3e47e50c916066e2fed562618b5827188f':
Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)
9a2c1ca2dd96c30a7bd2242cf08e9f4ba80cc31c 25-May-2011 Jeff Brown <jeffbrown@google.com> am af685f3b: am 85a7f99c: Merge "Refactor how timeouts are calculated. (DO NOT MERGE)" into honeycomb-mr2

* commit 'af685f3bb566f297deee1615d55d4f33d5580ba3':
Refactor how timeouts are calculated. (DO NOT MERGE)
689e53cc822f0dc543d3728559a6ed8cea60cf57 25-May-2011 Jeff Brown <jeffbrown@google.com> am 16330e24: am 94e838f6: Merge "Improve VelocityTracker numerical stability. (DO NOT MERGE)" into honeycomb-mr2

* commit '16330e249663fed890df0e95fce4016c2971120a':
Improve VelocityTracker numerical stability. (DO NOT MERGE)
446b40091002bc2fa8dc98071f2ec8c39e30bce1 25-May-2011 Jeff Brown <jeffbrown@google.com> am 4bd89fb0: am 82e4373e: Merge "Use touch pad gestures to manipulate the pointer. (DO NOT MERGE)" into honeycomb-mr2

* commit '4bd89fb00f319c5d6d4f17b39fd4c0b3dc827ad1':
Use touch pad gestures to manipulate the pointer. (DO NOT MERGE)
d3e6d3e763544511a870b354f657600d25c42b91 13-Apr-2011 Jeff Brown <jeffbrown@google.com> Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)

Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements. The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e
i/Input.h
8cd5ba4b7f01d3a54a8f8bc6d1793aa5fc8e09ef 19-May-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: clean up some comments, tests, etc.

This change fixes up some stale comments, member variable names, log
messages and disables a failing test.

Change-Id: Ic1d3344b18066cf710e4a42838b2417c6b1f2f6c
ui/SurfaceTexture.h
be93983384d967d981e2ca4ca21e5916c93c270d 25-May-2011 Simon Wilson <simonwilson@google.com> am c9cd2387: Merge changes I37f0f315,I8cbf6044,Ibb598931,I5262bf11 into gingerbread

* commit 'c9cd2387b6938a6fbefc731d2177902266f2a130':
Fix a race that could cause GL commands to be executed from the wrong thread.
RefBase subclasses can now decide how they want to be destroyed.
Fix a race in SurfaceFlinger that could cause layers to be leaked forever.
Fix a race-condtion in SurfaceFlinger that could lead to a crash.
3ae00fabc7c4508007e23b189bcfec4cd67f56eb 24-May-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of bbca8133 to master

Change-Id: I81493674dceab848e41d380a77a37e5a9be06db6
1eb42cf6dbe457a5173193eb0276f8c703003db5 17-Mar-2011 Jeff Brown <jeffbrown@google.com> Refactor how timeouts are calculated. (DO NOT MERGE)

Added a timeout mechanism to EventHub and InputReader so that
InputMappers can request timeouts to perform delayed processing of
input when needed.

Change-Id: I89c1171c9326c6e413042e3ee13aa9f7f1fc0454
tils/Timers.h
c5982b7bee75467f50d681ad54120eadc7a8d88e 15-Mar-2011 Jeff Brown <jeffbrown@google.com> Improve VelocityTracker numerical stability. (DO NOT MERGE)

Replaced VelocityTracker with a faster and more accurate
native implementation. This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation. This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces. The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I95054102397c4b6a9076dc6a0fc841b4beec7920
i/Input.h
tils/BitSet.h
247da72a5bb1e762c73723fd2d495c9a6c4f1c68 10-Mar-2011 Jeff Brown <jeffbrown@google.com> Use touch pad gestures to manipulate the pointer. (DO NOT MERGE)

1. Single finger tap performs a click.
2. Single finger movement moves the pointer (hovers).
3. Button press plus movement performs click or drag.
While dragging, the pointer follows the finger that is moving
fastest. This is important if there are additional fingers
down on the touch pad for the purpose of applying force
to an integrated button underneath.
4. Two fingers near each other moving in the same direction
are coalesced as a swipe gesture under the pointer.
5. Two or more fingers moving in arbitrary directions are
transformed into touches in the vicinity of the pointer.
This makes scale/zoom and rotate gestures possible.

Added a native VelocityTracker implementation to enable intelligent
switching of the active pointer during drags.

Change-Id: I7b7ddacc724fb1306e1590dbaebb740d3130d7cd
i/Input.h
tils/BitSet.h
2f118cd350513991f400d7f887c0e8345cba6a20 24-May-2011 Dianne Hackborn <hackbod@google.com> am 4bb78889: am 40277df7: Merge "Add "television" mode." into honeycomb-mr2

* commit '4bb78889d04594c01a6af7f6d38c1764e9f575f9':
Add "television" mode.
3d6881f3940dd19268006e71dd2ed9896588dfb6 20-May-2011 Mathias Agopian <mathias@google.com> RefBase subclasses can now decide how they want to be destroyed.

This adds a destroy() virtual on RefBase which
sublasses can implement. destroy() is called
in lieu of the destructor whenthe last strong
ref goes away.

Bug: 4483050
Change-Id: I8cbf6044a6fd3f01043a45592b5a60fa1e5fade2
tils/RefBase.h
a6b34ef26aba54e88b79b3e1550464960ee628d1 21-May-2011 Dianne Hackborn <hackbod@google.com> Add "television" mode.

Change-Id: Ida1fdb61b036a8b489dbeda196fb4bc82e651b2b
tils/ResourceTypes.h
79ba9b5e39bfcbc6775bca56de139cf0fc5c914f 20-May-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 06a8ceac to master

Change-Id: Id51574c825affddfac14ad7214c5496d6a3d6e69
20aeb1caa4e2232153d3a59923722c19a3563a78 20-May-2011 Mathias Agopian <mathias@google.com> RefBase subclasses can now decide how they want to be destroyed.

This adds a destroy() virtual on RefBase which
sublasses can implement. destroy() is called
in lieu of the destructor whenthe last strong
ref goes away.
tils/RefBase.h
7583282db6783a7550b70d5b8bfbe613d0480de2 20-May-2011 Dianne Hackborn <hackbod@google.com> am c851ea56: am 69cb8757: Add new "-swNNNdp" resource qualifier.

* commit 'c851ea5672f6e042c2e89b2a2ce4a2467e1fcd2a':
Add new "-swNNNdp" resource qualifier.
22585947ff9d5b4cd4235b399be5c2de2338e68b 20-May-2011 Dianne Hackborn <hackbod@google.com> Add new "-swNNNdp" resource qualifier.

Change-Id: I0101e88ca9d8d44138bdcaf571f24b0352f4f6ce
tils/ResourceTypes.h
58c8dd2aa9a8931a53923054679fb31fecc696c9 29-Apr-2011 Jamie Gennis <jgennis@google.com> libutils: add a binary blob cache implementation.

This change adds an implementation of a cache that stores key/value
pairs of unstructured binary blobs.

Change-Id: Idd01fdabedfa3aed6d359a6efb0592967af52651
tils/BlobCache.h
e959ed2533bdc37da99fd34dafa26d1967a6b4c9 07-May-2011 Jeff Brown <jeffbrown@google.com> Add initial API for stylus and mouse buttons.

Added the concept of pointer properties in a MotionEvent.
This is currently used to track the pointer tool type to enable
applications to distinguish finger touches from a stylus.

Button states are also reported to application as part of touch events.

There are no new actions for detecting changes in button states.
The application should instead query the button state from the
MotionEvent and take appropriate action as needed.

A good time to check the button state is on ACTION_DOWN.

As a side-effect, applications that do not support multiple buttons
will treat primary, secondary and tertiary buttons identically
for all touch events.

The back button on the mouse is mapped to KEYCODE_BACK
and the forward button is mapped to KEYCODE_FORWARD.

Added basic plumbing for the secondary mouse button to invoke
the context menu, particularly in lists.

Added clamp and split methods on MotionEvent to take care of
common filtering operations so we don't have them scattered
in multiple places across the framework.

Bug: 4260011
Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
i/Input.h
i/InputTransport.h
89178d4de2964538c8a754df94c0911abe53c171 13-May-2011 Dianne Hackborn <hackbod@google.com> am 46a282f3: am 0ed2e845: Merge "DO NOT MERGE. Integrate add new screen width/height in "dp" configs." into honeycomb-mr2

* commit '46a282f323bc05606e4fe1eba795bd9ac7c99819':
DO NOT MERGE. Integrate add new screen width/height in "dp" configs.
88c0d696cc25defc021ae885811d1d52c482ebcf 13-May-2011 Dianne Hackborn <hackbod@google.com> DO NOT MERGE. Integrate add new screen width/height in "dp" configs.

You can now specify resource configuration variants "wNNNdp"
and "hNNNdp". These are the minimum screen width/height in "dp"
units. This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.

This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes. Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted. To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.

Change-Id: I4acb73d82677b74092c1da9e4046a4951921f9f4
tils/ResourceTypes.h
cf46eb9817dfbfc020720d1e45b5c085252500fb 12-May-2011 Mathias Agopian <mathias@google.com> fix onFrameAvailable

Change-Id: I391fe9f6684ac9fd4f91416ce18b583f7087d966
ui/SurfaceTexture.h
68c7794183a7dbfe3b20d4ce832f8eb79c2c619a 10-May-2011 Mathias Agopian <mathias@google.com> Add SurfaceTexture logging

Change-Id: If1b74be5230813fb76429935d88b9d4a7c41700c
ui/SurfaceTexture.h
8072711307aa98ee5ee6f7369860ae38c3e19656 03-May-2011 Mathias Agopian <mathias@google.com> Implement {Surface|SurfaceTextureClient}::setSwapInterval()

Change-Id: I8382e346ddaa2c4c8ff56ac3ffd7f0109572f188
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
b3e518c820c7dbe35587bd45c510e4e5e7cfd9c9 22-Apr-2011 Mathias Agopian <mathias@google.com> Add the concept of synchronous dequeueBuffer in SurfaceTexture

Change-Id: Ic94cbab092953243a0746e04bbe1b2eb0cc930ef
ui/SurfaceTexture.h
eafabcdc1639fb96062d9e3c39b0ae27b0238ae1 20-Apr-2011 Mathias Agopian <mathias@google.com> unify SurfaceTexture and Surface

Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
c04f153353cdb0d291297d10452239f791d3fd2b 26-Apr-2011 Mathias Agopian <mathias@google.com> Fix a bug where setgeometry couldn't be undone

This change the binder protocol between SurfaceTextureClient
and SurfaceTexture. dequeueBuffer() now takes the requested
parameters for the buffer. SurfaceTexture decides if the
buffer needs to be reallocated and does the allocation
if needed. In that case it returns BUFFER_NEEDS_REALLOCATION
to tell SurfaceTextureClient that it needs to call
requestBuffer (which all parameters have been removed) to
acquire a pointer to the buffer.

dequeueBuffer and requestBuffer could be folded into a single
IPC call, but we chose to optimize the case where buffers are
not created and avoid some complexity in the marshalling code.

Change-Id: I097a7f6f40a3491e10f3f3742eab33999286c304
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
d78797f6e69485f37dae9cb255f5287a06b65599 01-Apr-2011 Christopher Tate <ctate@google.com> Full local backup infrastructure

This is the basic infrastructure for pulling a full(*) backup of the
device's data over an adb(**) connection to the local device. The
basic process consists of these interacting pieces:

1. The framework's BackupManagerService, which coordinates the
collection of app data and routing to the destination.

2. A new framework-provided BackupAgent implementation called
FullBackupAgent, which is instantiated in the target applications'
processes in turn, and knows how to emit a datastream that contains
all of the app's saved data files.

3. A new shell-level program called "bu" that is used to bridge from
adb to the framework's Backup Manager.

4. adb itself, which now knows how to use 'bu' to kick off a backup
operation and pull the resulting data stream to the desktop host.

5. A system-provided application that verifies with the user that
an attempted backup/restore operation is in fact expected and to
be allowed.

The full agent implementation is not used during normal operation of
the delta-based app-customized remote backup process. Instead it's
used during user-confirmed *full* backup of applications and all their
data to a local destination, e.g. via the adb connection.

The output format is 'tar'. This makes it very easy for the end
user to examine the resulting dataset, e.g. for purpose of extracting
files for debug purposes; as well as making it easy to contemplate
adding things like a direct gzip stage to the data pipeline during
backup/restore. It also makes it convenient to construct and maintain
synthetic backup datasets for testing purposes.

Within the tar format, certain artificial conventions are used.
All files are stored within top-level directories according to
their semantic origin:

apps/pkgname/a/ : Application .apk file itself
apps/pkgname/obb/: The application's associated .obb containers
apps/pkgname/f/ : The subtree rooted at the getFilesDir() location
apps/pkgname/db/ : The subtree rooted at the getDatabasePath() parent
apps/pkgname/sp/ : The subtree rooted at the getSharedPrefsFile() parent
apps/pkgname/r/ : Files stored relative to the root of the app's file tree
apps/pkgname/c/ : Reserved for the app's getCacheDir() tree; not stored.

For each package, the first entry in the tar stream is a file called
"_manifest", nominally rooted at apps/pkgname. This file contains some
metadata about the package whose data is stored in the archive.

The contents of shared storage can optionally be included in the tar
stream. It is placed in the synthetic location:

shared/...

uid/gid are ignored; app uids are assigned at install time, and the
app's data is handled from within its own execution environment, so
will automatically have the app's correct uid.

Forward-locked .apk files are never backed up. System-partition
.apk files are not backed up unless they have been overridden by a
post-factory upgrade, in which case the current .apk *is* backed up --
i.e. the .apk that matches the on-disk data. The manifest preceding
each application's portion of the tar stream provides version numbers
and signature blocks for version checking, as well as an indication
of whether the restore logic should expect to install the .apk before
extracting the data.

System packages can designate their own full backup agents. This is
to manage things like the settings provider which (a) cannot be shut
down on the fly in order to do a clean snapshot of their file trees,
and (b) manage data that is not only irrelevant but actively hostile
to non-identical devices -- CDMA telephony settings would seriously
mess up a GSM device if emplaced there blind, for example.

When a full backup or restore is initiated from adb, the system will
present a confirmation UI that the user must explicitly respond to
within a short [~ 30 seconds] timeout. This is to avoid the
possibility of malicious desktop-side software secretly grabbing a copy
of all the user's data for nefarious purposes.

(*) The backup is not strictly a full mirror. In particular, the
settings database is not cloned; it is handled the same way that
it is in cloud backup/restore. This is because some settings
are actively destructive if cloned onto a different (or
especially a different-model) device: telephony settings and
AndroidID are good examples of this.

(**) On the framework side it doesn't care that it's adb; it just
sends the tar stream to a file descriptor. This can easily be
retargeted around whatever transport we might decide to use
in the future.

KNOWN ISSUES:

* the security UI is desperately ugly; no proper designs have yet
been done for it
* restore is not yet implemented
* shared storage backup is not yet implemented
* symlinks aren't yet handled, though some infrastructure for
dealing with them has been put in place.

Change-Id: Ia8347611e23b398af36ea22c36dff0a276b1ce91
tils/BackupHelpers.h
db05e228a4d170e644f27adc2d946558db53eb4e 10-May-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 05be6d6f to master

Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
d97f6b4ef9676a6ecc3d8a67f364687c885a9eaa 10-May-2011 Dianne Hackborn <hackbod@google.com> am 4907d1d5: am 0c6cbf41: Merge "Better compat mode part one: start scaling windows." into honeycomb-mr2

* commit '4907d1d5e2c7d244b07579b8c52153df69754e85':
Better compat mode part one: start scaling windows.
16fe3c2c1fac36507ec7190537c95944943b0cb2 28-Apr-2011 Dianne Hackborn <hackbod@google.com> Better compat mode part one: start scaling windows.

First step of improving app screen size compatibility mode. When
running in compat mode, an application's windows are scaled up on
the screen rather than being small with 1:1 pixels.

Currently we scale the application to fill the entire screen, so
don't use an even pixel scaling. Though this may have some
negative impact on the appearance (it looks okay to me), it has a
big benefit of allowing us to now treat these apps as normal
full-screens apps and do the normal transition animations as you
move in and out and around in them.

This introduces fun stuff in the input system to take care of
modifying pointer coordinates to account for the app window
surface scaling. The input dispatcher is told about the scale
that is being applied to each window and, when there is one,
adjusts pointer events appropriately as they are being sent
to the transport.

Also modified is CompatibilityInfo, which has been greatly
simplified to not be so insane and incomprehendible. It is
now simple -- when constructed it determines if the given app
is compatible with the current screen size and density, and
that is that.

There are new APIs on ActivityManagerService to put applications
that we would traditionally consider compatible with larger screens
in compatibility mode. This is the start of a facility to have
a UI affordance for a user to switch apps in and out of
compatibility.

To test switching of modes, there is a new variation of the "am"
command to do this: am screen-compat [on|off] [package]

This mode switching has the fundamentals of restarting activities
when it is changed, though the state still needs to be persisted
and the overall mode switch cleaned up.

For the few small apps I have tested, things mostly seem to be
working well. I know of one problem with the text selection
handles being drawn at the wrong position because at some point
the window offset is being scaled incorrectly. There are
probably other similar issues around the interaction between
two windows because the different window coordinate spaces are
done in a hacky way instead of being formally integrated into
the window manager layout process.

Change-Id: Ie038e3746b448135117bd860859d74e360938557
i/Input.h
697526bc9e44ce61c88614f98387ae8bbf0a187e 01-May-2011 Iliyan Malchev <malchev@google.com> frameworks/base: android_native_buffer_t -> ANativeWindowBuffer

Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
ui/SurfaceTextureClient.h
urfaceflinger/Surface.h
i/FramebufferNativeWindow.h
i/GraphicBuffer.h
ec10d231c0eaadbcb143932e5c1bb7c1953125a7 02-May-2011 Iliyan Malchev <malchev@google.com> frameworks/base: move ANativeWindow/android_native_buffer_t out

These definitions have been moved to system/core.

Change-Id: I021b6b5f2fd72d538b5ccdcb33860ebd3004d9ad
Signed-off-by: Iliyan Malchev <malchev@google.com>
i/android_native_buffer.h
i/egl/android_natives.h
41abd67302b52aefadc2b3dea42226f16bf6d9ba 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: make the ANativeWindow query() method const

query() does not modify the object's data, so it needs to be a const method

Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f
Signed-off-by: Iliyan Malchev <malchev@google.com>
ui/SurfaceTextureClient.h
urfaceflinger/Surface.h
i/FramebufferNativeWindow.h
i/egl/android_natives.h
75c1535eb3bde60dfa3438083540afddc01e1cec 03-May-2011 Mathias Agopian <mathias@google.com> remove last traces of copybit

Change-Id: Ia0f13a0ee6f702256482b5eb29d7fa2aa840bfc7
rivate/opengles/gl_context.h
9cdb01da71934e98b6732db0f5758ea4edd5d5c7 29-Apr-2011 Mathias Agopian <mathias@google.com> get rid of dependency on copybit HAL module

Change-Id: Ia608099a2426c11a91d33063ba53c93e1eccb428
rivate/opengles/gl_context.h
i/Region.h
d5b421aaa7fcab4329cdfe5d8b37fce7e8f39fa6 26-Apr-2011 Mathias Agopian <mathias@google.com> fix typo in Vector<>:: push_back and push_front

parameter were inverted.

Change-Id: I867b01de5f58354bb9668fa662dd2a7d78dd3b37
tils/Vector.h
e60e1fd23d8d12fc46fd867c8bc837fc581ffa1d 26-Apr-2011 Mathias Agopian <mathias@google.com> Add some basic STL compatibility to Vector<>

Change-Id: Iaf72623170ee415372c7989d7ba9ff627167449e
tils/Vector.h
0ef4e15a6c12778daf464a4953d7e15e651f49ac 20-Apr-2011 Mathias Agopian <mathias@google.com> Get rid of the "pid" parameter from createSurface

Change-Id: I28635e3f803e6abe965d79998e305f54a202465d
urfaceflinger/ISurfaceComposerClient.h
urfaceflinger/SurfaceComposerClient.h
96dfedc55cab10922c677e3c8da11dc51e80b30c 20-Apr-2011 Jeff Brown <jeffbrown@google.com> Merge "Initial checkin of spot presentation for touchpad gestures."
4815f2a6ada7941680b29581d5cf5a5ed168f618 13-Apr-2011 Jeff Brown <jeffbrown@google.com> Initial checkin of spot presentation for touchpad gestures.

Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements. The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: I5126b1e69d95252fda7f2a684c9287e239a57163
i/Input.h
7e3d7f341ab3789fe25064670374159a35e35ed3 19-Apr-2011 Mathias Agopian <mathias@google.com> Merge "changes to SurfaceTexture needed for unification with SF"
6e9eb7453fe81fd0bb06eaa263c1767765ef5a78 18-Apr-2011 Andreas Huber <andih@google.com> Merge "Parcel::appendFrom({const } Parcel *parcel, size_t, size_t)"
a36a302e92f4b6367663dec4ead42b67be4f9a5c 16-Apr-2011 Mathias Agopian <mathias@google.com> Merge "Fix a GraphicBuffer leak in SurfaceTexture"
a2ad6b74a30ab40dc62a668d8a54923984db514e 08-Mar-2011 Bjorn Bringert <bringert@android.com> Add Java API for writing TTS engines

This removes the old non-public C++ API for TTS
engines and replaces it with a Java API.

The new API is still @hidden, until it has been approved.

Bug: 4148636
Change-Id: I7614ff788e11f897e87052f684f1b4938d539fb7
ts/TtsEngine.h
51faf46e2958c57dab46d9420e585319125c7c42 13-Apr-2011 Andreas Huber <andih@google.com> Parcel::appendFrom({const } Parcel *parcel, size_t, size_t)

As far as I can tell "parcel" isn't actually modified by the implementation.

Change-Id: Ib806eefdc13c97b932773e1dc9ca3a4aad4422b2
inder/Parcel.h
81bc5677452b5433d5214e7976224c8d0f29fbcb 12-Apr-2011 Kenny Root <kroot@google.com> resolved conflicts for merge of 18490fb9 to master

Change-Id: I6c68e6fb0f9c1182a955689bbffc161a8f30bd37
f6bbefd581a28c2b3c8db74efe66eabdc23ab0b3 12-Apr-2011 Kenny Root <kroot@google.com> resolved conflicts for merge of 87b3c0dc to honeycomb-plus-aosp

Change-Id: Ia1a0024aabf531438203eb9fea3a10dd15eabe53
7a042bf324fe3f3d5d4085fda21fe50dc0c362b4 12-Apr-2011 Mathias Agopian <mathias@google.com> changes to SurfaceTexture needed for unification with SF

- implement connect/disconnect
- implement missing query
- handle texture_2d in addition to texture_external_oes

Change-Id: I971a70821f00f22b01f5337de4a7d451177fec4d
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
8a1a61517645ea989b9045eb209ba1d6fdc23cd8 12-Apr-2011 Kenny Root <kroot@android.com> am 08d9d9a4: Merge "Runtime resource overlay, iteration 1."

* commit '08d9d9a46250c4fad66e9b637e8898a3524c4286':
Runtime resource overlay, iteration 1.
4cb18881b55b82a24873ccd8e298bc2d5a9c17e5 09-Apr-2011 Mathias Agopian <mathias@google.com> Fix a GraphicBuffer leak in SurfaceTexture

This leak was intentional, it was there to deal with the fact that
some gralloc implementations don't track buffer handles with
file-descriptors so buffers needed to stay alive until there were
registered, which is not guaranteed by binder transactions.

In this new implementation, we use a small BBinder holding a
reference to the buffer, which with tuck into the parcel. This forces
the reference to stay alive until the parcel is destroyed, which
is guaranteed (by construction) to happen after the buffer is
registered.

this allows the public facing API to not expose the previous hack.

Change-Id: I1dd6cd83679a2b7457ad628169e2851acc027143
ui/SurfaceTexture.h
urfaceflinger/IGraphicBufferAlloc.h
b561dd29b554d7af4ee207ef29c0a7cbcc0b5e17 06-Apr-2011 Mathias Agopian <mathias@google.com> Merge "remove more unused references to ISurface"
592e3fc1509793e592ba99725736ce4995af8cb3 31-Mar-2011 Dianne Hackborn <hackbod@google.com> Add new resource configurations for screen width/height in "dp".

You can now specify resource configuration variants "wNNNdp"
and "hNNNdp". These are the minimum screen width/height in "dp"
units. This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.

This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes. Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted. To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.

Change-Id: I22f8afa136b4f274423978c570fa7c9855040496
tils/ResourceTypes.h
47d8730a2463f38a695ab95b533b0d9728f266a3 06-Apr-2011 Mathias Agopian <mathias@google.com> remove more unused references to ISurface

Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
urfaceflinger/Surface.h
27fd410be493f2d09c1ec5c4a9f19ad2b2fe4012 01-Apr-2011 Mathias Agopian <mathias@google.com> Merge "SurfaceTexture can now force the client to request a buffer"
a5c75c01620179ce00812354778a29a80d76e71f 01-Apr-2011 Mathias Agopian <mathias@google.com> SurfaceTexture can now force the client to request a buffer

SurfaceTexture now has the concept of default size a new method,
setDefaultBufferSize() to set it. When the default size is
changed, dequeueBuffer() will return a value telling the
client that it must ask for a new buffer.

The above only applies if the client has not
overriden the buffer size with setGeometry.

Change-Id: I520dc40363054b7e37fdb67d6a2e7bce70326e81
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
02988ec716897ac6d501e732fc7cbef612d5fab6 01-Apr-2011 Jeff Brown <jeffbrown@google.com> Merge "Add a little input event consistency verifier."
5f29c87ef2ed197e19b614d306dbbd24a283305d 17-Mar-2011 MÃ¥rten Kongstad <marten.kongstad@sonyericsson.com> Runtime resource overlay, iteration 1.

Runtime resource overlay allows unmodified applications to appear
as if they had been compiled with additional resources defined. See
libs/utils/README for more information.

This commit is the first iteration of runtime resource overlay. It
provides the actual overlay modifications and loading of trusted overlay
packages (ie residing in /vendor) targeting framework-res.apk.

This commit loads exactly one overlay package. The overlay,
if present, must target framework-res.apk and be located at
/vendor/overlay/framework/framework-res.apk.

Change-Id: If26ee7754813004a96c043dba37fbe99fa3919db
tils/AssetManager.h
tils/ResourceTypes.h
3847f62209bef63735e8f72d04af1d845f67301c 01-Mar-2011 Jeff Brown <jeffbrown@google.com> Add a little input event consistency verifier.

The idea is to assist with debugging by identifying cases in which
the input event stream is corrupted.

Change-Id: I0a00e52bbe2716be1b3dfc7c02a754492d8e7f1f
i/Input.h
7faee43a9dd6efbb2a4d8e495024eb5b833e1871 01-Apr-2011 Russell Brenner <russellbrenner@google.com> am c6b22e27: Updated JBQ\'s original SurfaceTexture stubs to make webkit MR1 buildable

* commit 'c6b22e2727bd3730edd5ad72831a9bb4670d00f3':
Updated JBQ's original SurfaceTexture stubs to make webkit MR1 buildable
0686717d7968719a85bfbf841052066a3a182e65 01-Apr-2011 Russell Brenner <russellbrenner@google.com> Updated JBQ's original SurfaceTexture stubs to make webkit MR1 buildable

Change-Id: If1c1610efcc0e0bc6de88c75712baed91624b1a7
ui/SurfaceTexture.h
8f2fff35b01f704ac7999220d16e15e950230049 31-Mar-2011 Jeff Brown <jeffbrown@google.com> Merge "Add input filter mechanism for accessibility."
37159af66d7c594f4f1494d4112d087bd03e328e 30-Mar-2011 Jeff Brown <jeffbrown@google.com> Add input filter mechanism for accessibility.

This patch adds a mechanism for capturing, filtering, transforming
and injecting input events at a very low level before the input
dispatcher attempts to deliver them to applications. At this time,
the mechanism is only intended to be used by the accessibility
system to implement built-in system-level accessibility affordances.

The accessibility input filter is currently just a stub.
It logs the input events receives and reinjects them unchanged,
except that it transforms KEYCODE_Q into KEYCODE_Z.

Currently, the accessibility input filter is installed whenever
accessibility is enabled. We'll probably want to change that
so it only enables the input filter when a screen reader is
installed and we want touch exploration.

Change-Id: I35764fdf75522b69d09ebd78c9766eb7593c1afe
i/Input.h
1cd921eab3f7feb2391a22c374c408564779cc6e 31-Mar-2011 Mathias Agopian <mathias@google.com> Revert "retire android_native_window_t"

this type is still used by partner's source trees.
we will get rid of it in next release's timeframe.

This reverts commit 7b49b976277cb3538242151e7dbd24681ddec73e.
i/egl/android_natives.h
5cfbdc87d631cd2c885a365177ab44b38fa55186 24-Mar-2011 Iliyan Malchev <malchev@google.com> retire android_native_window_t

Change-Id: I232c526168e1a93977d1c2d0fa74c8937cdeb23b
Signed-off-by: Iliyan Malchev <malchev@google.com>
i/egl/android_natives.h
f98f1364f802d7637b0304722f38efdfed758e6e 18-Mar-2011 Jeff Brown <jeffbrown@google.com> Merge "Refactor how timeouts are calculated."
c0a5e8df03d949cb307a0eb98f0222086c0434c1 17-Mar-2011 Jeff Brown <jeffbrown@google.com> Refactor how timeouts are calculated.

Added a timeout mechanism to EventHub and InputReader so that
InputMappers can request timeouts to perform delayed processing of
input when needed.

Change-Id: Iec2045baaf4e67690b15eef3c09a58d5cac76897
tils/Timers.h
edc5ac145b136fe15203996b2c4b7a54c6f574b0 17-Mar-2011 Eino-Ville Talvala <etalvala@google.com> Merge "Add support for timestamps into SurfaceTexture."
1d01a12e7150be569557b64da9b8663c62c13594 18-Feb-2011 Eino-Ville Talvala <etalvala@google.com> Add support for timestamps into SurfaceTexture.

API addition: The timestamps are represented as nanoseconds from some
arbitrary time point. Like the SurfaceTexture transform matrix, the
timestamp retrieved by getTimestamp is for the last frame sent to the
GL texture using updateTexImage().

Camera HAL change: Expect vendors to set these timestamps using
native_window_set_buffers_timestamp(). For now, they are
autogenerated by SurfaceTextureClient if set_buffers_timestamp() is
never called, but such timing is likely not accurate enough to pass a
CTS test.

bug:3300707

Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
urfaceflinger/Surface.h
i/egl/android_natives.h
939fee8819ac714af6f99b1d8e0bd2ff6626a356 17-Mar-2011 Mathias Agopian <mathias@google.com> am e22aa623: am 25594e19: am f40e638e: fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out

* commit 'e22aa62362a3007ee59ac62d4b5969e216987995':
fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
d0b55c011a311b677493ba72804bf1bc4df68224 17-Mar-2011 Mathias Agopian <mathias@google.com> fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out

a memory corruption happned when the buffer pool was resized
(like when playing a video or using camera) and there was
no current active buffer. In this case, the faulty code
would index into an array at position -1 which corrupted
24 bytes of data.

also improved region validation code (ifdef'ed out by default)

Bug: 4093196
Change-Id: I915c581d131148959d720e00e3892e9186ab733d
tils/Vector.h
043e3d42f1e3e420ecdc6b44ba3809bad52a6763 17-Mar-2011 Romain Guy <romainguy@google.com> am 72064c66: am b0204d0a: am c2b91a61: Merge "Modify the GL renderer\'s functor to pass the clip to WebView" into honeycomb-mr1

* commit '72064c66e20b9cc86900a9d833c228c345a2b2a4':
Modify the GL renderer's functor to pass the clip to WebView
a08152f43c01035373fd56500e40d5bf7996a689 16-Mar-2011 Romain Guy <romainguy@google.com> Modify the GL renderer's functor to pass the clip to WebView

Change-Id: If5efe399ca58f3000b2883e24e9f3736a2025184
tils/Functor.h
5aaab9c6d865044aacbcfa22f4b00f9c2b715c3c 08-Mar-2011 Jeff Brown <jeffbrown@google.com> Add 3D mode key and others.

Related to an AOSP change request.

Change-Id: I3f4f84b56a1af626a8783f5ecbb823eb12ba9fbe
i/KeycodeLabels.h
e3d4a68f2d09098bda8c6ca6c3826877365c7267 16-Mar-2011 Jeff Brown <jeffbrown@google.com> Merge "Improve VelocityTracker numerical stability."
1593354388f622f189063314e97389f148a30b7f 15-Mar-2011 Jeff Brown <jeffbrown@google.com> Improve VelocityTracker numerical stability.

Replaced VelocityTracker with a faster and more accurate
native implementation. This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation. This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces. The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I2632321232c64d6b8faacdb929e33f60e64dcdd3
i/Input.h
tils/BitSet.h
77b6f0a9ede757388e799e71b6ea5006479900f9 15-Mar-2011 Glenn Kasten <gkasten@google.com> am 7d7dcb5e: am 4528a7db: Merge "Bug 4016329 do full string comparisons" into honeycomb-mr1

* commit '7d7dcb5ea891ad4c3252ed832ebd06accc96153d':
Bug 4016329 do full string comparisons
ad4c66d8bbeaed8e6be3a57e2b45976af30866fc 15-Mar-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 4016329 do full string comparisons" into honeycomb-mr1
3f13cf1be5b649b1d6ce8912ace80aa8aa58880b 15-Mar-2011 Jamie Gennis <jgennis@google.com> am c570ee21: am 41a894ad: am 75597105: Merge "SurfaceTextureClient: Add ISurfaceTexture getter." into honeycomb-mr1

* commit 'c570ee21e2c2b9802c9d1f58dba024e884b225e6':
SurfaceTextureClient: Add ISurfaceTexture getter.
cefc876234dcbbc3f973862c8c8bbdf4dc18296e 15-Mar-2011 Jamie Gennis <jgennis@google.com> am ceb7cb14: am 02805a40: Merge "ANativeWindow: add query for the concrete type." into honeycomb-mr1

* commit 'ceb7cb1460484eda1a3cb9cd271d7caf3a3dcbd1':
ANativeWindow: add query for the concrete type.
bb959f5b10374fdc6665b2ac1c18a07cea6effb7 14-Mar-2011 Glenn Kasten <gkasten@google.com> Bug 4016329 do full string comparisons

Use full string comparisons instead of partial for
file extension and MIME type.
Do case-insensitive comparison of MIME type and file extensions.
Fix error in comment for String8::getPathExtension.
Remove dead code -- StringTokenizer is unused.

Change-Id: I322be6235abbdaab5f7eafa48926dbb2cf46dc29
tils/String8.h
bae774eb20bebd409441b93386b51bccda75f546 14-Mar-2011 Jamie Gennis <jgennis@google.com> SurfaceTextureClient: Add ISurfaceTexture getter.

This change adds a getter method to SurfaceTextureClient to get the
ISurfaceTexture object with which the SurfaceTextureClient is
communicating.

Bug: 4086509
Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
ui/SurfaceTextureClient.h
391bbe2246a7547dbf3460c231b3c5ba691d4eb1 14-Mar-2011 Jamie Gennis <jgennis@google.com> ANativeWindow: add query for the concrete type.

This change adds a query to the ANativeWindow interface for getting the
concrete type of the ANativeWindow.

Bug: 4086509
Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
i/egl/android_natives.h
fa773aa745325263745202f822335dfeec0e4c67 10-Mar-2011 Jeff Brown <jeffbrown@google.com> Use touch pad gestures to manipulate the pointer.

1. Single finger tap performs a click.
2. Single finger movement moves the pointer (hovers).
3. Button press plus movement performs click or drag.
While dragging, the pointer follows the finger that is moving
fastest. This is important if there are additional fingers
down on the touch pad for the purpose of applying force
to an integrated button underneath.
4. Two fingers near each other moving in the same direction
are coalesced as a swipe gesture under the pointer.
5. Two or more fingers moving in arbitrary directions are
transformed into touches in the vicinity of the pointer.
This makes scale/zoom and rotate gestures possible.

Added a native VelocityTracker implementation to enable intelligent
switching of the active pointer during drags.

Change-Id: I5ada57e7f2bdb9b0a791843eb354a8c706b365dc
i/Input.h
tils/BitSet.h
15a4fd40c776f02e3e4580224dacc8f62d6b366c 10-Mar-2011 Jeff Brown <jeffbrown@google.com> am e6f0ae12: am efd3266b: Input improvements and bug fixes.

* commit 'e6f0ae12b18819424dd8395b433a8fc9caefa77b':
Input improvements and bug fixes.
46689da7ee29902f2ebebd6224f566c4deccc274 09-Mar-2011 Jeff Brown <jeffbrown@google.com> Input improvements and bug fixes.

Associate each motion axis with the source from which it comes.
It is possible for multiple sources of the same device to define
the same axis. This fixes new API that was introduced in MR1.
(Bug: 4066146)

Fixed a bug that might cause a segfault when using a trackball.

Only fade out the mouse pointer when touching the touch screen,
ignore other touch pads.

Changed the plural "sources" to "source" in several places in
the InputReader where we intend to refer to a particular source
rather than to a combination of sources.

Improved the batching code to support batching events from different
sources of the same device in parallel. (Bug: 3391564)

Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
i/Input.h
748824428224f81214b601278ceee70c71ccfa14 10-Mar-2011 Jamie Gennis <jgennis@google.com> am 7b13e27e: am 6167a390: Merge "ANativeWindow: add queues-to-window-composer check." into honeycomb-mr1

* commit '7b13e27ee4a42c205b4a20d145610e8c912e7b0c':
ANativeWindow: add queues-to-window-composer check.
ec8a5ef78dc356fdfa3313e6e54c7074ecc9ea42 09-Mar-2011 Jamie Gennis <jgennis@google.com> Merge "ANativeWindow: add queues-to-window-composer check." into honeycomb-mr1
134f0422866e8985188ed10dfbdcb8e6c34b87f7 08-Mar-2011 Jamie Gennis <jgennis@google.com> ANativeWindow: add queues-to-window-composer check.

This change adds a new 'method' to the ANativeWindow interface to check
whether buffers queued to the window will be sent directly to the system
window compositor.

Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d
Bug: 3495535
urfaceflinger/ISurfaceComposer.h
i/egl/android_natives.h
8c5cffc2e5c0d48ebf10c4da9a382cf4b1159891 08-Mar-2011 Romain Guy <romainguy@google.com> am d00353fe: am bc8a8e8c: Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1

* commit 'd00353fe3191571a6773ef2d11921cfcff260bc4':
Add support for partial invalidates in WebView Bug #3461349
8a2a2f46895ddd38e346c9c0a8d47aaa2f54f52b 08-Mar-2011 Romain Guy <romainguy@google.com> Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1
9fb2277f39ddd2575fc55b450d440087e1ddcac0 08-Mar-2011 Romain Guy <romainguy@google.com> Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
tils/Functor.h
5f1e78d7301c2a14c83de068f61e13aaed9494a8 08-Mar-2011 Mathias Agopian <mathias@google.com> am df6410dc: Merge "Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only" into gingerbread

* commit 'df6410dce3dae0bdb7e13118b3878079a1dcce03':
Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only
ee65ac8a71c24fc154b513faa13d24b4d4dfee4f 10-Feb-2011 Mathias Agopian <mathias@google.com> Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only

37c2a37 fix [3408713] Dialog window invisible sometimes
d35c666 fix [3385504] Surface flinger hang when adding dim surface
1723b04 fix [3389263] OMX.Nvidia.h264.decode fails to shutdown
1b0114f fix a surface leak in SurfaceFlinger

Bug: 3513017

Change-Id: Ia13ed8c9cdcb1f484e177cdcaff687e7c88a10c3
tils/RefBase.h
e89d1041ddc81a85c73f00f94a978e32597afa68 04-Mar-2011 Jeff Brown <jeffbrown@google.com> Joystick tweaks. (DO NOT MERGE)

Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions
even when noise filtering is applied. (Bug: 3514510)

Add support for a few more standard axes.

Add additional mapping modes for axes.
Some axes are inverted from standard interpretation
or are actually intended to be split into two distict axes
such as left/right trigger controls or accelerator/brake.

Add key layout file for a G25 racing wheel and XBox 360 controller
to tweak behavior. They work fine without them but the axis mappings
are not ideal.

Change-Id: I0fddd90309af4dc14d35f34fe99ed6e521c0b7c7
i/KeyLayoutMap.h
i/KeycodeLabels.h
8bb99ad892a7e64e0d1b55c1c7aaf8147bf4bfc6 04-Mar-2011 Jeff Brown <jeffbrown@google.com> Joystick tweaks.

Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions
even when noise filtering is applied. (Bug: 3514510)

Add support for a few more standard axes.

Add additional mapping modes for axes.
Some axes are inverted from standard interpretation
or are actually intended to be split into two distict axes
such as left/right trigger controls or accelerator/brake.

Add key layout file for a G25 racing wheel and XBox 360 controller
to tweak behavior. They work fine without them but the axis mappings
are not ideal.

Change-Id: Id4c86a0a272331c680039a9bde6815bb7eba44ab
i/KeyLayoutMap.h
i/KeycodeLabels.h
b83025cf804c9a7725549e22e89cf78f99ca91f2 03-Mar-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add TextLayout Cache"
d5ed285606a9f28d2102e086aaee5c9d1cb819b9 03-Mar-2011 Jeff Brown <jeffbrown@google.com> Wake screen from external HID peripherals.

Added some plumbing to enable the policy to intercept motion
events when the screen is off to handle wakeup if needed.

Added a basic concept of an external device to limit the scope
of the wakeup policy to external devices only. The wakeup policy
for internal devices should be based on explicit rules such as
policy flags in key layout files.

Moved isTouchEvent to native.

Ensure the dispatcher sends the right event type to userActivity
for non-touch pointer events like HOVER_MOVE and SCROLL.

Bug: 3193114
Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
i/Input.h
80f3e7cc1506bbb4bec458e15629805a7c1df7ee 02-Mar-2011 Jeff Brown <jeffbrown@google.com> Fade out the mouse pointer after inactivity or other events.

Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down

Extended the native Looper to support enqueuing time delayed
messages. This is used by the PointerController to control
pointer fade timing.

Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
i/Input.h
i/Keyboard.h
tils/Looper.h
e88a9a42cadc75caa070ce6be1858f52973e5acd 25-Feb-2011 Fabrice Di Meglio <fdimeglio@google.com> Add TextLayout Cache

- use GenerationCache for caching
- move GenerationCache.h from libs/hwui/utils to include/utils
- add #define for cache activation / deactivation

Change-Id: Ifaf519f0b5e33b087a453e4aa6430162d8438f20
tils/GenerationCache.h
17290c55839aef269b59fc3ac83a165e3e519884 02-Mar-2011 Mathias Agopian <mathias@google.com> Merge "Add support for up to 32 buffers per Surface"
ea72db37375bf5ca8302d442c78dc691368ba6a6 01-Mar-2011 Jamie Gennis <jgennis@google.com> Merge "Add the MIN_UNDEQUEUED_BUFFERS query to ANW."
acd116daeae2b30f0a221658cb367a9831351af1 01-Mar-2011 Mathias Agopian <mathias@google.com> Add support for up to 32 buffers per Surface

Bug: 3488016

Change-Id: Ie5536ad77d42a4d0e8270e0fd87ecb73471bcbbc
rivate/surfaceflinger/SharedBufferStack.h
b1586e69a15639f26a1bbeada0b4a88977d44204 28-Feb-2011 Christopher Tate <ctate@google.com> Merge "Binder linkage no longer depends on JNI objrefs as persistent tokens"
9d4d6c101d90d4a1d1ca9413cf3eb89d1f1898d6 27-Feb-2011 Jamie Gennis <jgennis@google.com> Add the MIN_UNDEQUEUED_BUFFERS query to ANW.

This change adds a new query to ANativeWindow for getting the minimum
number of buffers that must be left un-dequeued during the steady-state
operation of the ANativeWindow.

Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551
Related-Bug: 3356050
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
urfaceflinger/Surface.h
i/egl/android_natives.h
71f64dd876262407ff2636827de64ccde9c2088b 17-Feb-2011 Christopher Tate <ctate@google.com> Binder linkage no longer depends on JNI objrefs as persistent tokens

There are two areas that have changed to eliminate the assumption that
local jobject references are both canonical and persistent:

1. JavaBBinderHolder no longer holds onto and reuses it parent object
reference per se. Since the underlying JavaBBinder object holds a
real global ref, this was redundant anyway. Now, for purposes of its
transient need to perform JNI operations, it simply uses the current
jobject ref(s) passed during method invocation, and no longer attempts
to hold these refs beyond the scope of a single invocation.

2. Binder obituaries no longer assume that a jobject reference to a
recipient will always compare == as a 32-bit value with any future
reference to the same object. The implementation now asks Dalvik
whether object references match.

This amended patch fixes the earlier bug around races between
remote binder death cleanup and local explicit unregistration of
VM-side death recipients.

Bug 2090115

Change-Id: I70bd788a80ea953632b1f466f385ab6b78ef2913
inder/IBinder.h
32bebb0a58dd9c699aed8045ca2e752f681e5a0f 26-Feb-2011 Mathias Agopian <mathias@google.com> Fix sp<> conversion operator / constructor

some of the conversion operators were not using the proper
pointer type when calling incStrong/decStrong, usually it
has no bad consequences, but for some implementation
of the ref-counted object it could lead to recording the wrong
owner id.

Change-Id: If574b9069b8a4cf6e0911a992c8f095aba799995
tils/StrongPointer.h
9f5b53d4b09e6e835828d46f3a505ba877b230a3 25-Feb-2011 Christopher Tate <ctate@google.com> Revert "Binder linkage no longer depends on JNI objrefs as persistent tokens"

This reverts commit c2d55dd89743c8a38deb809f3cdf1ad2d1dbac2b.
inder/IBinder.h
d4e5832b694614990f24ab107df65ff2d17a0292 25-Feb-2011 Mathias Agopian <mathias@google.com> Merge "Fix a wp<> bug where the owner ID would be wrong"
d005004f1419e51680ea69a78e6835a7d1b71aac 25-Feb-2011 Mathias Agopian <mathias@google.com> Fix a wp<> bug where the owner ID would be wrong

this was introduced recently. we make sure to use
the correct owner id (the sp) instead of the wp.

Change-Id: I78fdc6ec0c2d3e687278b70442d74d1924b512a2
tils/RefBase.h
tils/StrongPointer.h
da26c6662db6ad76f214df0e7ebe9fe3b211c0fe 25-Feb-2011 Mathias Agopian <mathias@google.com> Merge "Fix some issues with RefBase debugging."
5a5ca785e281427fee7ed7f028658ee173e3c26d 24-Feb-2011 Christopher Tate <ctate@google.com> Merge "Binder linkage no longer depends on JNI objrefs as persistent tokens"
c811e7a77594329871183411ce03420882d5e000 17-Feb-2011 Christopher Tate <ctate@google.com> Binder linkage no longer depends on JNI objrefs as persistent tokens

There are two areas that have changed to eliminate the assumption that
local jobject references are both canonical and persistent:

1. JavaBBinderHolder no longer holds onto and reuses it parent object
reference per se. Since the underlying JavaBBinder object holds a
real global ref, this was redundant anyway. Now, for purposes of its
transient need to perform JNI operations, it simply uses the current
jobject ref(s) passed during method invocation, and no longer attempts
to hold these refs beyond the scope of a single invocation.

2. Binder obituaries no longer assume that a jobject reference to a
recipient will always compare == as a 32-bit value with any future
reference to the same object. The implementation now asks Dalvik
whether object references match.

Bug 2090115

Change-Id: If62edd554d0a9fbb2d2977b0cbf8ad7cc8e2e68d
inder/IBinder.h
3477a8cff2cf0eb5fcec03b0dc8ef9dcf64c0eb4 24-Feb-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 3362814 Fix SMP race in access to mRequestExit"
f14a1046e7242222300bbe88d530c3b531fc7678 17-Feb-2011 Mathias Agopian <mathias@google.com> Fix some issues with RefBase debugging.

First slipt sp<> out of RefBase into StrongPointer.h so it can be reused
more easily and to make it clear that it doesn't require RefBase.

Note: the rest of the change only affects the system when DEBUG_REFS is enabled.

The main problem we fix here is that the owner id associated with each
reference could get out of date when a sp<> or wp<> was moved, for
instance when they're used in a Vector< >.

We fix this issue by calling into RefBase::moveReferences from
a template specialization for sp<TYPE> and wp<TYPE> of the
type helpers. RefBase::moveReferences() has then a chance to
update the owner ids.

There is a little bit of trickery to implement this generically in
RefBase, where we need to use a templatized functor that can turn
a sp<TYPE>* casted to a void* into a RefBase*.

Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS
currently set to 0 by default as there seem to be an issue
with sp<ANativeWindow> which trips the sanity checks.

Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
tils/RefBase.h
tils/StrongPointer.h
tils/TypeHelpers.h
7e453a51a5436c6c8c49c1e37cea5077bce09405 01-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3362814 Fix SMP race in access to mRequestExit

Also fix an unlikely SMP race in access to mHoldSelf on entry to _threadLoop.

Change-Id: I6cbc0b94739c7dd5e77e8a5ba0da22cdc0b1a4db
tils/threads.h
a08ef4932fc6dcb812a7ceb5a87e8d144a6adda4 17-Feb-2011 Mathias Agopian <mathias@google.com> Remove RefBase.h dependency on TextOutput.h

Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
tils/RefBase.h
3ea4de826d95c580c28d854c677ded0d15d220a8 19-Feb-2011 Jeff Brown <jeffbrown@google.com> Add new axes for joysticks and mouse wheels.

Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
i/Input.h
i/KeyLayoutMap.h
i/Keyboard.h
i/KeycodeLabels.h
b2d4435dfa44531ee6025563571cfd77cd1b4f97 17-Feb-2011 Jeff Brown <jeffbrown@google.com> Fix a regression with MotionEvent parceling.

Also added some more unit tests.

Change-Id: I413654294d1a998eec056884e6df5eaa50f3daf4
i/Input.h
3e3414636c71948e3f4b162b4e5b773c77d37098 15-Feb-2011 Jeff Brown <jeffbrown@google.com> Add support for arbitrary axes in MotionEvents.

This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.

The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.

Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
i/Input.h
a240734bae673378ed331da9edf8d0eea654654d 11-Feb-2011 Jean-Baptiste Queru <jbq@google.com> am 93552de8: Merge "stubs"

* commit '93552de8e305027fb003401e347b9493c64c981f':
stubs
58c40337d0b2b9af6ea2357ab6122ba23590c649 11-Feb-2011 Steve Block <steveblock@google.com> stubs

Change-Id: I6bc0b8e9d4412a0b60c6226fbd2b7a6d15aceb22
ui/SurfaceTexture.h
51625d69a093bab608c6c09a03597b59c6807598 11-Feb-2011 Mathias Agopian <mathias@google.com> am c6c3e77d: am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into honeycomb

* commit 'c6c3e77d4d5cd8de3b1a56bdffdfd42774849512':
fix [3408713] Dialog window invisible sometimes
a878ce287d0fc0555c15a3f11c2f04569318e799 11-Feb-2011 Mathias Agopian <mathias@google.com> am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into honeycomb

* commit 'b66b7a2c183a1423ea629d4f73ed95f9b87d54b7':
fix [3408713] Dialog window invisible sometimes
7802bbd20fc54f255f3ad83fb31993129078c69f 10-Feb-2011 Mathias Agopian <mathias@google.com> fix [3408713] Dialog window invisible sometimes

weak pointer comparison operators were implemented wrong,
they were using the internal "unsafe" pointer. We could end up
with two "equal" weak pointer pointing to different objects.

this caused KeyedVector keyed by weak pointer to work incorrectly, in
turn causing a window that just got added to a list to be immediately
removed.

Change-Id: Ib191010c39aafa9229109e4211f6c3b2b2f9696d
tils/RefBase.h
08b4ea31a8e265025066ed94b02f08819fac46e5 03-Feb-2011 Jamie Gennis <jgennis@google.com> am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb

* commit '421d94c20321e1de528416b279bf148baba47b39':
Pass the IGraphicBufferAlloc to SurfaceTextureClient.
d7a3ebe031daa250e9987760aeee0384649a9c01 03-Feb-2011 Jamie Gennis <jgennis@google.com> am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb

* commit 'ecb4b3f02340e21eefabbea78559e85ec7ee0089':
Pass the IGraphicBufferAlloc to SurfaceTextureClient.
1b20cde313b5ef8acdace742328df867956d24cb 03-Feb-2011 Jamie Gennis <jgennis@google.com> Pass the IGraphicBufferAlloc to SurfaceTextureClient.

This change passes a reference to the IGraphicBufferAlloc binder object
to SurfaceTextureClient objects. When STC objects are created they
query their associated ISurfaceTexture object for the
IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers.
Having the SurfaceTextureClient hold this reference prevents the
GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers
before the SurfaceTextureClient is done with them.

Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c
related-bug: 3362519
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
9d0925821778bd4f91d1c5eb187bb9a62fc84891 31-Jan-2011 Jean-Baptiste Queru <jbq@google.com> am a6fb375c: am 056340ac: Merge "stubs"

* commit 'a6fb375cf727b6ded057110875fe49a9b3f230a3':
stubs
65881cf8b0e697465dd5493130f4a00b31924814 31-Jan-2011 Jean-Baptiste Queru <jbq@google.com> Merge "stubs"
79676ac8e6a95fd1b1fad2b1032f01d582614055 31-Jan-2011 Jamie Gennis <jgennis@google.com> am 09443aeb: am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb

* commit '09443aeb6470d66f5bc1938b70d74b3e2f9bbbb9':
Reset ANativeWindow crop on buffer geometry changes.
c043fa28b907613b7ddf67b622a804b3c8ac2185 31-Jan-2011 Jamie Gennis <jgennis@google.com> am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb

* commit '628845056282a0c5b1a212ce5aeeaac092b91ec8':
Reset ANativeWindow crop on buffer geometry changes.
36373fcf1503963dd5b17cd2281bb163e4b4993e 30-Jan-2011 Dianne Hackborn <hackbod@android.com> am 371de969: am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"

* commit '371de9695508073fbbde8181eb230e99cb045206':
Normalize output from aapt d
402960177f9539e4e66623c82f0d123c9b4ba5a1 30-Jan-2011 Dianne Hackborn <hackbod@android.com> am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"

* commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234':
Normalize output from aapt d
a8eea2f3d98fb510803085635ba331e7026902b5 30-Jan-2011 Dianne Hackborn <hackbod@android.com> am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"

* commit 'a30063d80c08434ac3c7316f338c6d54110449ab':
Normalize output from aapt d
73431999abce9b5b5e5797af9af9a884f10f6770 30-Jan-2011 Dianne Hackborn <hackbod@android.com> Merge "Normalize output from aapt d"
8e543c60f5541ed7ae2f12ef3965bb3efa6ea5ed 29-Jan-2011 Jean-Baptiste Queru <jbq@google.com> stubs

Change-Id: I829039f3817a172e66eeb9df397e896a488a259d
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
tils/Functor.h
68f9127e88ca6fd849d0f28bcd8776e04aab22e6 29-Jan-2011 Jamie Gennis <jgennis@google.com> Reset ANativeWindow crop on buffer geometry changes.

This changes the ANativeWindow API and the two implementations to reset
the window's crop rectangle to be uncropped when the window's buffer
geometry is changed.

Bug: 3359604
Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
i/egl/android_natives.h
16f0453fee84c6aad59fe0d1c7d36f061d46cffc 20-Jan-2011 Glenn Kasten <gkasten@google.com> Protected surface API

To be used by DRM framework, implemented by display HAL

Change-Id: I054a07a94f4d5dbe792f3a597e2e49a100d90eb2
urfaceflinger/ISurfaceComposer.h
i/GraphicBuffer.h
ae1d9d7412ff03d76641b75cfa8c7ddecf123b55 26-Jan-2011 Jeff Brown <jeffbrown@google.com> am 12b2dc90: am b1e0a870: Merge "Fix crashes caused by some input devices." into honeycomb

* commit '12b2dc90883ef4f930a17907acdef3677b0598a5':
Fix crashes caused by some input devices.
eb8b9d8a22f521816ce691077ae625eeb9dbb6e0 26-Jan-2011 Jeff Brown <jeffbrown@google.com> Fix crashes caused by some input devices.

The touch screen sometimes reports more than 10 pointers even though that's
all we asked for. When this happens, we start dropping events with more
than 10 pointers. This confuses applications and causes them to crash.
Raised the limit to 16 pointers.
Bug: 3331247

The default behavior was to identify all touch devices as touch screens.
External devices that are plugged in are more likely to be touch pads
not attached to a screen. Changed the default to be a touch pad
and renamed some internal constants to avoid confusion.

A certain mouse happens to also behave like a touch pad. That caused
problems because we would see multiple concurrent traces of motion events
coming from the same input device so we would batch them up.
Added code to ensure that we don't batch events unless they come from
the same *source* in addition to coming from the same *device*.

Due to batching or misbehaving drivers, it's possible for the set of
pointer ids to be different from what we expect when it comes time to
split motion events across windows. As a result, we can generate motion
events with 0 pointers. When we try to deliver those events, we cause
an error in the InputTransport so we tear down the InputChannel and kill
the application.
Added code to check out assumption about pointer ids and drop the
event gracefully instead.

Patched up the tests to take into account the change in default behavior
for identifying touch screens and touch pads.

Change-Id: Ic364bd4cb4cc6335d4a1213a26d6bdadc7e33505
i/Input.h
275e627ef6c9db2c4d4efa1edbac4d7b68859ce8 25-Jan-2011 Mathias Agopian <mathias@google.com> am 239fd805: Merge "fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)" into gingerbread

* commit '239fd805ef7c0e4116b0a89e20caaf287e91f017':
fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
59f71e7feb9034c61cf531031063396d0fb97176 25-Jan-2011 Mathias Agopian <mathias@google.com> am d3fcd0a1: Merge "minor clean-up. SurfaceFlinger doesn\'t need libpixelflinger.so. (DO NOT MERGE)" into gingerbread

* commit 'd3fcd0a1c923498921107bb44fbc8b24582a170a':
minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
d1a99ec6b2f23db5662e6d2ccf7b40d96869eccb 19-Jan-2011 Mathias Agopian <mathias@google.com> fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)

Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.

The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.

This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.

Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
rivate/surfaceflinger/SharedBufferStack.h
a0c6b761738ff98682e281571a0ff91c2230e7ee 14-Dec-2010 Mathias Agopian <mathias@google.com> minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)

Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
urfaceflinger/Surface.h
66b3d15912dc7f09b6300648f04693e1454f8e48 24-Jan-2011 Chet Haase <chet@google.com> am 2acb67ec: am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb

* commit '2acb67ec9fe34316231519373f59dfb76c03d57b':
Use optimized display lists for all hwaccelerated rendering
47ab362e8d7ac1b2f72a4e16b00bb8b56e8ac68a 10-Jan-2011 Chet Haase <chet@google.com> Use optimized display lists for all hwaccelerated rendering

Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
tils/Functor.h
d1de37fdabf68765fe8a92a40195ac45dd61744b 23-Jan-2011 Jeff Brown <jeffbrown@android.com> am 265cf2e7: Merge "Fix getSwitchState."

* commit '265cf2e76bef9ee369a7d43d567a22a0c39355ef':
Fix getSwitchState.
3205864ed80719561fa2f0a6820a5d464872ed60 21-Jan-2011 Mathias Agopian <mathias@google.com> am 612d7f3c: am a423d868: Merge "clean-up unneeded code" into honeycomb

* commit '612d7f3c092ec2c4a2ae44cb09d6dfb4e525a659':
clean-up unneeded code
78efe9773e137f64968e76d36e63baf0c1893a2c 20-Jan-2011 Mathias Agopian <mathias@google.com> Merge "clean-up unneeded code" into honeycomb
2bd1d95efecffad447afd682ffe605bbf8c79d62 20-Jan-2011 Mathias Agopian <mathias@google.com> clean-up unneeded code

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.

Change-Id: I210413d4c8c0998dae05c8620ebfc895d3e6233d
rivate/surfaceflinger/SharedBufferStack.h
cb203b228b360d827aa4b170d898e12a2c3f406c 20-Jan-2011 Jeff Brown <jeffbrown@android.com> Fix getSwitchState.

InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY. As a result
initial lid switch detection is broken.

This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.

Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
i/Input.h
6453b75d38b4f11e6efcb4c765e9e98248bd2b7e 20-Jan-2011 Jeff Brown <jeffbrown@google.com> am 5f668c6e: am 8b9df978: Merge "Fix getSwitchState." into honeycomb

* commit '5f668c6e6bb2515325632691a804a7c8f24ebb09':
Fix getSwitchState.
430c21ea871436df1ac5687f1fb19908667b1a10 20-Jan-2011 Jeff Brown <jeffbrown@google.com> Fix getSwitchState.

InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY. As a result
initial lid switch detection is broken.

This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.

Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
i/Input.h
98e88a7d7a7295ddcd02d062f2ed84179a49e852 18-Jan-2011 Jeff Brown <jeffbrown@google.com> am 41395459: Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread

* commit '41395459e676cf9ab4059e08446656f145662c2d':
Filter virtual keys after touches. (DO NOT MERGE)
37f7abd457a3d1bc0c7a128969b2f55487e49256 18-Jan-2011 Jeff Brown <jeffbrown@google.com> Merge "Add joystick support to framework."
218e7c74e62b1fbc0984c468ceec2fb5f7c328ce 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Add joystick support to framework.

Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
i/KeycodeLabels.h
f47c93b79c8eb0eb60ad3fb540c92d67f817ef24 17-Jan-2011 Dharmaray Kundargi <dharmaray@google.com> Merge "integrate videoeditor preview player." into honeycomb
c4d4aeab52435c177ded6abdd578fec8191f0f5d 13-Jan-2011 Jamie Gennis <jgennis@google.com> Implement SurfaceTexture frame-available callback.

This change implements the onFrameAvailable callback for the
SurfaceTexture java class. It includes the C++ SurfaceTexture code as
well as the JNI and Java code to enable the callback.

Change-Id: Ifd8b8e7ad46ee70cba6da1c2e96dab8045d1ea30
ui/SurfaceTexture.h
b6783164e89690209084766a363450987e87c74e 17-Jan-2011 Dharmaray Kundargi <dharmaray@google.com> integrate videoeditor preview player.

Change-Id: I83084f494605c8e6f4d198afa8c36f9e29579667
urfaceflinger/Surface.h
b353fd9746bc7d5d438bad47a0ad08f6a11d8d40 15-Jan-2011 Mathias Agopian <mathias@google.com> Merge "Fix error reporting in Surface::cancelBuffer()" into honeycomb
a317f1ba7f71fe04d524f46dbdc6e2419b7f75a3 14-Jan-2011 Mathias Agopian <mathias@google.com> Fix error reporting in Surface::cancelBuffer()

when we validate the surface there, most errors are in fact allowed
because it is legal to cancel a buffer after a surface has been
destroyed (for instance). in that case make sure to not log
error messages as they are very confusing.

Change-Id: Iecdfbaf6d9ee5da54d56cd7ea7a0d430c30934b0
urfaceflinger/Surface.h
9a78c90cd46b2a3bd637b056873149d3b94384b4 13-Jan-2011 Jamie Gennis <jgennis@google.com> Fix remote GraphicBuffer allocation in SurfaceFlinger.

This change fixes a horrible hack that I did to allow application
processes to create GraphicBuffer objects by making a binder call to
SurfaceFlinger. This change introduces a new binder interface
specifically for doing this, and does it in such a way that
SurfaceFlinger will maintain a reference to the buffers until the app is
done with them.

Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
ui/SurfaceTexture.h
urfaceflinger/IGraphicBufferAlloc.h
urfaceflinger/ISurfaceComposer.h
f238e28500ca756fbd9e323f728ce7c8dda59475 10-Jan-2011 Jamie Gennis <jgennis@google.com> Implement crop & transform for SurfaceTexture.

This change adds support for the setCrop and setTransform methods of the
SurfaceTexture C++ class. The crop and transform for the current
texture will be accessed by applications as a single texture coordinate
transform matrix.

Change-Id: I6482bf96f680e5c175364e848936db3908d6c8f8
ui/SurfaceTexture.h
7bfdb29e53a0c7dacf093af8145434e2fbf5d047 24-Oct-2010 Jeff Brown <jeffbrown@google.com> Filter virtual keys after touches. (DO NOT MERGE)

Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen. The default value is 0; it is intended to be overridden
per device using a resource overlay.

This change is designed to help in two cases:

1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.

Bug: 3089163
Change-Id: Id6733c83c2e2bc8d9553aa0e5c1fd74b741bec6e
i/InputReader.h
67eedd74ab78c2bfed9fcdc74947b97289254ca4 09-Jan-2011 Jamie Gennis <jgennis@google.com> Fix a bug in SurfaceTexture::setBufferCount.

We need to reset mCurrentTexture and mLastQueued in setBufferCount
because it frees all of the buffers associated with the buffer slots.

Change-Id: Ie2f834ec1c07ce7a4ab9b2b5fc5fe8c294010c60
ui/SurfaceTexture.h
8ba32fade11abb73f3fd47ea0953c9528eb5b91f 20-Dec-2010 Jamie Gennis <jgennis@google.com> Add the SurfaceTexture C++ implementation.

This change adds the C++ implementation of SurfaceTexture and related
classes. The goal of this is for a SurfaceTexture to be passed to
camera service or Stagefright in place of a Surface to allow camera
preview or decoded video frames to be streamed to an OpenGL ES texture
that an application can use.

Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
ui/ISurfaceTexture.h
ui/SurfaceTexture.h
ui/SurfaceTextureClient.h
i/GraphicBuffer.h
495633406580685dfaa41979bbae47fc5f77fefe 20-Dec-2010 Jamie Gennis <jgennis@google.com> Add the ISurfaceComposer::createGraphicBuffer IPC.

This change adds a new binder method to the ISurfaceComposer interface.
This IPC is intended to allow SurfaceFlinger clients to allocate gralloc
buffers using SurfaceFlinger as a proxy to gralloc.

Change-Id: Ide9fc283aec5da6268ba62cfed0c3319a50b640d
urfaceflinger/ISurfaceComposer.h
41250361577ce85d30b29ef530cfb7bea7d0604d 03-Jan-2011 Jeff Brown <jeffbrown@google.com> Mouse pointer integration.

Added support for loading the pointer icon from a resource.

Moved the system server related bits of the input manager out
of libui and into libinput since they do not need to be linked into
applications.

Change-Id: Iec11e0725b3add2b905c51f8ea2c3b4b0d1a2d67
i/DisplayInfo.h
i/EventHub.h
i/InputDispatcher.h
i/InputManager.h
i/InputReader.h
i/PointerController.h
ca6fca93fc3a6587d6569c37069966152131a9b2 20-Dec-2010 Shachar Shemesh <lingnu@gmail.com> Normalize output from aapt d

Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed
regardless of the content of the strings.

Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf
tils/ResourceTypes.h
4c501a42173bfc0c7c9ee32312db392c59b67e13 24-Dec-2010 Jeff Brown <jeffbrown@google.com> Add initial support for cursor-based pointing devices.

Some parts stubbed out but you can plug in a mouse and move
a green cursor around to interact with the UI.

Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
i/EventHub.h
i/InputReader.h
i/PointerController.h
tils/PropertyMap.h
11dde1100dd44bf4426fbc52e1f709dc08a926ec 21-Dec-2010 Vasu Nori <vnori@google.com> resubmitting Change-Id: I67b1d04a5c9fc18b0cd4da6184d0b814b64d89e9

Change-Id: I67b1d04a5c9fc18b0cd4da6184d0b814b64d89e9 was reverted
due to a bug. fixed the bug and resubmitting it here
inder/CursorWindow.h
204249bcbe2e45be4a8fc2635a0293d93f7ab67d 20-Dec-2010 Vasu Nori <vnori@google.com> Revert "bug:2448371 cursorwindow size moved to resource xml file."

This reverts commit 2594bae1f551d758c5c88771310d1ee3dc2c71ac.
inder/CursorWindow.h
bd57473e9056373acab98ae24d80858dfe774fcd 19-Dec-2010 Vasu Nori <vnori@google.com> bug:2448371 cursorwindow size moved to resource xml file.

let cursor window size be set per device in device resources file.
default is 1MB.
for SR, it is 2MB.
it can be set to any value (in kB) in the device resource
strings.xml file

Change-Id: I67b1d04a5c9fc18b0cd4da6184d0b814b64d89e9
inder/CursorWindow.h
5eee3d2b13880c9a486be8fca20128660a19b7f7 15-Dec-2010 Mathias Agopian <mathias@google.com> Merge "minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so."
90f96b838320011901976b6a7180aeb6b461d7e2 15-Dec-2010 Mathias Agopian <mathias@google.com> Merge "dump callstack on Surface use error"
1b6084354710ca52c04ea361d751d19174802d57 14-Dec-2010 Brad Fitzpatrick <bradfitz@android.com> Framework-side support for Dalvik "isSensitiveThread" hook.

Used in lock contention stats.

Bug: 3226270
Change-Id: Ie6f58d130a29079a59bdefad40b80304d9bc3623
inder/IPCThreadState.h
455d18d4c26a823bff62ca14771986cca52d3462 14-Dec-2010 Mathias Agopian <mathias@google.com> minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so.

Change-Id: I3bdca74351c8e480a05084bc412a96c5f685221d
urfaceflinger/Surface.h
bf2c6a6c8f1df40ac94e28b948754bb9739daaca 11-Dec-2010 Mathias Agopian <mathias@google.com> [3258939] Need snapshot to limit which layers are included

Change-Id: Id7351a0e3f53dde99b291cffba553d89fd4d7ca9
urfaceflinger/ISurfaceComposer.h
urfaceflinger/SurfaceComposerClient.h
e6f096a4cde5161e9e8432a6f6f2008e6bc710f4 11-Dec-2010 Mathias Agopian <mathias@google.com> dump callstack on Surface use error

Change-Id: I38e260dd47349b9af3a999dda683a083a94be16d
tils/CallStack.h
0a757814f3e4ca4db772144e85b687fe89a7fba5 09-Dec-2010 Mathias Agopian <mathias@google.com> fix [3259708] Graphic Buffer Mapper does not support YV12

remove a bunch of a code that was there only to support broken gralloc implementations

Change-Id: I3c1a9172224cbcc283601abfbbd695a20815451f
rivate/ui/sw_gralloc_handle.h
a5529c8778c2f407f482fc12165aeb76c0f505c2 08-Dec-2010 Mathias Agopian <mathias@google.com> remove support for PUSH_BUFFER surfaces and overlays

the same functionality is now supported through
the h/w composer HAL, and YUV support in the GPU.

Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
urfaceflinger/ISurface.h
urfaceflinger/ISurfaceComposer.h
i/IOverlay.h
i/Overlay.h
1d21a9cafc534c34a2f28c985c4c7aa176d0e67b 02-Dec-2010 Erik Gilling <konkers@android.com> surfaceflinger: add support for gralloc dump hooks

Change-Id: Ib6f539ed0132b70d040d653c03d52cc04249ac3c
i/FramebufferNativeWindow.h
a15e3f5a926c7c91c96c145378551a11afe97cb0 08-Dec-2010 Kenny Root <kroot@google.com> Merge "Change assets to use 64-bit API"
18092ddc866425598abf4521d9ed4eda9573fdaa 24-Nov-2010 Kenny Root <kroot@google.com> Change assets to use 64-bit API

The asset system and supporting libraries were using off_t instead of
off64_t to access files larger than 2GB (32-bit signed). This change
replaces all off_t with off64_t and lseek64.

There is a new utils/Compat.h added for Mac OS compatibility.

Also fixed some size-related compiler warnings.

Bug: 3205336
Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e
tils/Asset.h
tils/Compat.h
tils/FileMap.h
tils/StreamingZipInflater.h
tils/ZipFileCRO.h
tils/ZipFileRO.h
02d85b5021dc3e9c042e1e3426fae2f0a903595b 07-Dec-2010 Jeff Brown <jeffbrown@google.com> Add support for fallback keycodes.

This change enables the framework to synthesize key events to implement
default behavior when an application does not handle a key.
For example, this change enables numeric keypad keys to perform
their associated special function when numlock is off.

The application is informed that it is processing a fallback keypress
so it can choose to ignore it.

Added a new keycode for switching applications.

Added ALT key deadkeys.

New default key mappings:
- ESC -> BACK
- Meta+ESC -> HOME
- Alt+ESC -> MENU
- Meta+Space -> SEARCH
- Meta+Tab -> APP_SWITCH

Fixed some comments.
Fixed some tests.

Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
i/InputDispatcher.h
i/InputReader.h
i/InputTransport.h
i/KeyCharacterMap.h
i/KeycodeLabels.h
b5a00fcb71426492f248ed49a0514a9b8d385065 08-Dec-2010 Mathias Agopian <mathias@google.com> am 48f42f8c: am 4153bf3a: Merge "[3171580] don\'t automatically log GraphicBuffer allocation failures" into gingerbread

* commit '48f42f8c3fbd33b2f46c6290ff5963dd58938cf9':
[3171580] don't automatically log GraphicBuffer allocation failures
e4f81090c27d22b418d2cbe874fc28cbcf810167 07-Dec-2010 Mathias Agopian <mathias@google.com> am a2977c38: Merge changes Ie03796ae,Ide3e980a into gingerbread

* commit 'a2977c383d363e1e88a5b36230b1fa4c312807d2':
[3171580] SurfaceFlinger Bypass mode. (DO NOT MERGE)
[3171580] Add transform field to native buffers. (DO NOT MERGE)
372c56e98b93647b7050e518c285057a8a72bc74 07-Dec-2010 Mathias Agopian <mathias@google.com> am 4153bf3a: Merge "[3171580] don\'t automatically log GraphicBuffer allocation failures" into gingerbread

* commit '4153bf3a259624a2f2dc497b77b225a1fb517abc':
[3171580] don't automatically log GraphicBuffer allocation failures
30eb1b1803b590cf08cbf425dbdda4d330044f77 03-Nov-2010 Mathias Agopian <mathias@google.com> [3171580] Add transform field to native buffers. (DO NOT MERGE)

This field indicate how the content of the buffer
needs to be transformed.

Change-Id: Ide3e980a90599e931406135693231276626adbbb
i/GraphicBuffer.h
i/android_native_buffer.h
678bdd6349344df254cc0c3377a40fd99e216635 04-Dec-2010 Mathias Agopian <mathias@google.com> [3171580] don't automatically log GraphicBuffer allocation failures

some of these failures are not fatal and even expected in some cases
so they should not emit a dump in the log in those cases.

Change-Id: Idcfa252e3bfa9d74e27fe4ad8f8623aa01aa9c5e
i/GraphicBuffer.h
i/GraphicBufferAllocator.h
db360642ed7a48eb3b3607a791bbe449cc6529bb 02-Dec-2010 Jeff Brown <jeffbrown@google.com> Improve support for external keyboards.

Use Vendor ID, Product ID and optionally the Version to
locate keymaps and configuration files for external devices.

Moved virtual key definition parsing to native code so that
EventHub can identify touch screens with virtual keys and load
the appropriate key layout file.

Cleaned up a lot of old code in EventHub.

Fixed a regression in ViewRoot's fallback event handling.

Fixed a minor bug in FileMap that caused it to try to munmap
or close invalid handled when released if the attempt to map
the file failed.

Added a couple of new String8 conveniences for formatting strings.

Modified Tokenizer to fall back to open+read when mmap fails since
we can't mmap sysfs files as needed to open the virtual key
definition files in /sys/board_properties/.

Change-Id: I6ca5e5f9547619fd082ddac47e87ce185da69ee6
i/EventHub.h
i/Input.h
i/InputReader.h
i/Keyboard.h
i/VirtualKeyMap.h
tils/String8.h
tils/Tokenizer.h
53c16642e2f8176b26f61b98328051f6dd1234ae 19-Nov-2010 Jeff Brown <jeffbrown@google.com> Ensure the ShortcutManager uses the correct key character map.

The ShortcutManager used to only receive the key code of the key event
that triggered the shortcut. This change now provides the shortcut
manager with the whole key event so it can look up the associated
character using the correct key character map.

To make this more efficient, added a mechanism for recycling
key events. At the moment it is only used by key events owned by the
system process, since clients of the existing API (such as Views)
might continue to hold on to key events after dispatch has finished so
they would break if the key event were recycled by the framework.

Deprecated KeyCharacterMap.BUILT_IN_KEYBOARD.

Change-Id: I4313725dd63f2be01c350c005a41c7fde9bc67e8
i/Input.h
i/InputDispatcher.h
6688837ff6a959b4f59d9a4249aac1504f590a4b 30-Nov-2010 Jeff Brown <jeffbrown@google.com> Support non-orientation aware keyboards and other devices.

Fixed a bug with dpad keys on external keyboards being rotated
according to the display orientation by adding a new input device
configuration property called "keyboard.orientationAware".

Added a mechanism for overriding the key layout and key character
map in the input device configuration file using the new
"keyboard.layout" and "keyboard.characterMap" properties.

Also added "trackball.orientationAware", "touch.orientationAware" and
"touch.deviceType" configuration properties.

Rewrote the configuration property reading code in native code
so that it can be used by EventHub and other components.

Added basic support for installable idc, kl, and kcm files
in /data/system/devices. However, there is no provision for
copying files there yet.

Disabled long-press character pickers on full keyboards so that
key repeating works as expected.

Change-Id: I1bd9f0c3d344421db444e7d271eb09bc8bab4791
i/EventHub.h
i/Input.h
i/InputReader.h
i/Keyboard.h
tils/PropertyMap.h
ad1894d8dfcb56d04e7c7e80bcaa018bf4ec203f 24-Nov-2010 Joe Onorato <joeo@google.com> Allow status bar panels to be on top of the status bar.

Change-Id: I3c74ece5f7042e6302717f4263746d59d5447ec9
i/InputDispatcher.h
9ee93d18edb42d55441b636aa7e001260f1b758d 19-Nov-2010 Jeff Brown <jeffbrown@google.com> Fix SDK build on Windows due to use of mmap.

Change-Id: Id4bd9a6f932285c93c5853e540efc20b99876564
tils/Tokenizer.h
a3477c862a5debcac7dfb076749059406ec59512 11-Nov-2010 Jeff Brown <jeffbrown@google.com> Added support for full PC-style keyboards.

BREAKING CHANGE: Redesigned the key character map format to
accomodate full keyboards with more comprehensive suite of modifiers.
Old key character maps will not work anymore and must be updated.
The new format is plain text only and it not compiled to a binary
file (so the "kcm" tool will be removed in a subsequent check-in).

Added FULL keyboard type to support full PC-style keyboards.

Added SPECIAL_FUNCTION keyboard type to support special function
keypads that do not have any printable keys suitable for typing
and only have keys like HOME and POWER

Added a special VIRTUAL_KEYBOARD device id convention that maps
to a virtual keyboard with a fixed known layout. This is designed
to work around issues injecting input events on devices whose
built-in keyboard does not have a useful key character map (ie.
when the built-in keyboard is a special function keyboard only.)

Modified several places where events were being synthesized
to use the virtual keyboard.

Removed support for the "qwerty" default layout.
The new default layout is "Generic". For the most part "qwerty"
was being used as a backstop in case the built-in keyboard did
not have a key character map (probably because it was a special
function keypad) and the framework needed to be able to inject
key events anyways. The latter issue is resolved by using the
special VIRTUAL_KEYBOARD device instead of BUILT_IN_KEYBOARD.

Added the concept of a key modifier behavior so that
MetaKeyKeyListener can distinguish between keyboards that use
chorded vs. toggled modifiers.

Wrote more robust key layout and key character map parsers
to enable support for new keyboard features and user installable
key maps.

Fixed a bug in InputReader generating key ups when keys
are released out of sequence.

Updated tons of documentation.

Currently QwertyKeyListener is being used for full keyboards
with autotext and capitalization disabled. This mostly works
but causes some problems with character pickers, etc.
These issues will be resolved in subsequent changes.

Change-Id: Ica48f6097a551141c215bc0d2c6f7b3fb634d354
i/EventHub.h
i/KeyCharacterMap.h
i/KeyLayoutMap.h
i/Keyboard.h
tils/String8.h
tils/Tokenizer.h
3f02b88af646eb950edb44e584b6a82be06c709a 18-Nov-2010 Jean-Baptiste Queru <jbq@google.com> am 5e069074: am a15e4886: Merge "Framebuffer: Support variable number of framebuffers in the UI"

* commit '5e0690745a45f99d12d940dd4aaae814b00a429e':
Framebuffer: Support variable number of framebuffers in the UI
af1097658321bfdfaf0cc65214a94bfcdee372ce 18-Nov-2010 Jean-Baptiste Queru <jbq@google.com> am a15e4886: Merge "Framebuffer: Support variable number of framebuffers in the UI"

* commit 'a15e4886de8f75f3cb137f51743d330414c910e8':
Framebuffer: Support variable number of framebuffers in the UI
7986fe503522d17a5a640e0c6b0a3bb564a753bf 15-Nov-2010 Kenny Root <kroot@google.com> Merge "Split UTF functions from String8/16"
c412dcb3eb259458905aae9a2f5109c59c9548c0 09-Nov-2010 Kenny Root <kroot@google.com> Split UTF functions from String8/16

Split out all the UTF-8/16/32 handling code from String8/16 to its own
file to allow better reuse of code.

Change-Id: If9ce63920edc75472c38da4adce0d13cda9ad2f7
tils/String16.h
tils/String8.h
tils/Unicode.h
e33a9ecc25b91d98ea75e3c14fd24c0c7fce5089 11-Nov-2010 Jeff Brown <jeffbrown@google.com> Enable touch splitting for all windows by default.

New default only applies to applications with targetSdkVersion >=
HONEYCOMB. Old applications default to no touch splitting for
their windows.

In addition, enabled split touch for various system windows.

Bug: 3049580
Change-Id: Idc8da9baa2cd8e1e4e76af8967d7b6a5ccb94427
i/InputDispatcher.h
af34db4dcb7dac2f69753f76c438e4a47eda93ef 09-Nov-2010 Jason Bayer <bayer@google.com> Add new keycodes initially used for GoogleTV devices.

Change-Id: I1b901037d6d401931dd3ec6f7d5e1e6ad165d1c9
i/KeycodeLabels.h
54cc83e8a48c57307cdd40fe4b7e296020490095 02-Nov-2010 Jamie Gennis <jgennis@google.com> Implement reducing the buffer count of a Surface.

Change-Id: I7f979c60c06d654aa8265002836277434bc1a64f
Bug: 3095167
rivate/surfaceflinger/SharedBufferStack.h
d94206c41dfbac8340b86864d9e05cdc3a3a87ba 08-Nov-2010 Joe Onorato <joeo@google.com> The CHEEK_TOUCH stuff never worked. Remove it.

Bug: 3104906
Change-Id: Ia37236ba1775fc3ec8c111e2e0b85b105e0dea6a
i/PowerManager.h
81499912348194a9432841398a0d337fa4079c98 05-Nov-2010 Jeff Brown <jeffbrown@google.com> Tell system server whether the app handled input events.

Refactored ViewRoot, NativeActivity and related classes to tell the
dispatcher whether an input event was actually handled by the application.

This will be used to move more of the global default key processing
into the system server instead of the application.

Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
i/InputDispatcher.h
i/InputTransport.h
71484f2f76457287a1fbf5791f530c2b2459aa0c 03-Nov-2010 Rodrigo Obregon <robregon@ti.com> Framebuffer: Support variable number of framebuffers in the UI

This change defines a macro NUM_FRAME_BUFFERS to set
the desired number of framebuffers to be used by the UI,
instead of hard-coding 2 framebuffers.

Aditional logic has been added to handle the initialization
and destruction of NUM_FRAME_BUFFERS buffers.

Change-Id: I3a4bfec3e0f453432f2ffebf084c00f574d3be46
Signed-off-by: Rodrigo Obregon <robregon@ti.com>
i/FramebufferNativeWindow.h
7e5660f3e28b4a8321745e013a6a66db95c2bb3e 01-Nov-2010 Jeff Brown <jeffbrown@google.com> Add plumbing for volume mute key.

Full support for the volume mute key will be implemented in a
later change.

Bug: 2912307
Change-Id: I98c27d6360f159c8b7447e04b45f442eff87b38a
i/KeycodeLabels.h
133cde5805067d7bc7f123e1b3154816fa5eef37 28-Oct-2010 Kenny Root <kroot@google.com> Add path to get different DPI drawables

Allow a caller to request a different density than their current display
allows. This can mean a device displaying mdpi can get a resource that's
in hdpi and have it pretend to be in mdpi resolution. If a drawable
that's returned is not in the requested density, it will set it at the
appropriate density to be scaled up later on.

The API for this is hidden currently.

Bug: 3134688
Change-Id: I6c3908cbdef4907b8d3f1576df9e3b0e7af1755a
tils/ResourceTypes.h
4c766ccea57ebc82ce08d66bc7c5e2ee871e88ea 28-Oct-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of df3cccf3 to master

Change-Id: I425496a9fc4e9cbc50ad6938e9dccb14827d9558
fef5b04203b0efcbd6dc5d279083d57b77f3391b 28-Oct-2010 Jeff Brown <jeffbrown@google.com> Drop all dispatcher state when dispatcher is disabled.

This patch makes the dispatcher drop all of its state when it is
disabled (when the screen turns off). This ensures that the dispatcher
does not get stuck thinking a pointer is still down if the screen
turned off while the user was touching the display (such as a fat touch
while hitting the power button).

Bug: 3098344
Change-Id: If50ef5804870aa1acd3179fd4b40e3cda58dd39d
i/InputDispatcher.h
bc9f0531564e3c090ae14175d77091820945aa8b 24-Oct-2010 Jeff Brown <jeffbrown@google.com> am 2ef36763: am 860c2df4: Merge "Add unit tests for native input and fix bugs identified." into gingerbread

Merge commit '2ef36763700eff5679d6012e7f078c57f1a4c465'

* commit '2ef36763700eff5679d6012e7f078c57f1a4c465':
Add unit tests for native input and fix bugs identified.
3c3cc62e243a7796f5c1e88773d34e2054cc26c6 21-Oct-2010 Jeff Brown <jeffbrown@google.com> Add unit tests for native input and fix bugs identified.

Fixed a bug where we would lose the first touch point when swiping out of
the virtual key area.

Fixed a bug where we would not send an ACTION_MOVE event in cases where
individual pointers went down/up and the remaining pointers actually moved.
This is important since many applications do not handle pointer movements
during ACTION_POINTER_DOWN or ACTION_POINTER_UP. In the case of
ACTION_POINTER_UP the movement was completely lost since all pointers were
dispatched using their old location rather than the new location.

Improved motion event validation to check for duplicate pointer ids.

Added an input source constant that was missing from the NDK api but
defined in the framework api.

Added a timestamp when reporting added/removed devices in EventHub.

Bug: 3070082
Change-Id: I3206a030f43b7616e2f48006e5a9d522c4d92e56
i/InputReader.h
e22d21412fd8c5ac3f7a8b704ed69c1b5651454e 21-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> Revert "Add length-equality test in String operator== checks."

This reverts commit e28210d401ae4ed1258b84c9b17a172a757190e8.
tils/String16.h
tils/String8.h
075e7503305dcba310024e6b6912dde3d31e1f7f 20-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> Add length-equality test in String operator== checks.

Change-Id: I6ebc6ef85aac4539269f137c1f29f95b9828d4f9
tils/String16.h
tils/String8.h
2659f40403a7927ff421cf084f3b8e8b3e763ce9 19-Oct-2010 Jeff Brown <jeffbrown@google.com> am f2c40603: am 7689dd49: Merge "Fix bug where home presses were not poking user activity." into gingerbread

Merge commit 'f2c406030874b355ca9e4e67cc0e3aff6103c23e'

* commit 'f2c406030874b355ca9e4e67cc0e3aff6103c23e':
Fix bug where home presses were not poking user activity.
60b5776c8795b6f52d1dddf89453c42c085da50f 18-Oct-2010 Jeff Brown <jeffbrown@google.com> Add support for calibrating touch position.

Useful for tweaking touch screen alignment without having to modify the
kernel device driver x/y axis bounds.

Change-Id: I6ca43d3c138548f9dfb76aa33150a0c853698fb6
i/InputReader.h
ef3a8234824cc9f7c3464dd05f9aeca8ea77ebd9 18-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix bug where home presses were not poking user activity.

We now poke user activity twice: once upon dequeueing an event
for dispatch and then again just before we dispatch it. The second
poke is to compensate for the fact that it can take a few seconds to
identify the dispatch target (if the application is responding slowly)
but we want to keep the display from going to sleep for X amount of time
after the app gets a chance to actually receive the event. This mirrors
pre-Gingerbread behavior.

Removed some unnecessary code that filters user activity pokes when sending
events to KeyGuard. We don't need this because KeyGuard already tells the
power manager to disable user activity.

Bug: 3101397
Change-Id: I8c3a77601fdef8f584e84cfdd11aa79da0ff51db
i/InputDispatcher.h
7d8733fc7a100c6bcb1d5375e0ea067d907955d2 16-Oct-2010 Jeff Brown <jeffbrown@google.com> am 5f0cbfce: am c1e7b218: Merge "Improve input device calibration format." into gingerbread

Merge commit '5f0cbfcecc4db20f897507c826296b3aac70c592'

* commit '5f0cbfcecc4db20f897507c826296b3aac70c592':
Improve input device calibration format.
83cd39ee1118287c955b533568be38aa2f0a6e3d 16-Oct-2010 Jeff Brown <jeffbrown@google.com> am dc3ad87c: am 78a76fea: Merge "Revert to using epoll_wait()." into gingerbread

Merge commit 'dc3ad87c04348c925aa86863ed6d25f18a8c6c36'

* commit 'dc3ad87c04348c925aa86863ed6d25f18a8c6c36':
Revert to using epoll_wait().
fb3051b15e15b0f57196e0f2bc6ba8570f7ffe5e 16-Oct-2010 Mathias Agopian <mathias@google.com> am 7e9a54d4: am d4e03f37: addresses parts of 3096779 and 3097475

Merge commit '7e9a54d460030a871a4f05e61e943c6a694e9ef8'

* commit '7e9a54d460030a871a4f05e61e943c6a694e9ef8':
addresses parts of 3096779 and 3097475
e68d9e0be41ac93bd802579c012aca22086f6f9e 15-Oct-2010 Jeff Brown <jeffbrown@google.com> Add support for secure system overlays.

Manual merge from Gingerbread.

This change adds a new window type for secure system overlays
created by the system itself from non-secure system overlays that
might be created by applications that have the system alert permission.
Secure views ignore the presence of secure system overlays.

Bug: 3098519
Change-Id: Id876736fd8bf332ff9a5428bde59f5268aa49c3a
i/InputDispatcher.h
d9dd44d867315478bbebfbe69bb952ea8138ac4e 15-Oct-2010 Jeff Brown <jeffbrown@google.com> Add support for secure system overlays. (DO NOT MERGE)

This change adds a new window type for secure system overlays
created by the system itself from non-secure system overlays that
might be created by applications that have the system alert permission.
Secure views ignore the presence of secure system overlays.

Bug: 3098519
Change-Id: I8f8398f4fdeb0469e5d71124c21bedf121bd8c07
i/InputDispatcher.h
6a817e22e4b09a982ba17c1aff57f9fcb735c950 13-Sep-2010 Jeff Brown <jeffbrown@google.com> Add keycodes and meta-key modifiers to support external keyboards.

Added new key maps for external keyboards. These maps are intended to
be shared across devices by inheriting the "keyboards.mk" product
makefile as part of the device's product definition.

One of the trickier changes here was to unwind some code in
MetaKeyKeyListener that assumed that only the low 8 bits of the meta key
state were actually used. The new code abandons bitshifts in favor
of simple conditionals that are probably easier to read anyways.
The special meta key state constants used by MetaKeyKeyListener
are now (@hide) defined in KeyEvent now so as to make it clearer that they
share the same code space even if those codes are not valid for KeyEvents.

The EventHub now takes care of detecting the appropriate key layout
map and key character map when the device is added and sets system
properties accordingly. This avoids having duplicate code in
KeyCharacterMap to probe for the appropriate key character map
although the current probing mechanism has been preserved for legacy
reasons just in case.

Added support for tracking caps lock, num lock and scroll lock and
turning their corresponding LEDs on and off as needed.

The key character map format will need to be updated to correctly support
PC style external keyboard semantics related to modifier keys.
That will come in a later change so caps lock doesn't actually do
anything right now except turn the shiny LEDs on and off...

Added a list of symbolic key names to KeyEvent and improved the toString()
output for debug diagnosis. Having this list in a central place in the
framework also allows us to remove it from Monkey so there is one less
thing to maintain when we add new keycodes.

Bug: 2912307
Change-Id: If8c25e8d50a7c29bbf5d663c94284f5f86de5da4
i/EventHub.h
i/Input.h
i/InputReader.h
i/KeycodeLabels.h
tils/String8.h
d72b033033381c878322ff6761438d8d2d91b589 15-Oct-2010 Kenny Root <kroot@google.com> am 8fda1636: am bdf8034c: Merge "OBB: use PBKDF2 for key generation." into gingerbread

Merge commit '8fda1636e3e35f060b9046294efd3c062a1fdb84'

* commit '8fda1636e3e35f060b9046294efd3c062a1fdb84':
OBB: use PBKDF2 for key generation.
e33a35f02576b482a5ac4891a78f6e72fb4c0dea 15-Oct-2010 Mathias Agopian <mathias@google.com> am 5bfa3a34: am 011b5bcc: Merge "implement part of [3094280] New animation for screen on and screen off add support for screen on animation" into gingerbread

Merge commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f'

* commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f':
implement part of [3094280] New animation for screen on and screen off
d055ca828af1ff0f8b4a6764beca09c36e9ad836 15-Oct-2010 Jeff Brown <jeffbrown@google.com> Merge "Improve input device calibration format." into gingerbread
1ec7a1d547d8998badef243a136878b199992219 15-Oct-2010 Jeff Brown <jeffbrown@google.com> Merge "Revert to using epoll_wait()." into gingerbread
6b337e74f024fdd9e8ed3fdd3414bde3e1a3306e 15-Oct-2010 Jeff Brown <jeffbrown@google.com> Improve input device calibration format.

Added support for calibrating touch size for devices that report
size as an area measurement rather than as a width.
Fixed some bugs.

Bug: 3096045
Change-Id: I30a12e73752883516ed054f8af407204bca45814
i/InputReader.h
abd671a08a41519a7ab3d438a500efe0ef0bfc1d 14-Oct-2010 Mathias Agopian <mathias@google.com> addresses parts of 3096779 and 3097475

3097475: Animation setting should control the screen on animation
3096779: CRT power-on animation can briefly show the top app instead of lockscreen

There is now a parameter that controls wether the ON and/or OFF animation are
performed. we also always clear the screen to black on power off, to make
sure it won't briefly appear on power on.
HOWEVER, 3096779 is not 100% fixed in the case where we're doing the animation
because there is a race, where SF doesn't wait (b/c it doesn't know) for the
framework to have redrawn the lockscreen.

Change-Id: Ie0f02c9225fcdf24b1e8907e268eb7da2c5b0a03
urfaceflinger/ISurfaceComposer.h
503d2d4a08370209dc83330bd00997ba9512f46f 14-Oct-2010 Joe Onorato <joeo@google.com> am 9a12a3c8: am ba799098: Merge changes I76513387,I335fb671 into gingerbread

Merge commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96'

* commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96':
Remove dead code, and make the animation a setting.
turn off the electron beam
7f7c9a24b66277312c5e0426731598b8bfd11a14 14-Oct-2010 Kenny Root <kroot@google.com> Merge "OBB: use PBKDF2 for key generation." into gingerbread
95a68893125105f131ee1b4eaef1dc16da1ef789 14-Oct-2010 Kenny Root <kroot@google.com> OBB: use PBKDF2 for key generation.

Switch to using PBKDF2 for the key generation for OBBs. Any previously
generated OBBs will stop being read correctly. A small pbkdf2gen program
is available to allow generation of appropriate keys with the salts.

Bug: 3059950
Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295
tils/ObbFile.h
9daa5c9b9dd286cbbf5d43f7e45a5e9e4048e855 13-Oct-2010 Mathias Agopian <mathias@google.com> implement part of [3094280] New animation for screen on and screen off
add support for screen on animation

Change-Id: If50cf52ae04b95b42da7d74cf7fa96d5cb54d238
urfaceflinger/ISurfaceComposer.h
59119e658a12279e8fff508f8773843de2d90917 11-Oct-2010 Mathias Agopian <mathias@google.com> turn off the electron beam

Change-Id: I335fb6719f1d5a3f1c6f37a046fd1c2c4ed2bbc6
urfaceflinger/ISurfaceComposer.h
3b996c96e4cd1057cb6b9531eaf8c01f934d2b2a 10-Oct-2010 Romain Guy <romainguy@google.com> Always create OpenGL accelerated windows in RGBA 8888.

Bug #3081600

The OpenGL renderer in libhwui uses a single EGL context per process and
thus create it with an RGBA 8888 EGL configuration. To ensure that all
windows are compatible with this configuration, this change modifies
the window manager and SurfaceFlinger.

The window manager now checks the window's flags and if the window is
hardware accelerated, it forces the window's pixel format to be
translucent when creating the surface. The window itself is still
marked as opaque if we know that the window will be opaque on screen.
This keeps existing optimizations in place.

Similarly in SurfaceFlinger, a translucent Surface can now be created
with the Surface.OPAQUE flag, indicating SurfaceFlinger that the surface
does not require blending, despite its RGBA 8888 configuration.

Change-Id: Ic747b6b12564ba064412d842117880fcc199eb7c
urfaceflinger/ISurfaceComposer.h
b6702e59726d7719d9bc644834938c180797deee 12-Oct-2010 Jeff Brown <jeffbrown@google.com> Track input state when transferring touch focus.

Copies the input state to the destination window and sends synthesic
cancelation events to the source window.

Change-Id: Ia75820b0d756ed5d6cd22dce7830251ac85141ed
i/InputDispatcher.h
33d54ce97d4ac84ce0e1a84e2710b45de5e1d41d 11-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix an event injection bug when the policy is bypassed.

Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Cherry pick of b931a1b4 from gingerbread into master.

Change-Id: I700a5f07b8b227878cea9437a289a45a245c0424
i/Input.h
i/InputDispatcher.h
d129348647325c2040190f88378c1ac39cc3151c 12-Oct-2010 Jeff Brown <jeffbrown@google.com> am 41aabeb5: am 1e6a3a53: Merge "Added more robust tracking and cancelation of events." into gingerbread

Merge commit '41aabeb51305d19747687f246080f44fc2a74435'

* commit '41aabeb51305d19747687f246080f44fc2a74435':
Added more robust tracking and cancelation of events.
1fe6dec0975d0cf7faf367f6bcb30c67d2025a47 11-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix an event injection bug when the policy is bypassed.

Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
i/Input.h
i/InputDispatcher.h
90f0cee685f9b13e6bac7793717a9d15de8eafe8 09-Oct-2010 Jeff Brown <jeffbrown@google.com> Added more robust tracking and cancelation of events.

This change fixes several issues where events would be dropped in the
input dispatch pipeline in such a way that the dispatcher could not
accurately track the state of the input device.

Given more robust tracking, we can now also provide robust cancelation
of input events in cases where an application might otherwise become
out of sync with the event stream due to ANR, app switch, policy decisions,
or forced focus transitions.

Pruned some of the input dispatcher log output.

Moved the responsibility for calling intercept*BeforeQueueing into
the input dispatcher instead of the input reader and added support for
early interception of injected events for events coming from trusted
sources. This enables behaviors like injection of media keys while
the screen is off, haptic feedback of injected virtual keys, so injected
events become more "first class" in a way.

Change-Id: Iec6ff1dd21e5f3c7feb80ea4feb5382bd090dbd9
i/Input.h
i/InputDispatcher.h
i/InputReader.h
fe2987d865bd59114c2ddabbcc82f6225e7165fe 10-Oct-2010 Jamie Gennis <jgennis@google.com> Merge "Move binder magic from the Surface class to GraphicBuffer."
309d3bb2f902163356f9d40b6d45c11b435d77a9 07-Oct-2010 Jamie Gennis <jgennis@google.com> Move binder magic from the Surface class to GraphicBuffer.

- Register buffers with Gralloc when unflattening a GraphicBuffer (rather than
doing it in the Surface class).
- Add support for a GraphicBuffer that wraps an android_native_window_t*.

Change-Id: I029ac086111bbac800e5ca37eb505f558b718cd8
i/GraphicBuffer.h
2eb1995a5dfdc19f47580cd091a67994bd5f4b62 10-Oct-2010 Jeff Brown <jeffbrown@google.com> am 22cb4ef8: am d577cfd7: Merge "Switch Looper back to using poll() instead of epoll()." into gingerbread

Merge commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5'

* commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5':
Switch Looper back to using poll() instead of epoll().
dc4c5bf55ae7a7022cedb5ea46621c9f574a597e 08-Oct-2010 Jeff Brown <jeffbrown@google.com> Revert to using epoll_wait().

This change depends on the kernel having been patched to use hrtimers
instead of jiffies for scheduling epoll timeouts.

Change-Id: I216bc1c4f565e67ebcb3d2ba4280cb615932bb9e
tils/Looper.h
54e1cdacd2b132997fdca5e5b90e45855c7a2a95 06-Oct-2010 Jeff Brown <jeffbrown@google.com> Switch Looper back to using poll() instead of epoll().

Added a couple of micro-optimizations to avoid calling wake() unnecessarily
and reduce JNI overhead slightly.

Fixed a minor issue where we were not clearing the "next" field of Messages
returned by the MessageQueue so the Message would hold on to its successor
and potentially prevent the GC from collecting it if the message were leaked
somehow.

Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
tils/Looper.h
6d462b1221e98a9203d84bc33b402e4fcd3f4b94 07-Oct-2010 Jeff Brown <jeffbrown@google.com> am 56364bcd: am 78d15acf: Merge "Make secure views tolerate IME overlays." into gingerbread

Merge commit '56364bcd0d1a1b064db3e83fdb64f948ce5c2ad7'

* commit '56364bcd0d1a1b064db3e83fdb64f948ce5c2ad7':
Make secure views tolerate IME overlays.
e1c290b97d4e34a4f1938ebee30eab6678b06c2a 07-Oct-2010 Mathias Agopian <mathias@google.com> am ff04e97f: am f4619308: Merge "fix [2835280] Add support for cancelling buffers to ANativeWindow" into gingerbread

Merge commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb'

* commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb':
fix [2835280] Add support for cancelling buffers to ANativeWindow
8c4edc02d5fae7ea01f1c5e5316d4058935d695c 06-Oct-2010 Kenny Root <kroot@google.com> am bfa33b94: am f84a5918: Merge "Use pread() in ZipFileRO for Linux" into gingerbread

Merge commit 'bfa33b9484e2c0a019ab81f30261b9696df23a9b'

* commit 'bfa33b9484e2c0a019ab81f30261b9696df23a9b':
Use pread() in ZipFileRO for Linux
35cf0e9854886c7d1a76be7c64ba9d78dfca649c 05-Oct-2010 Jeff Brown <jeffbrown@google.com> Make secure views tolerate IME overlays.

Change-Id: I3cf09b9d91045f4d9c558b4aace482a7b0bbd3d8
i/InputDispatcher.h
19957553cbda9134f542e3374c28710d3556d1ce 02-Oct-2010 Mathias Agopian <mathias@google.com> fix [2835280] Add support for cancelling buffers to ANativeWindow

There is a new ANativeWindow::cancelBuffer() API that can be used to
cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is
returned to the list of availlable buffers. dequeue and cancel are not
mutually thread safe, they must be called from the same thread or
external synchronization must be used.

Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/Surface.h
i/egl/android_natives.h
566b728c933c0fe7d333d426bc420fcd363aa3d1 05-Oct-2010 Mathias Agopian <mathias@google.com> Merge "refactored screenshot code" into gingerbread
df85c455c34a920d22a8e3f7459a1cc615efcd27 29-Sep-2010 Mathias Agopian <mathias@google.com> refactored screenshot code

the core screenshot function now can capture the screen at any lower resolution
performing bilinear filtering.

we also now have some client code to interface with the screenshot service.

it's now possible to request a screenshot at a lower resolution.

Change-Id: I33689bba98507ab928d0898b21596d0d2fe4b953
urfaceflinger/ISurfaceComposer.h
urfaceflinger/SurfaceComposerClient.h
61ef747e0e1b3980fbb10ce48de575caa69a6a74 04-Oct-2010 Kenny Root <kroot@google.com> Use pread() in ZipFileRO for Linux

AssetManager instances are created by zygote and passed to all its
children so that they don't have to individually open
frameworks-res.apk. This creates a problem for determining the current
file offset when using lseek() on those files, because you can't
guarantee the cross-process locking of a mutex. Luckily, Linux
implements pread() to get around this suckiness.

The problem is that only Linux implements this, so we have to keep the
old locking for use on host builds with aapt and friends. aapt doesn't
have this same problem of sharing file descriptors across forked
processes, so we can keep the local AutoMutex to protect accesses of
those files.

Change-Id: Ibe9f11499a53fe345f50fbaea438815ec0fd363e
tils/ZipFileRO.h
3d20bc9ff602a2f81a4570d15b5e1f3cff80af29 04-Oct-2010 Kenny Root <kroot@google.com> am ac754073: am b58b2714: Merge "ZipFileRO: moar logging and wrap close" into gingerbread

Merge commit 'ac7540733cafcca5bdb1842e1ebcb396ba064583'

* commit 'ac7540733cafcca5bdb1842e1ebcb396ba064583':
ZipFileRO: moar logging and wrap close
a2b0e612284b05b121daaf0a33e3c6698b874741 04-Oct-2010 Kenny Root <kroot@google.com> Merge "ZipFileRO: moar logging and wrap close" into gingerbread
c0242197eab18a837c374b152a7450f26c22f974 02-Oct-2010 Jeff Brown <jeffbrown@google.com> am ea58d1ba: am e951ef07: Merge "Wait for initial device scan to finish before updating config." into gingerbread

Merge commit 'ea58d1bac2960c1794f048bfa5d1a60b1a3d23a1'

* commit 'ea58d1bac2960c1794f048bfa5d1a60b1a3d23a1':
Wait for initial device scan to finish before updating config.
76025e44e45881a089a853dbb08b1f09abb30fb1 02-Oct-2010 Jeff Brown <jeffbrown@google.com> am e11b76d3: am f6295b35: Merge "Minor logging changes to input dispatcher to help with debugging." into gingerbread

Merge commit 'e11b76d3efb056edea301d53a354d0730adf3520'

* commit 'e11b76d3efb056edea301d53a354d0730adf3520':
Minor logging changes to input dispatcher to help with debugging.
1ad00e96fe0d10c4fa9b870b42f3ea90b17a2d7f 02-Oct-2010 Jeff Brown <jeffbrown@google.com> Wait for initial device scan to finish before updating config.

This change narrows the opportunity for a race condition setting the
resource Configuration while devices are being updated.

Change-Id: I58efa563f4129ab0fce7108511d16a99dff7e451
i/EventHub.h
i/InputReader.h
dbf6f272a2cad97f7ce7fa600ffd2220483c80d1 02-Oct-2010 Kenny Root <kroot@google.com> ZipFileRO: moar logging and wrap close

There is apparently still a race upon reading the entry Local File
Header that can't be tracked down, so move the LFH check inside the
mutex-protected block so we can call lseek again to see where we are
when we log an error.

Also, close() can fail so use TEMP_FAILURE_RETRY on it so we don't
unwittingly leak file descriptors when Mean Mr. EINTR comes a-knocking.

Change-Id: I753abad0bd882fe28f7281c406fa76f64393ef4c
tils/ZipFileRO.h
2806e381cf08ef3073634b1fdd1f656c1750a7eb 02-Oct-2010 Jeff Brown <jeffbrown@google.com> Minor logging changes to input dispatcher to help with debugging.

Added dumpsys reporting to EventHub.
Made the formatting a bit clearer.
Added 'Locked' suffix to some internal methods of EventHub.

Change-Id: Ic449560bcce378f6361895d27c66854e9724abb0
i/EventHub.h
4adce423e481c50b0dad1d1e2bb52c909bb5bd89 02-Oct-2010 Jeff Brown <jeffbrown@google.com> am 57fa3e8b: am 9e32a438: Merge "Support haptic feedback for virtual keys defined in key layout." into gingerbread

Merge commit '57fa3e8b4c94125ddb5be015dd7fbde4a458894f'

* commit '57fa3e8b4c94125ddb5be015dd7fbde4a458894f':
Support haptic feedback for virtual keys defined in key layout.
956c0fb2386cb0cf92e08b199c706ed3a044ad1b 01-Oct-2010 Jeff Brown <jeffbrown@google.com> Support haptic feedback for virtual keys defined in key layout.

Change-Id: I83e4108a87332692e03791dc066206becbc7941f
i/Input.h
i/InputReader.h
i/KeycodeLabels.h
84ac949b0e2e63809ed25829e891ed0b784a358d 01-Oct-2010 Mathias Agopian <mathias@google.com> Merge "refactored screenshot code"
3f0fd1897cf93dcdc910003bba613a8f02a3cd58 01-Oct-2010 Jeff Brown <jeffbrown@google.com> am 5d3cef8a: am e0c12c88: Merge "Move verbose logging of device capabilities to dumpsys." into gingerbread

Merge commit '5d3cef8a6d1baec29512764b9e0ba240ccd7fcfe'

* commit '5d3cef8a6d1baec29512764b9e0ba240ccd7fcfe':
Move verbose logging of device capabilities to dumpsys.
26c94ff615ffceee586c52f33954122d877f6c85 30-Sep-2010 Jeff Brown <jeffbrown@google.com> Move verbose logging of device capabilities to dumpsys.

Change-Id: I5d55eaebfdf049bd1ac1e7bab2758886cfefc9d7
i/InputReader.h
74c40c0a273dbfd7d10617c4cc1b0c066bfc812e 29-Sep-2010 Mathias Agopian <mathias@google.com> refactored screenshot code

the core screenshot function now can capture the screen at any lower resolution
performing bilinear filtering.

we also now have some client code to interface with the screenshot service.

it's now possible to request a screenshot at a lower resolution.

Change-Id: I5a3b0e431421800e3aad601d9af8f94adffbc71f
urfaceflinger/ISurfaceComposer.h
urfaceflinger/SurfaceComposerClient.h
744c559ac78ecfa62d8809915a816bdbf3f87a09 27-Sep-2010 Jeff Brown <jeffbrown@google.com> Add support for transferring touch focus.

Prerequisite for drag and drop.

Change-Id: Iedbe93ed0f3e1c4083130fe66b4ba06d416afce0
i/InputDispatcher.h
e457038905e8deb3b1a0b9fa898ce0a9c1993772 27-Sep-2010 Jeff Brown <jeffbrown@google.com> am 9785bf0f: am 14a288da: Merge "Add suuport for splitting touch events across windows." into gingerbread

Merge commit '9785bf0f2b6b8758aed7ded3b996a2ef0be89919'

* commit '9785bf0f2b6b8758aed7ded3b996a2ef0be89919':
Add suuport for splitting touch events across windows.
6949f5da669d6ec6db24da0b561ad3466aece60d 27-Sep-2010 Jeff Brown <jeffbrown@google.com> Merge "Add suuport for splitting touch events across windows." into gingerbread
d1b0a2bfe50e61241fab6a571941c207232d9212 27-Sep-2010 Jeff Brown <jeffbrown@google.com> Add suuport for splitting touch events across windows.

This feature is currently used to enable dragging the start and end
selection handles of a TextView at the same time. Could be used for
other things later.

Deleted some dead code in ArrowKeyMovementMethod and CursorControllers.

Change-Id: I930accd97ca1ca1917aab8a807db2c950fc7b409
i/Input.h
i/InputDispatcher.h
i/InputReader.h
tils/BitSet.h
a3aefeb1c31618dcc897da22d2d2f741104e3fe3 25-Sep-2010 Mathias Agopian <mathias@google.com> am 495ad4f2: am beabe75a: Merge changes I1f7c4535,I741c68a2 into gingerbread

Merge commit '495ad4f22096aa172d025c16c25497e7dad8f2bd'

* commit '495ad4f22096aa172d025c16c25497e7dad8f2bd':
simple test app for screen capture API
add support for [1974164] Be able to take a screen shot on the device
8405dff685a804f39f1b7fccc79d28dac9b457c3 25-Sep-2010 Mathias Agopian <mathias@google.com> Merge changes I1f7c4535,I741c68a2 into gingerbread

* changes:
simple test app for screen capture API
add support for [1974164] Be able to take a screen shot on the device
d6d93dbb86909747a5c7a8f363b28901dbb7422f 25-Sep-2010 Kenny Root <kroot@google.com> am 3e07c000: am 74865ef6: Merge "Add locking around ZIP seeking" into gingerbread

Merge commit '3e07c0007b10fbda945516acaf6b2a8787a6ca06'

* commit '3e07c0007b10fbda945516acaf6b2a8787a6ca06':
Add locking around ZIP seeking
1b0b30d04304392748a8a4ab5a69e52a19f51b3a 24-Sep-2010 Mathias Agopian <mathias@google.com> add support for [1974164] Be able to take a screen shot on the device

screenshots are taken using ISurfaceComposer::captureScreen() which returns
the size of the screenshot and an IMemoryHeap containing the data.
screenshots have limitations:
- they will always fail if a secure window is up on screen
- require GL_OES_framebuffer_object extension
- in some situation, video planes won't been captured

Change-Id: I741c68a2d2984fb139039301c3349e6780e2cd58
urfaceflinger/ISurfaceComposer.h
fa98920b7192d0db8d22d9345b750810f89f9cdd 24-Sep-2010 Kenny Root <kroot@google.com> Add locking around ZIP seeking

Since we switched to seeking to the LFH to verify its existence instead
of a huge mmap of the file, we have to guarantee that another seek
doesn't happen before we finish our read on the LFH.

Change-Id: If8135d9cb6f2f5cc4db734eafa4f6b5f6269c62a
tils/ZipFileRO.h
6bea17498385e644e243ded1e2205ce1388c1367 22-Sep-2010 Jeff Brown <jeffbrown@google.com> am 4ec134cd: am cce0cd13: Merge "Looper: use pthread_once for TLS key initialization." into gingerbread

Merge commit '4ec134cdba52b663506562c6406b07915820b007'

* commit '4ec134cdba52b663506562c6406b07915820b007':
Looper: use pthread_once for TLS key initialization.
61a25b249066baed0fdab0411f44a2c6b7292766 22-Sep-2010 Jeff Brown <jeffbrown@google.com> Looper: use pthread_once for TLS key initialization.

Also fix a Valgrind complaint by zeroing out the entire epoll event
struct since otherwise the data field union would be partly
uninitialized (but not in a harmful way).

Change-Id: I2091ce517e87fcad7c9caf90e2c5e4854a7ca465
tils/Looper.h
067ed1db03a5452c79d30473f6e94c25db098f65 18-Sep-2010 Jeff Brown <jeffbrown@google.com> am bc9599d4: am 838e93ed: Merge "Looper: Drop default parameters in favor of a safer overload." into gingerbread

Merge commit 'bc9599d48c79c18d306a13f51af9ef2aac92cdca'

* commit 'bc9599d48c79c18d306a13f51af9ef2aac92cdca':
Looper: Drop default parameters in favor of a safer overload.
b0619e8ad8e258f3e87a78a3a23c353d98efafa7 17-Sep-2010 Jeff Brown <jeffbrown@google.com> Looper: Drop default parameters in favor of a safer overload.

The idea is that if you're writing code that wants fd/events/data on
return from pollOnce() / pollAll() you should really pass in all of those
arguments. When I changed the Looper API earlier, it was difficult
to ensure that all callers were passing the right parameters since they
were relying on default parameters to some degree so usage mistakes
would not have been caught by the compiler.

Change-Id: I1f2812894270aaf1515017ac1616b6b312d9b565
tils/Looper.h
54e9a7ec0b8c742726bc04930f1b24e879027dbf 17-Sep-2010 Jeff Brown <jeffbrown@google.com> am 6f0ff46c: am 9c258710: Merge "Fix app switch latency optimization." into gingerbread

Merge commit '6f0ff46c6f1fd1b61325b545ab9e93c5ebf37d25'

* commit '6f0ff46c6f1fd1b61325b545ab9e93c5ebf37d25':
Fix app switch latency optimization.
d8816c3c4cd99cf51108f2a892c7a01b0de24057 16-Sep-2010 Jeff Brown <jeffbrown@google.com> Fix app switch latency optimization.

This optimization was broken due to recent changes in how ANRs are handled.

Change-Id: Ic99248a12755fadac8d4893e7d305b773e038d3d
i/InputDispatcher.h
87fab277fd19c45c81ad8c6c81c0f1558bed6137 16-Sep-2010 Jeff Brown <jeffbrown@google.com> am 61cf67a2: am 24326f72: Merge "Input API review." into gingerbread

Merge commit '61cf67a220ba3205737c646c1c836a92074220de'

* commit '61cf67a220ba3205737c646c1c836a92074220de':
Input API review.
128e33421b7744126a69226d7acea717e9b6e652 16-Sep-2010 Jeff Brown <jeffbrown@google.com> Merge "Input API review." into gingerbread
02a71f7ab423ac1be8c37296355bd0ab68c5376a 16-Sep-2010 Jeff Brown <jeffbrown@google.com> am 7642c82c: am f4d788c9: Merge "Make input dispatcher only ANR for foreground windows." into gingerbread

Merge commit '7642c82c291051919aad87c797e2dc1d77ed55e1'

* commit '7642c82c291051919aad87c797e2dc1d77ed55e1':
Make input dispatcher only ANR for foreground windows.
53a415e6d1661d3d6278542c960f8d0cf62f6f42 16-Sep-2010 Jeff Brown <jeffbrown@google.com> Make input dispatcher only ANR for foreground windows.

Redesigned the input dispatcher's ANR timeout mechanism so it is much
closer to Froyo's policy. ANR is only ever signalled if the dispatcher
is waiting on a window to finish processing its previous event(s) and
there is new pending input.

In the old code, we tracked the dispatch timeout separately for each
input channel. This was somewhat complicated and also resulted in the
situation where applications could ANR long after the user had pushed
them into the background.

Change-Id: I666ecada0952d4b95f1d67b9f733842b745c7f4b
i/InputDispatcher.h
3fd1ed59386ec870f41c372ee1248979e42c9832 16-Sep-2010 Mathias Agopian <mathias@google.com> am 310da64d: am f182e8a8: fix a typo where the eventtags code were wrong

Merge commit '310da64d78750cdba4349d7cc0a268c07155569d'

* commit '310da64d78750cdba4349d7cc0a268c07155569d':
fix a typo where the eventtags code were wrong
6a3de9a424bb9ba426cf4d98b362f7b20664a9f7 15-Sep-2010 Mathias Agopian <mathias@google.com> fix a typo where the eventtags code were wrong

Change-Id: I517112a1475c10b71009a0aa9c3894c76a1f270f
i/GraphicLog.h
dc543aec707be4239caec16f9fd3c13878f90a2f 15-Sep-2010 Jeff Brown <jeffbrown@google.com> am 14bc6b5d: am 09340a4b: Merge "Replace epoll() with poll() and rename PollLoop to Looper." into gingerbread

Merge commit '14bc6b5d0677e5c454a67775c852f90389bb4567'

* commit '14bc6b5d0677e5c454a67775c852f90389bb4567':
Replace epoll() with poll() and rename PollLoop to Looper.
c479e18db0216f7096fefe85ffa71ab00329aef3 15-Sep-2010 Mathias Agopian <mathias@google.com> resolved conflicts for merge of 48a86240 to master

Change-Id: I2305fef9f4dd46183337217d822df3c675b6b6e5
b5764e066c3ba60261c2719b4f447904605bf779 15-Sep-2010 Jeff Brown <jeffbrown@google.com> Input API review.

Drop currently unsupported input features.
Add documentation comments.

Change-Id: I407d2e1dd90c5ee82983a3ccf177430d35ee7592
i/EventHub.h
b06cca6228aec6acfefbfae7edd768d7de4c7057 15-Sep-2010 Jeff Brown <jeffbrown@google.com> Merge "Replace epoll() with poll() and rename PollLoop to Looper." into gingerbread
59abe7e0909bf4b7bf7b9601e1e40a05f6d4fd8a 14-Sep-2010 Jeff Brown <jeffbrown@google.com> Replace epoll() with poll() and rename PollLoop to Looper.

As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports. That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
ui/SensorEventQueue.h
i/InputDispatcher.h
i/InputTransport.h
tils/Looper.h
tils/PollLoop.h
35b48d10bc9e064201d3d54d2d476314684a7a05 14-Sep-2010 Mathias Agopian <mathias@google.com> Add logging of various important graphics events

There are 16 events logged in the event log:
SF_APP_DEQUEUE_BEFORE
SF_APP_DEQUEUE_AFTER
SF_APP_LOCK_BEFORE
SF_APP_LOCK_AFTER
SF_APP_QUEUE

SF_REPAINT
SF_COMPOSITION_COMPLETE
SF_UNLOCK_CLIENTS
SF_SWAP_BUFFERS
SF_REPAINT_DONE

SF_FB_POST_BEFORE
SF_FB_POST_AFTER
SF_FB_DEQUEUE_BEFORE
SF_FB_DEQUEUE_AFTER
SF_FB_LOCK_BEFORE
SF_FB_LOCK_AFTER

all events log the buffer conserned and a timestamp in microseconds.

by default the logging is not enabled, to turn it on:
adb shell service call SurfaceFlinger 1006 i31 1
adb shell setprop debug.graphic_log 1

The effect is immediate in SurfaceFlinger, but applications need to be
restarted.

Change-Id: Ifc2e31f7aed072d9a7dede20ff2ce59231edbec1
i/FramebufferNativeWindow.h
i/GraphicLog.h
055a7926e651e3f99aedceda3b18bb6ea53d7769 13-Sep-2010 Jeff Brown <jeffbrown@google.com> am 0f0541e4: am b88102f5: Input dispatcher ANR handling enhancements.

Merge commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6'

* commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6':
Input dispatcher ANR handling enhancements.
a665ca805c7ecda89ef95658f4d1c09ba6bd7f2e 08-Sep-2010 Jeff Brown <jeffbrown@google.com> Input dispatcher ANR handling enhancements.

This change is essentially a rewrite of the main input dispatcher loop
with the target identification folded in. Since the input dispatcher now
has all of the window state, it can make better decisions about
when to ANR.

Added a .5 second deadline for processing app switch keys. This behavior
predates Gingerbread but had not previously been ported.

Fixed some timing inaccuracies in the ANR accounting that could cause
applications to ANR sooner than they should have.

Added a mechanism for tracking key and motion events that have been
dispatched to a window so that appropriate cancelation events can be
synthesized when recovering from ANR. This change helps to keep
applications in sync so they don't end up with stuck buttons upon
recovery from ANRs.

Added more comments to describe the tricky parts of PollLoop.

Change-Id: I13dffca27acb436fc383980db536abc4d8b9e6f1
i/InputDispatcher.h
i/InputManager.h
i/InputReader.h
i/PowerManager.h
tils/PollLoop.h
0ddf0656c4254d5415279eeee83e4c0f78d64fab 09-Sep-2010 Romain Guy <romainguy@google.com> Merge "Purge Skia objects from GL caches as needed."
4e0c1f27fdefdd9b0208ea64542c1e39d9327eb9 09-Sep-2010 Romain Guy <romainguy@google.com> Purge Skia objects from GL caches as needed.

Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc
tils/Singleton.h
e1e37e4c7baffb42117426b6b4bb70e3de2beec4 08-Sep-2010 Jeff Brown <jeffbrown@google.com> am 8723bb58: am b21fb104: Fix key repeat delay.

Merge commit '8723bb58b17a07b7ca036cc76d737c6c0f4b13c7'

* commit '8723bb58b17a07b7ca036cc76d737c6c0f4b13c7':
Fix key repeat delay.
6240634883061299f9ff33b2deef0f8e0c81d447 08-Sep-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of a05088c1 to master

Change-Id: I7973f9f28586dec9b9659f8f662f40db7997a521
61ce3982e1e5fd31f6e5b2be4d238b048a58f760 07-Sep-2010 Jeff Brown <jeffbrown@google.com> Fix key repeat delay.

Change-Id: I6216e082324ee29bf50e37acc673350ca5417c4d
i/InputDispatcher.h
af30ff6020990427e0e0e73e4ac4a85a6f26a8ff 02-Sep-2010 Jeff Brown <jeffbrown@google.com> Add support for secure views.

Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.

Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.

Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
i/Input.h
i/InputDispatcher.h
i/InputTransport.h
c946422d585e92c60fb144ab5c06a102d64bfc96 08-Sep-2010 Dianne Hackborn <hackbod@google.com> am a1205f07: am 2d3739d4: Merge "Modify native ALooper to take an explicit ident." into gingerbread

Merge commit 'a1205f07a6f0c745e8f42f16fe38c06af04143c7'

* commit 'a1205f07a6f0c745e8f42f16fe38c06af04143c7':
Modify native ALooper to take an explicit ident.
45e0acb41acf30a1b7592ea7e695d96aca3ccd3b 08-Sep-2010 Dianne Hackborn <hackbod@google.com> Modify native ALooper to take an explicit ident.

The ALooper API now uses an explicit "identifier" for the integer
that is returned rather than implicitly using the fd. This allows
the APIs that had the fd to be a little more sane.

Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
tils/PollLoop.h
9b83cce203444f9ee790574a2bbc4c57ffb35af9 01-Sep-2010 Jeff Brown <jeffbrown@google.com> am df02df11: am 307ed31c: Merge "Remove incomplete input device enumeration NDK API." into gingerbread

Merge commit 'df02df115a594553b3ebaa95a0a7f7185a8787d3'

* commit 'df02df115a594553b3ebaa95a0a7f7185a8787d3':
Remove incomplete input device enumeration NDK API.
774cf1baa17eeb76d4ad969266686df9b6248aaf 01-Sep-2010 Jeff Brown <jeffbrown@google.com> Remove incomplete input device enumeration NDK API.

Change-Id: I32de74ff5fcf0e29179a2aee03ddabd22fa485bb
i/Input.h
f3372f7ca355cbc8828f543937469e313e9500ec 01-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> am ae087369: am 63070856: Merge "Don\'t propagate StrictMode over one-way Binder calls." into gingerbread

Merge commit 'ae087369c56a270c33c1c1af5be7d3c5d7f94e80'

* commit 'ae087369c56a270c33c1c1af5be7d3c5d7f94e80':
Don't propagate StrictMode over one-way Binder calls.
5273603e98d2db3bac656b7bcf5352c04c86d62f 31-Aug-2010 Brad Fitzpatrick <bradfitz@android.com> Don't propagate StrictMode over one-way Binder calls.

This was causing stack stitching problems where a one-way call with
violations followed by a two-way call without violations was getting
the previous one-way call's violation stack stitched on to the second
caller's stack.

The solution is a little more indirect than I would've liked
(preserving the binder's onTransact flags until enforceInterface) but
was seemingly necessary to work without changing the AIDL compiler.
It should also be sufficiently cheap, since no new calls to
thread-local IPCThreadState lookups were required. The additional
work is just same-thread getter/setters on the existing
IPCThreadState.

Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
inder/IPCThreadState.h
d363aa2e41c29f1ad7d6b2a6649797766ce6250e 31-Aug-2010 Jeff Brown <jeffbrown@google.com> am 36f0cb26: am 8d60866e: Input device calibration and capabilities.

Merge commit '36f0cb26cbb4ef62995ff2e5a540cf8814e7f030'

* commit '36f0cb26cbb4ef62995ff2e5a540cf8814e7f030':
Input device calibration and capabilities.
38a7fabd96566a229a276e7066ac1caf5157e127 30-Aug-2010 Jeff Brown <jeffbrown@google.com> Input device calibration and capabilities.

Finished the input device capability API.
Added a mechanism for calibrating touch devices to obtain more
accurate information about the touch contact area.
Improved pointer location to show new coordinates and capabilities.
Optimized pointer location display and formatting to avoid allocating large
numbers of temporary objects. The GC churn was causing the application to
stutter very badly when more than a couple of fingers were down).
Added more diagnostics.

Change-Id: Ie25380278ed6f16c5b04cd9df848015850383498
i/EventHub.h
i/Input.h
i/InputReader.h
2ac5b0d6de8683c27b69016b8d0eaf6707f21f06 28-Aug-2010 Mathias Agopian <mathias@google.com> am d322d163: am ae66946b: Merge "fix a race in SF buffer management" into gingerbread

Merge commit 'd322d16323176ddd5fef3383798176f64d0078c8'

* commit 'd322d16323176ddd5fef3383798176f64d0078c8':
fix a race in SF buffer management
0e7f4292c78ef32643fdb10134e91e84067515fc 27-Aug-2010 Mathias Agopian <mathias@google.com> fix a race in SF buffer management

also remove some unused code.

Change-Id: Iae2c3309b7a08055f3e13a5b866c5c084993e352
rivate/surfaceflinger/SharedBufferStack.h
4ad298c12c43563789fd2213428347caf2f74c64 25-Aug-2010 Mathias Agopian <mathias@google.com> am bc4389ed: am 8395b462: Merge "fix [2931513] Add support for setting the orientation of an ANativeWindow" into gingerbread

Merge commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64'

* commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64':
fix [2931513] Add support for setting the orientation of an ANativeWindow
b661d66013b9803c50dc78ca0247ac39caef443a 20-Aug-2010 Mathias Agopian <mathias@google.com> fix [2931513] Add support for setting the orientation of an ANativeWindow

Also implement support for cropping.

Change-Id: Iba5888dd242bf2feaac9e9ce26e404c1f404c280
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/Surface.h
i/egl/android_natives.h
89c2dd2cc27ead77da131fe27810c99a11a92ad7 11-Aug-2010 Jamie Gennis <jgennis@google.com> Change the framework to use the new camera preview path.

This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated. The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface. The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.

Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
urfaceflinger/Surface.h
3f45e44adf9d76c7b76d33aec4c6e93f794d470d 23-Aug-2010 Andreas Huber <andih@google.com> Merge "Squashed commit of the following:"
8b42e8a5d87dcdc8ea31368ab88de49b72ab5432 16-Aug-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 35cc68814a9537c31fde146e171e7b0bbdfe211e
Author: Andreas Huber <andih@google.com>
Date: Mon Aug 16 08:48:42 2010 -0700

Only enable support for yuv to yuv conversion on passion, where it's available, use the slower yuv->rgb565 path everywhere else.

commit d8ac5a8814103e60d11d2acf61997fc31a1dc58d
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 13 13:56:44 2010 -0700

The software renderer takes over all rendering, converting from yuv to yuv if possible and rgb565 otherwise.

commit 684972074b74318bdcb826ed9b5b0864d2d2e273
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 13 09:34:35 2010 -0700

A first shot at supporting the new rendering APIs.

Change-Id: Iea9b32856da46950501f1a700f616b5feac710fd
urfaceflinger/Surface.h
24b2aee9ca5bf8a119569ca052908d0d3509cb9c 21-Aug-2010 Kenny Root <kroot@google.com> am 821afa9a: am 54d41379: Merge "Add OBB flags to support overlays" into gingerbread

Merge commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973'

* commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973':
Add OBB flags to support overlays
e09c4c710e913bffa567b9a75956da53318327b9 21-Aug-2010 Jeff Brown <jeffbrown@google.com> am d25f0aea: am 99401b29: Merge "Add support for throttling motion events." into gingerbread

Merge commit 'd25f0aea1cebe93aff55a75374e172f87115f1b3'

* commit 'd25f0aea1cebe93aff55a75374e172f87115f1b3':
Add support for throttling motion events.
297f493405718cbeafa6b47a70f51e09c46ddbb8 20-Aug-2010 Jeff Brown <jeffbrown@google.com> am 33992d41: am 72e0b2ab: Merge "Fix some input device mapping bugs with certain drivers." into gingerbread

Merge commit '33992d4195fe55f42ba6919f5a07707a51a12d5d'

* commit '33992d4195fe55f42ba6919f5a07707a51a12d5d':
Fix some input device mapping bugs with certain drivers.
10688121582c15e861c94b1763ad99c338d3154b 19-Aug-2010 Kenny Root <kroot@google.com> Merge "Add OBB flags to support overlays" into gingerbread
542412c8c96ee369e7bdc197a79a2d37c7f8e020 19-Aug-2010 Jeff Brown <jeffbrown@google.com> Add support for throttling motion events.

Change-Id: I24b3a17753e91ecda60a60fe5cd2e6b3260e033d
i/InputDispatcher.h
db1e2bcbc8063e905749c30fc683f340a832e6cf 18-Aug-2010 Jeff Brown <jeffbrown@google.com> am 29eb491a: am 3922484d: Merge "Optimize EventHub reads." into gingerbread

Merge commit '29eb491a5addc78003299ecab6ab6c716201f9dc'

* commit '29eb491a5addc78003299ecab6ab6c716201f9dc':
Optimize EventHub reads.
6f7d4ed7b8f914504aa8b04a07b96b5e8bbc7f21 18-Aug-2010 Jeff Brown <jeffbrown@google.com> am 8fd80e92: am 72ce4235: Merge "Fix possible race conditions during channel unregistration." into gingerbread

Merge commit '8fd80e924a2f40f6a785f834914f8a6f18a3aa9d'

* commit '8fd80e924a2f40f6a785f834914f8a6f18a3aa9d':
Fix possible race conditions during channel unregistration.
36cb115c771d8724a49512d5f4def534c731992b 18-Aug-2010 Jeff Brown <jeffbrown@google.com> Merge "Fix some input device mapping bugs with certain drivers." into gingerbread
d64c855821457515d1da78dfac65af8306b53343 18-Aug-2010 Jeff Brown <jeffbrown@google.com> Fix some input device mapping bugs with certain drivers.

On single-touch devices, pointer up/down is signalled by a BTN_TOUCH
key event. Previously we handled BTN_TOUCH immediately but some drivers
may produce the sequence BTN_TOUCH, ABS_X, ABS_Y, SYN_REPORT on pointer down
which caused us to emit a bad initial pointer down location.
Now we wait for SYN_REPORT before reporting the up or down.

On multi-touch devices, pointer up can be signalled by as little as
the sequence SYN_MT_REPORT, SYN_REPORT. This change ensures that we
handle this case.

Added support for reading ABS_MT_PRESSURE when available.
Corrected mapping of touchMajor/touchMinor on single touch devices.
Minor code cleanup.

Change-Id: Ic7ec4811241ed85a06e59b8a839ca05180d491d4
i/InputReader.h
62576ec6f395b368bda2fdfc26ec0dac79d78df8 18-Aug-2010 Jeff Brown <jeffbrown@google.com> am 3922484d: Merge "Optimize EventHub reads." into gingerbread

Merge commit '3922484d7458a4ab72fc1ca8952a0776dd1c7d20' into gingerbread-plus-aosp

* commit '3922484d7458a4ab72fc1ca8952a0776dd1c7d20':
Optimize EventHub reads.
4c8c491bbba54eac10a2c694b8e4c23d66f06bdb 18-Aug-2010 Jeff Brown <jeffbrown@google.com> am 72ce4235: Merge "Fix possible race conditions during channel unregistration." into gingerbread

Merge commit '72ce42352c1c229e05d910b4176f3cddb608e814' into gingerbread-plus-aosp

* commit '72ce42352c1c229e05d910b4176f3cddb608e814':
Fix possible race conditions during channel unregistration.
7dcaa584969253e32aec19d5bd40062704aaf95b 22-Jun-2010 Jens Gulin <jens.gulin@sonyericsson.com> Keep track of remaining fd when devices are removed

Sometimes the wrong fd was accessed when the device was addressed
by device id.

The earlier implementation assumed that two arrays were in sync
but one of them was compacted when devices were removed. Instead
of that dependency the device now keeps track of it's file descriptor.

Change-Id: Ib0f320603aafb07ded354bc3687de9759c9068f2
i/EventHub.h
28e9b9f2435b9b73addddb092c66a8da6112b350 12-Aug-2010 Kenny Root <kroot@google.com> Add OBB flags to support overlays

* Add flags field in OBB footer to support overlays.

* Remove unused 'crypto' and 'filesystem' fields in obbtool (could
later be supported in the "flags" field of the OBB footer).

* Add notes to document OBB classes before shipping.

Change-Id: I386b43c32c5edef55210acb5d3322639c08010ba
tils/ObbFile.h
827630744a5bf05d25c2fa1fb7c53b9ab2b94a69 18-Aug-2010 Jeff Brown <jeffbrown@google.com> Optimize EventHub reads.

Change-Id: Id7d09c0a6e5c741c1e29becd2b6560772c5ff372
i/EventHub.h
0cacb87f022cc2bfa6c3b40217f9b230628f3fd7 18-Aug-2010 Jeff Brown <jeffbrown@google.com> Fix possible race conditions during channel unregistration.

Previously, the input dispatcher assumed that the input channel's
receive pipe file descriptor was a sufficiently unique identifier for
looking up input channels in its various tables. However, it can happen
that an input channel is disposed and then a new input channel is
immediately created that reuses the same file descriptor. Ordinarily
this is not a problem, however there is a small opportunity for a race
to arise in InputQueue.

When InputQueue receives an input event from the dispatcher, it
generates a finishedToken that encodes the channel's receive pipe fd,
and a sequence number. The finishedToken is used by the ViewRoot
as a handle for the event so that it can tell the InputQueue when
the event has finished being processed.

Here is the race:

1. InputQueue receives an input event, assigns a new finishedToken.
2. ViewRoot begins processing the input event.
3. During processing, ViewRoot unregisters the InputChannel.
4. A new InputChannel is created and is registered with the Input Queue.
This InputChannel happens to have the same receive pipe fd as
the one previously registered.
5. ViewRoot tells the InputQueue that it has finished processing the
input event, passing along the original finishedToken.
6. InputQueue throws an exception because the finishedToken's receive
pipe fd is registered but the sequence number is incorrect so it
assumes that the client has called finish spuriously.

The fix is to include a unique connection id within the finishedToken so
that the InputQueue can accurately confirm that the token belongs to
the currently registered InputChannel rather than to an old one that
happened to have the same receive pipe fd. When it notices this, it
ignores the spurious finish.

I've also made a couple of other small changes to avoid similar races
elsewhere.

This patch set also includes a fix to synthesize a finished signal
when the input channel is unregistered on the client side to
help keep the server and client in sync.

Bug: 2834068
Change-Id: I1de34a36249ab74c359c2c67a57e333543400f7b
i/InputDispatcher.h
68f73555d5371809e9f0ebe8edbfbd691c80a654 17-Aug-2010 Jean-Baptiste Queru <jbq@google.com> am ddbcce3a: Merge "resolved conflicts for merge of be50507b to gingerbread-plus-aosp" into gingerbread-plus-aosp

Merge commit 'ddbcce3afbb38680fb84583f7bad5209307e6459'

* commit 'ddbcce3afbb38680fb84583f7bad5209307e6459':
Keep track of remaining fd when devices are removed
28a989b03bc7be084705cf9d2a29e385917a7edd 17-Aug-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of be50507b to gingerbread-plus-aosp

Change-Id: Iaa5fb62f7b82b488bca192e7f374c044c7e1e6a7
fff3f4af49fcce1ecc7c8bbe06a88336abde60b7 12-Aug-2010 Jeff Brown <jeffbrown@google.com> am f66f8a58: am 95af0c14: Merge "Add support for the PointerLocation overlay." into gingerbread

Merge commit 'f66f8a58cc4412bd258e1d5b11cac17a617bdc58'

* commit 'f66f8a58cc4412bd258e1d5b11cac17a617bdc58':
Add support for the PointerLocation overlay.
2f09a77659e01067d0b742571db86d6cc2feb277 12-Aug-2010 Jeff Brown <jeffbrown@google.com> Merge "Add support for the PointerLocation overlay." into gingerbread
3f9ff2076c41882c1e34f8d124df5f5e31b8c709 11-Aug-2010 Jeff Brown <jeffbrown@google.com> Add support for the PointerLocation overlay.

This change involves adding a new method to IWindowManager,
monitorInput() that returns an InputChannel to receive a copy of all
input that is dispatched to applications. The caller must have
the READ_INPUT_STATE permission to make this request (similar to
other window manager methods such as getKeycodeState).

Change-Id: Icd14d810174a5b2928671ef16de73af88302aea0
tils/String8.h
8264321e31189e9ec80ce9e0c2b8e6554093f1b0 11-Aug-2010 Kenny Root <kroot@google.com> am 80328ba0: am 8ea71511: Merge "Initial tool for OBB manipulation" into gingerbread

Merge commit '80328ba09606bd0825d7d4c9a4f213d1de09e53a'

* commit '80328ba09606bd0825d7d4c9a4f213d1de09e53a':
Initial tool for OBB manipulation
1dfd9f8a97adc970656c15d1950865a4cffe5e7b 19-Jul-2010 Kenny Root <kroot@google.com> Initial tool for OBB manipulation

Add "obbtool" host command for adding, removing, and querying Opaque
Binary Blob (OBB) information from a file.

Change-Id: Id2ac41e687ad2a500c362616d6738a8ae7e8f5c3
tils/ObbFile.h
f09b0ae832569ad5e32728c5bb74c93f65c2470d 11-Aug-2010 Dianne Hackborn <hackbod@google.com> am 679ac09a: am a5ae50cd: Merge "More native work." into gingerbread

Merge commit '679ac09a5c22175354f3a04b28456b323839530e'

* commit '679ac09a5c22175354f3a04b28456b323839530e':
More native work.
c3ef3ae5521b2bd5bac2a3da6666ac324d5ce930 04-Aug-2010 Dianne Hackborn <hackbod@google.com> More native work.

Implement save/restore of state, and add native APIs for
configuration information.

Change-Id: I2a3ddc2ba605db58d7c8b2b31b9215fb323f90b5
tils/AssetManager.h
tils/ResourceTypes.h
8cf167fd58538750787d499df33f2c1fd08fca2a 11-Aug-2010 Jeff Brown <jeffbrown@google.com> am 95105f3c: am c3fc2d03: Fix safe mode and KeyEvent.getMaxKeyCode().

Merge commit '95105f3c25110f28b236cfa71e9ad74533eef854'

* commit '95105f3c25110f28b236cfa71e9ad74533eef854':
Fix safe mode and KeyEvent.getMaxKeyCode().
8d4dfd25f7329d0cdcc8dda8bdfadd7ebec3b3a4 11-Aug-2010 Jeff Brown <jeffbrown@google.com> Fix safe mode and KeyEvent.getMaxKeyCode().

Bug: 2901731
Change-Id: I78617c1b9dee3790fc590e5af4b5083368873184
i/InputReader.h
404b6473e9a5b68f9372f5ba70e7c1195661dcda 07-Aug-2010 Kenny Root <kroot@google.com> am d7ce227b: am 818490ab: Fix String8::operator+

Merge commit 'd7ce227bcb854f048124bbc487eba844c6599142'

* commit 'd7ce227bcb854f048124bbc487eba844c6599142':
Fix String8::operator+
aa966638b9428e78837eff93ef29f10f31193256 06-Aug-2010 Kenny Root <kroot@google.com> Fix String8::operator+

The LHS was ignored when using:
String8 + String8
String8 + (const char*)

Add unit tests for above.

Bug: 2898473
Change-Id: Ic8fe7be668b665c36aaaa3fc3c3ffdfff0fbba25
tils/String8.h
5e9ccb8f3bb9dbf2b9f48ff10f22c2bd9a57d8d4 04-Aug-2010 Chris Tate <ctate@android.com> am 9f6b16a2: am 5d46ce24: Merge "Enhanced VelocityTracker for > 5 pointers and fixed bugs." into gingerbread

Merge commit '9f6b16a29b62f29496bc652cfec7d6fe9f08c7f4'

* commit '9f6b16a29b62f29496bc652cfec7d6fe9f08c7f4':
Enhanced VelocityTracker for > 5 pointers and fixed bugs.
b183fbd6460e6ebb7ffc568ec38ab1548dac0065 31-Jul-2010 Jeff Brown <jeffbrown@google.com> Enhanced VelocityTracker for > 5 pointers and fixed bugs.

Improved PointerLocation tool to use VelocityTracker more efficiently
and correctly when multiple pointers are down.

Fixed a bug in TouchInputMapper where it was not correctly copying
the id to index map in the last touch data. This could cause strange
behavior on secondary pointer up events.

Also added finished callback pooling in InputQueue.

Change-Id: Ia85e52ac2fb7350960ea1d7edfbe81a1b3e8267b
i/InputReader.h
ec05cd4a9756378d32f31d3ad50ae48771b2bea3 30-Jul-2010 Jeff Brown <jeffbrown@google.com> am 3b724c83: am 00e5c613: Merge "Improve thread safety of input mappers." into gingerbread

Merge commit '3b724c836b13b320b2b2c492c28660617e0d503e'

* commit '3b724c836b13b320b2b2c492c28660617e0d503e':
Improve thread safety of input mappers.
b51719b9ae719615d5ce66ad8a81395388ef9a5b 30-Jul-2010 Jeff Brown <jeffbrown@google.com> Improve thread safety of input mappers.

Also fixed bug where old touch screen size could be reported by
getMotionRange if an orientation change occurred but the user has not
yet touched the screen.

Bug: 2877345
Change-Id: I7878f47458f310ed6ebe6a5d1b2c9bec2c598ab9
i/InputReader.h
73409df32e2139bc8e4a8e6c25f29f4079dd2abb 30-Jul-2010 Mathias Agopian <mathias@google.com> resolved conflicts for merge of 02513855 to master

Change-Id: Ie33d57798d3d5b800edde753dac86de062bc270c
a48bcf62b6a26f24a0bdd2b44bb39fadce499e92 30-Jul-2010 Mathias Agopian <mathias@google.com> Added SensorManager.getMinDelay()

Exposed the new "min delay" sensor property through native and
java sensor apis. This allows the caller to know what is the
maximum rate at which a sensor can return events, or, if a sensor
works in "update" mode (events returned only when the value changes).

Also augmented SensorManager.regusterSensorEvent() so that it can
accept a value in microsecond in addition to the 4 constants already
defined.

Change-Id: If425e9979892666df8c989d7de3c362230fa19e0
ui/Sensor.h
ui/SensorEventQueue.h
f67c53eee33d2a2296f269a504e11c90904b3d39 29-Jul-2010 Jeff Brown <jeffbrown@google.com> DO NOT MERGE: Fix input event injection ANRs on UI thread.

Added a new asynchronous injection mode and made the existing
synchronization mechanism more robust.

Change-Id: Ia4aa04fd9b75ea2461a844c5b7933c831c1027e6
i/InputDispatcher.h
i/InputManager.h
e5a5aa16d3e887cd9bea738cedd8e20b5f763500 29-Jul-2010 Jeff Brown <jeffbrown@google.com> Fixed StatusBar ANRs due to input event injection on UI thread.

Added a new asynchronous injection mode and made the existing
synchronization mechanism more robust.

Change-Id: I0464f70ff5cbd519dbb02686b2cb5d810fe7dbb2
i/InputDispatcher.h
i/InputManager.h
bc5aac5d45e5095c1e22bf483553c0dc27945401 29-Jul-2010 Mathias Agopian <mathias@google.com> am 9362ea76: am 9f2a91bc: Merge "fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once." into gingerbread

Merge commit '9362ea760f565389f5accce7e17476d05510ed59'

* commit '9362ea760f565389f5accce7e17476d05510ed59':
fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once.
edae28809ab37b5ae37e5959a4e7e2bf4cbf7ef8 29-Jul-2010 Mathias Agopian <mathias@google.com> Merge "fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once." into gingerbread
01d1669b89854a5b6275a6aa0cd302efbdd07f2f 29-Jul-2010 Christopher Tate <ctate@google.com> am 1de9f490: am bae6fe24: Merge "Support streaming of compressed assets > 1 megabyte" into gingerbread

Merge commit '1de9f490b5c3f293b3748be3d4ccf3f78cdf460b'

* commit '1de9f490b5c3f293b3748be3d4ccf3f78cdf460b':
Support streaming of compressed assets > 1 megabyte
46f28d328a734fd1cfa0d8f17f15d5ed88508ae8 29-Jul-2010 Christopher Tate <ctate@google.com> Merge "Support streaming of compressed assets > 1 megabyte" into gingerbread
a45a8008c62ec8583709c87e30c84e09214f46cf 26-Jul-2010 Christopher Tate <ctate@google.com> Support streaming of compressed assets > 1 megabyte

Compressed assets larger than one megabyte are now decompressed on demand
rather than being decompressed in their entirety and held in memory. Reading
the data in order is relatively efficient, as is seeking forward in the stream.
Seeking backwards is supported, but requires reprocessing the compressed data
from the beginning, so is very inefficient.

In addition, the size limit on compressed assets has been eliminated.

Change-Id: I6e68247957e6c53e7e8ba70d12764695f1723bad
tils/Asset.h
tils/StreamingZipInflater.h
2ef6cdec33e2c49b0e854efd304bfe0ba6076b9a 28-Jul-2010 Jeff Brown <jeffbrown@google.com> am 9795a25d: am 6d0fec2d: Refactor input reader to support new device types more easily.

Merge commit '9795a25da060f9a7df87da8ab43fb1086d4322a5'

* commit '9795a25da060f9a7df87da8ab43fb1086d4322a5':
Refactor input reader to support new device types more easily.
e57e8950804b08c80fb69df184b2f5af84ae103c 24-Jul-2010 Jeff Brown <jeffbrown@google.com> Refactor input reader to support new device types more easily.

Refactored the input reader so that each raw input protocol is handled
by a separate subclass of the new InputMapper type. This way, behaviors
pertaining to keyboard, trackballs, touchscreens, switches and other
devices are clearly distinguished for improved maintainability.

Added partial support for describing capabilities of input devices
(incomplete and untested for now, will be fleshed out in later commits).

Simplified EventHub interface somewhat since InputReader is taking over
more of the work.

Cleaned up some of the interactions between InputManager and
WindowManagerService related to reading input state.

Fixed swiping finger from screen edge into display area.

Added logging of device information to 'dumpsys window'.

Change-Id: I17faffc33e3aec3a0f33f0b37e81a70609378612
i/EventHub.h
i/Input.h
i/InputDevice.h
i/InputManager.h
i/InputReader.h
208cb0772429b9ac800010829ecc7b854bdc2d24 28-Jul-2010 Mathias Agopian <mathias@google.com> fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once.

this situation happened when the last buffer needed to be resized
(or allocated, the first time). the assumption was that the buffer
was in use by SF itself as the current buffer (obviously, this
assumption made no sense when the buffer had never been allocated, btw).

the system would wait until some other buffer became the "front" buffer.

we fix this problem by entirely removing the requirement that the
buffer being resized cannot be the front buffer. instead, we just
allocate a new buffer and replace the front buffer by the new one.

the downside is that this uses more memory (an extra buffer) for a
brief amount of time while the old buffer is being reallocated and
before it has actually been replaced.

Change-Id: I022e4621209474ceb1c671b23deb4188eaaa7285
rivate/surfaceflinger/SharedBufferStack.h
b8f4015c0aeb006d5028b5e3a6d5e522b184e008 27-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> am 245cb784: am 84c924a6: Merge "Replace several IPCThreadState::get() lookups with one." into gingerbread

Merge commit '245cb7846c82f7c0840e13f0b994d356846b1678'

* commit '245cb7846c82f7c0840e13f0b994d356846b1678':
Replace several IPCThreadState::get() lookups with one.
70081a1511955f53bd0ed7f2aec9a1bf09f0f379 27-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> Replace several IPCThreadState::get() lookups with one.

Also, make StrictMode's ThreadLocal final.

Change-Id: I08d400ed254fa67bb7a3dae1227f205a54c00df0
inder/Parcel.h
267e73c6753d70992b655d8690195b1fd27717bc 22-Jul-2010 Mathias Agopian <mathias@google.com> am 1f2ec407: am 23e8de26: propagate sensor event rate properly

Merge commit '1f2ec4070aa9c999d41dc50a892a896e894c5710'

* commit '1f2ec4070aa9c999d41dc50a892a896e894c5710':
propagate sensor event rate properly
a7a3160daad52a5664f2be2936c36083e9039b33 22-Jul-2010 Mathias Agopian <mathias@google.com> resolved conflicts for merge of bc54e63c to master

Change-Id: I4245b15b4cda6963d735442c0c6a04a0477ff5e1
e3c8234765050023b8a588607f819e8cc41a6363 22-Jul-2010 Mathias Agopian <mathias@google.com> propagate sensor event rate properly

Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
ui/SensorEventQueue.h
a7352c9f4a6e642c29782b19db5bc0bd98feddc8 15-Jul-2010 Mathias Agopian <mathias@google.com> new SensorService

remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
ui/ISensorServer.h
ui/Sensor.h
ui/SensorEventQueue.h
ui/SensorManager.h
3154334630cc802c930f835ad10e949317337ec6 17-Jul-2010 Jamie Gennis <jgennis@google.com> am 04b95313: am c8c79a65: Merge "Re-use existing Surface objects when reading them from parcels." into gingerbread

Merge commit '04b953132edb5482f0aa6d992f89e7016961528c'

* commit '04b953132edb5482f0aa6d992f89e7016961528c':
Re-use existing Surface objects when reading them from parcels.
e085084dc572ce8075b7bb0e493bbcbd8e9e1e79 17-Jul-2010 Jeff Brown <jeffbrown@google.com> am 7b8df313: am 00ba8844: Fix individual pointer id up/down reporting.

Merge commit '7b8df313f714d6e8d536e0f8bbe5496fe9a6c26d'

* commit '7b8df313f714d6e8d536e0f8bbe5496fe9a6c26d':
Fix individual pointer id up/down reporting.
874da6e4382f5bc2cab1fed3814a991c31a373cb 17-Jul-2010 Jamie Gennis <jgennis@google.com> Merge "Re-use existing Surface objects when reading them from parcels." into gingerbread
3cf1c9b8443f8db238b0214a97defc09b7e6fc98 17-Jul-2010 Jeff Brown <jeffbrown@google.com> Fix individual pointer id up/down reporting.

Fix a minor threading bug in InputManager dump.

Change-Id: Ic2eecf7df5a8dc9f40561fcb03ebe58a2c073778
i/InputReader.h
aca4e2287939b4ce3d9e9aced64c5c9641333503 16-Jul-2010 Jamie Gennis <jgennis@google.com> Re-use existing Surface objects when reading them from parcels.

This change adds a process-global cache of previously deserialized Surface
objects so that if a Surface object wrapping the same ISurface gets received
again the same Surface can be used. This is important because the 'tail'
pointer in the SharedBufferClient is stored only on the client side, and needs
to be the same for all the Surface objects wrapping an ISurface instance. This
solves the problem by making there only be one Surface object wrapping an
ISurface per process.

Change-Id: I4bf0b8787885c56277622fca053022d2bb638902
urfaceflinger/Surface.h
cfa6d9827827b19ec34239de23157eda5974ec83 16-Jul-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of f7adbe10 to master

Change-Id: I898a5e53b180adaee2337c0c0b9896c799d056e7
a2c4654c2fa9c46aac33bc2caea22d2f8859a5ef 16-Jul-2010 Dianne Hackborn <hackbod@google.com> am 9c37e5ad: am 75a91389: Merge "Implement native key pre-dispatching to IMEs." into gingerbread

Merge commit '9c37e5add9d7678a29b4e0d1e178fe78a13db961'

* commit '9c37e5add9d7678a29b4e0d1e178fe78a13db961':
Implement native key pre-dispatching to IMEs.
0a128e3cbef25e17aa7280928e682801041fa55f 16-Jul-2010 Jeff Brown <jeffbrown@google.com> Fix bug with phantom input windows.

Add dumpsys integration for the native input dispatcher.
Add some InputDevice API stubs.
Add an appendFormat helper method to String8 for printf style
string formatting mainly for debugging purposes.
Use generic ArrayList<WindowState> everywhere in WindowManagerService
to eliminate unnecessary casts all over.

Change-Id: I9d1e3bd90eb7222d10620200477f11b7bfd25e44
tils/String8.h
1a15c6eaff34b3363fd36bfd2b28ebfe03e9a283 16-Jul-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of aca672ba to master

Change-Id: I7ae11fca0acdbf513a4870226d0d3e3cafbe9a08
721c4162c3ad46d55ac09bf68f5922bb683d36f7 16-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> am cc52121c: am c4b204bd: Merge "More StrictMode work, keeping Binder & BlockGuard\'s thread-locals in-sync." into gingerbread

Merge commit 'cc52121c4f88e9feb8404937bcbfff6e73084666'

* commit 'cc52121c4f88e9feb8404937bcbfff6e73084666':
More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync.
ba57d1b9a512a56eaaed3b95b8144d0a25f2b01b 16-Jul-2010 Christopher Tate <ctate@google.com> am 078ccbdb: am 2c40582a: Merge "Add native C APIs for working with the Asset Manager" into gingerbread

Merge commit '078ccbdbb98c118aa87cab2fef61ff90dd128358'

* commit '078ccbdbb98c118aa87cab2fef61ff90dd128358':
Add native C APIs for working with the Asset Manager
0e8852766d2cc0ef82ed0846a4cae55ead01fdbf 16-Jul-2010 Dianne Hackborn <hackbod@google.com> Implement native key pre-dispatching to IMEs.

This significantly re-works the native key dispatching code to
allow events to be pre-dispatched to the current IME before
being processed by native code. It introduces one new public
API, which must be called after retrieving an event if the app
wishes for it to be pre-dispatched.

Currently the native code will only do pre-dispatching of
system keys, to avoid significant overhead for gaming input.
This should be improved to be smarted, filtering for only
keys that the IME is interested in. Unfortunately IMEs don't
currently provide this information. :p

Change-Id: Ic1c7aeec8b348164957f2cd88119eb5bd85c2a9f
i/Input.h
5c1ed84a2dec7efe914d0d1abb6834f8543fb9f1 15-Jul-2010 Jeff Brown <jeffbrown@google.com> Add support for new input sources.

Added several new coordinate values to MotionEvents to capture
touch major/minor area, tool major/minor area and orientation.

Renamed NDK input constants per convention.

Added InputDevice class in Java which will eventually provide
useful information about available input devices.

Added APIs for manufacturing new MotionEvent objects with multiple
pointers and all necessary coordinate data.

Fixed a bug in the input dispatcher where it could get stuck with
a pointer down forever.

Fixed a bug in the WindowManager where the input window list could
end up containing stale removed windows.

Fixed a bug in the WindowManager where the input channel was being
removed only after the final animation transition had taken place
which caused spurious WINDOW DIED log messages to be printed.

Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
i/EventHub.h
i/Input.h
i/InputDevice.h
i/InputDispatcher.h
i/InputTransport.h
be581cfa17ebc40f0c84c9130cd6ac984a8c3f8b 16-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> Merge "More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync." into gingerbread
9373680116a02a16e10649ec9a9926ee2d742bcd 13-Jul-2010 Christopher Tate <ctate@google.com> Add native C APIs for working with the Asset Manager

Change-Id: I493b142c4b35e5cc1a1e85283bb5dfb306a6d261
tils/AssetManager.h
a877cd85b5a026384542e3271fc310d6a8fe24c6 08-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync.

Change-Id: Ia67cabcc17a73a0f15907ffea683d06bc41b90e5
inder/Parcel.h
9382d111bbcbfded9f38c54958d21ad765d26235 15-Jul-2010 Mathias Agopian <mathias@google.com> am c74034b6: am 24651682: added BinderService<> template to help creating native binder services

Merge commit 'c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c'

* commit 'c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c':
added BinderService<> template to help creating native binder services
a1e6bc864fb821c1b470b7aad9b75c441f54eeb4 15-Jul-2010 Mathias Agopian <mathias@google.com> added BinderService<> template to help creating native binder services

Change-Id: Id980899d2647b56479f8a27c89eaa949f9209dfe
inder/BinderService.h
d10f9fbc397ff504752c2997c46e5ad29f67945e 15-Jul-2010 Mathias Agopian <mathias@google.com> am db386f2c: am c9a11088: Merge "first step at implementing the native sensor support" into gingerbread

Merge commit 'db386f2c263c6e9e4b825d4c9a320849f8f2c916'

* commit 'db386f2c263c6e9e4b825d4c9a320849f8f2c916':
first step at implementing the native sensor support
e1ea0811de760256cee3b1ffca227251e1cf52c5 15-Jul-2010 Mathias Agopian <mathias@google.com> Merge "first step at implementing the native sensor support" into gingerbread
589ce85ee4174829cfedce91b6b2509d2a4002eb 14-Jul-2010 Mathias Agopian <mathias@google.com> first step at implementing the native sensor support

in this commit:
- implemented the C stub
- implemented the binder interfaces involved
- implemented most of the C++ client side

missing:
- SensorManager cannot connect to the SensorServer yet
(because there is no SensorServer yet)

Change-Id: I75010cbeef31c98d6fa62fd5d388dcef87c2636b
ui/ISensorEventConnection.h
ui/ISensorServer.h
ui/Sensor.h
ui/SensorChannel.h
ui/SensorEventQueue.h
ui/SensorManager.h
66d3d8e4885a4d7bf4f7ba1b5bd2737361a53f3e 14-Jul-2010 Dianne Hackborn <hackbod@google.com> am f8d9379b: am d76b67c3: IME events are now dispatched to native applications.

Merge commit 'f8d9379bd834573feca085284970cf686993c330'

* commit 'f8d9379bd834573feca085284970cf686993c330':
IME events are now dispatched to native applications.
ce838a265d9da5b4bd3a0c833b01db6dbaa623f5 14-Jul-2010 Dianne Hackborn <hackbod@google.com> IME events are now dispatched to native applications.

And also:

- APIs to show and hide the IME, and control its interaction with the app.
- APIs to tell the app when its window resizes and needs to be redrawn.
- API to tell the app the content rectangle of its window (to layout
around the IME or status bar).

There is still a problem with IME interaction -- we need a way for the
app to deliver events to the IME before it handles them, so that for
example the back key will close the IME instead of finishing the app.

Change-Id: I37b75fc2ec533750ef36ca3aedd2f0cc0b5813cd
i/Input.h
i/InputTransport.h
94eed383c93be67e497d736fd81c360974d520b8 14-Jul-2010 Jeff Brown <jeffbrown@google.com> am 89ee578b: am fd035829: Add initial gamepad support.

Merge commit '89ee578b7053d27a50922f82feb94bf6054b330c'

* commit '89ee578b7053d27a50922f82feb94bf6054b330c':
Add initial gamepad support.
8575a87b0d61d21c286321afdf193f4fac53d681 01-Jul-2010 Jeff Brown <jeffbrown@google.com> Add initial gamepad support.

Change-Id: I0439648f6eb5405f200e4223c915eb3a418b32b9
i/InputDevice.h
i/InputReader.h
i/KeycodeLabels.h
0c2aaca5d6495dabadd6544bc694f881724e65ee 14-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> am 706623dd: am c0a7e690: Add Parcel::readExceptionCode() and Parcel::writeNoException()

Merge commit '706623ddb8314850c0551f0b66e24b5f0bd28620'

* commit '706623ddb8314850c0551f0b66e24b5f0bd28620':
Add Parcel::readExceptionCode() and Parcel::writeNoException()
837a0d0fb2c3fba8082d47d04cb6120af1eb9a54 14-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> Add Parcel::readExceptionCode() and Parcel::writeNoException()

Add native Parcel methods analogous to the Java versions.

Currently, these don't do much, but upcoming StrictMode work changes
the RPC calling conventions in some cases, so it's important that
everybody uses these consistently, rather than having a lot of code
trying to parse RPC responses out of Parcels themselves.

As a summary, the current convention that Java Binder services use is
to prepend the reply Parcel with an int32 signaling the exception
status:

0: no exception
-1: Security exception
-2: Bad Parcelable
-3: ...
-4: ...
-5: ...

... followed by Parceled String if the exception code is non-zero.

With an upcoming change, it'll be the case that a response Parcel can,
non-exceptionally return rich data in the header, and also return data
to the caller. The important thing to note in this new case is that
the first int32 in the reply parcel *will not be zero*, so anybody
manually checking for it with reply.readInt32() will get false
negative failures.

Short summary: If you're calling into a Java service and manually
checking the exception status with reply.readInt32(), change it to
reply.readExceptionCode().

Change-Id: I23f9a0e53a8cfbbd9759242cfde16723641afe04
inder/Parcel.h
47c320febd1f26f15f9c6b6e530e65bdc9b7b1b3 10-Jul-2010 Dianne Hackborn <hackbod@google.com> am b14f325a: am 289b9b62: Add ANativeWindow API for directly drawing to the surface bits.

Merge commit 'b14f325a0118ffce286155caaabaae149653462c'

* commit 'b14f325a0118ffce286155caaabaae149653462c':
Add ANativeWindow API for directly drawing to the surface bits.
9147d11a5f1d50496908bb1f49996e3ad23e19cc 09-Jul-2010 Dianne Hackborn <hackbod@google.com> Add ANativeWindow API for directly drawing to the surface bits.

Also other cleanup and fixes:

- We now properly set the default window format to 565.
- New APIs to set the window format and flags from native code.
- Tweaked glue for simpler handling of the "destroy" message.
- Um, other stuff.

Change-Id: Id7790a21a2fa9a19b91854d225324a7c1e7c6ade
i/Rect.h
895b3d0bdd9508472d98da2f6fe8a2daa059d40d 09-Jul-2010 Dianne Hackborn <hackbod@google.com> am 49159f07: am 74bf59b4: Merge "Add new glue code for writing native apps." into gingerbread

Merge commit '49159f0748c704e53a7bd754f26113d9ab844a97'

* commit '49159f0748c704e53a7bd754f26113d9ab844a97':
Add new glue code for writing native apps.
8d3ee58899d4ca3c9edc94b6e142aae6caad827c 09-Jul-2010 Kenny Root <kroot@google.com> am d481cdd4: am c9535de8: Merge "Add OBB file helper class" into gingerbread

Merge commit 'd481cdd4c0305f8afd857fe3ec3fbf189b744370'

* commit 'd481cdd4c0305f8afd857fe3ec3fbf189b744370':
Add OBB file helper class
9aac262cb32ea7f484118f04b3679d9ec4c534fc 09-Jul-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 167449e5 to master

Change-Id: Ib448e69a726eb45b5c9099d2574e40b8345eee67
3c5d125ed796dbecdd80fa2c03e04ff9b1d752e4 07-Jul-2010 Dianne Hackborn <hackbod@google.com> Add new glue code for writing native apps.

This factors out the boiler-plate code from the sample
app to a common glue code that can be used for everyone
writing this style of app: a dedicated app thread that
takes care of waiting for events and processing them.

As part of doing this, ALooper has a new facility to allow
registration of fds that cause ALooper_pollOnce() to return
the fd that has data, allowing the app to drive the loop
without callbacks. Hopefully this makes some people feel better. :)

Also do some other cleanup of the ALooper API, plus some
actual documentation.

Change-Id: Ic53bd56bdf627e3ba28a3c093faa06a92be522b8
tils/PollLoop.h
47ecb07ed495e295bf1243edc0bbd07166a25480 08-Jul-2010 Kenny Root <kroot@google.com> Merge "Add OBB file helper class" into gingerbread
9e1568cc2d12a713db524515f1002e34973ab4f4 08-Jul-2010 Chris Tate <ctate@android.com> Merge "More native input dispatch work." into gingerbread
b94a9a668f0e33dd93594abb08f448e6c915981f 01-Jun-2010 Kenny Root <kroot@google.com> Add OBB file helper class

ObbFile is a binary blob that will be used in packaging large files
with smaller APKs.

Change-Id: Ib1594346cfa2f49113de6565af77c24efbd89d63
tils/ObbFile.h
747f65e77a025306c09fd9fe88d08f32ee93d25d 07-Jul-2010 Dianne Hackborn <hackbod@google.com> am e24901d3: am 68267415: Add new native Looper API.

Merge commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550'

* commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550':
Add new native Looper API.
f16c26dec9651628b0c130e2504e2cc911393aea 03-Jul-2010 Jeff Brown <jeffbrown@google.com> More native input dispatch work.

Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.

Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
i/InputReader.h
efa10850665c8d60e562f3a488ae65e225614707 03-Jul-2010 Dianne Hackborn <hackbod@google.com> Add new native Looper API.

This allows us to avoid exposing the file descriptor of
the event queue; instead, you attach an event queue to
a looper. This will also should allow native apps to be
written without the need for a separate thread, by attaching
the event queue to the main thread's looper and scheduling
their own messages there.

Change-Id: I38489282635895ae2cbfacb88599c1b1cad9b239
i/InputTransport.h
tils/PollLoop.h
ed2b843c91ca79e0e58e27621bf7b537374a2e68 01-Jul-2010 Dianne Hackborn <hackbod@google.com> am 177c405a: am c6e1d880: Merge "Introduce official public NativeWindow type." into gingerbread

Merge commit '177c405a242e811b1010bd8382b5807ab8df31a8'

* commit '177c405a242e811b1010bd8382b5807ab8df31a8':
Introduce official public NativeWindow type.
e12e3d7692cf370b8cbdb848da5201bfa0410afb 01-Jul-2010 Dianne Hackborn <hackbod@google.com> Merge "Introduce official public NativeWindow type." into gingerbread
ac18906a2e86b0c8bd033f8811105368cff02624 01-Jul-2010 Jeff Brown <jeffbrown@google.com> am 0c2df984: am d8ae2885: Merge "Fix injection of specially intercepted keys like HOME." into gingerbread

Merge commit '0c2df98425c8fa4ce092eebea80ae197547f6a86'

* commit '0c2df98425c8fa4ce092eebea80ae197547f6a86':
Fix injection of specially intercepted keys like HOME.
b2007c4b89d1f4567c6c39e01925730029b1b385 01-Jul-2010 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 7f6c6e8f to master

Change-Id: Id9dddb78c51f16ff8c4b60339421c94fde506db2
4b5e91e4820f03dba7dcc36e4b148331bc964b4b 30-Jun-2010 Dianne Hackborn <hackbod@google.com> Introduce official public NativeWindow type.

Not yet hooked up to anything in the NDK, but requires renaming
the existing android_native_window_t type everywhere.

Change-Id: Iffee6ea39c93b8b34e20fb69e4d2c7c837e5ea2e
urfaceflinger/Surface.h
i/FramebufferNativeWindow.h
i/egl/android_natives.h
c393eb6cf5f5685d4dc1ddaa04136475536acccf 30-Jun-2010 Jeff Brown <jeffbrown@google.com> Fix injection of specially intercepted keys like HOME.

This change mainly unwinds a premature optimization in the
dispatch pipeline.
To test HOME injection, run 'adb shell input keyevent 3'.

Change-Id: I1c4b7377c205da7c898014b8b07fc6dc1d46e4dd
i/Input.h
i/InputReader.h
189ed23c1002054fdc06893e99d34a3617f24108 30-Jun-2010 Dianne Hackborn <hackbod@google.com> Implement default key handling for native code.

The native code now maintains a list of all keys that may use
default handling. If the app finishes one of these keys
without handling it, the key will be passed back off to Java
for default treatment.

Change-Id: I6a842a0d728eeafa4de7142fae573f8c11099e18
i/Input.h
i/InputTransport.h
751ba609790910f51a5c6d69e9dbc8ac2f95d112 30-Jun-2010 Chris Tate <ctate@android.com> am af4a2d1f: am ddcb543a: Merge "Fix native input dispatch in the emulator." into gingerbread

Merge commit 'af4a2d1f52c7d54408db341781399d2886de72c1'

* commit 'af4a2d1f52c7d54408db341781399d2886de72c1':
Fix native input dispatch in the emulator.
4036f7f2b44351a8d964b5cdfdf7b787795cf041 30-Jun-2010 Jeff Brown <jeffbrown@google.com> Fix native input dispatch in the emulator.

Set a default orientation of ROTATION_0.
Added some more careful checks based on whether we have valid
absolute axis information from the driver.
Reset key repeating during configuration changes since the keyboard
device may have been removed.

Change-Id: I685960828acffcb17595fc5683309e8064a76714
i/InputReader.h
3fc3eee09456cb1e2ce1eea2743e7e1d0b68ec50 29-Jun-2010 Dianne Hackborn <hackbod@google.com> am b5f05d00: am 0934fbb6: Merge "Update native activity & event APIs to follow correct conventions." into gingerbread

Merge commit 'b5f05d0018d72531e40c2afadfee90e9bc0c8893'

* commit 'b5f05d0018d72531e40c2afadfee90e9bc0c8893':
Update native activity & event APIs to follow correct conventions.
9c7f8186aea675628894b8f3844f83e791870859 29-Jun-2010 Dianne Hackborn <hackbod@google.com> Update native activity & event APIs to follow correct conventions.

Change-Id: Ie64fb3a9c68bc9c117fa5621b75d1f609e304e0e
i/Input.h
i/InputTransport.h
1f0c9ea984b94fd2a43e4ebc69b77d2a1c56d784 29-Jun-2010 Chris Tate <ctate@android.com> am 96725326: am 31e0ffe8: Merge "Native input event dispatching." into gingerbread

Merge commit '96725326149687168937cf62f75364cf9cc3e96b'

* commit '96725326149687168937cf62f75364cf9cc3e96b':
Native input event dispatching.
50de30a5230dd15326f8bcbb4beaf617bca265e2 22-Jun-2010 Jeff Brown <jeffbrown@google.com> Native input event dispatching.

Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.

Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
i/Input.h
i/InputDispatcher.h
i/InputManager.h
i/InputReader.h
af997c49621558dc697247040b47c3bc10ca7094 22-Jun-2010 Jens Gulin <jens.gulin@sonyericsson.com> Keep track of remaining fd when devices are removed

Sometimes the wrong fd was accessed when the device was addressed
by device id.

The earlier implementation assumed that two arrays were in sync
but one of them was compacted when devices were removed. Instead
of that dependency the device now keeps track of it's file descriptor.

Change-Id: I2b8a793d76b89ab464ae830482b309fe86031671
i/EventHub.h
f27f8ed2a30c0342379dead145b4b490c12f090e 25-Jun-2010 Mathias Agopian <mathias@google.com> am 687f8a2e: am 1cb3fdc9: Merge "Fix a bug in sp<> and wp<> which could cause memory corruptions" into gingerbread

Merge commit '687f8a2eb78c95bb9974951dbe38124f8543bacb'

* commit '687f8a2eb78c95bb9974951dbe38124f8543bacb':
Fix a bug in sp<> and wp<> which could cause memory corruptions
8c3c51bb33dff53168827f338d6c6c50c9825c08 25-Jun-2010 Mathias Agopian <mathias@google.com> Fix a bug in sp<> and wp<> which could cause memory corruptions

when assigning a smart pointer to another one, we need to make
sure to read all the data we need from the right-hand-side
reference (the assignee) before we decRef the assigned.

This bug would cause linked-list of smart-pointers to fail
miserably.

Change-Id: Ibb554c15fddf909f7737c632b7c80322e80ea93f
tils/RefBase.h
c1c3308f03522e56078276155a6bf7de9e751b22 23-Jun-2010 Dianne Hackborn <hackbod@google.com> am e3e2883f: am e24a60aa: Merge "First stab at attaching native event dispatching." into gingerbread

Merge commit 'e3e2883f2232007174ead562610eb01201890d9b'

* commit 'e3e2883f2232007174ead562610eb01201890d9b':
First stab at attaching native event dispatching.
f9e01ea4818328ecb2f573bcaee3116b49414035 23-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> am efcf68aa: am ef8f96a7: Merge "Start of work on passing around StrictMode policy over Binder calls." into gingerbread

Merge commit 'efcf68aa1fd7fcfd52cf3d2837ed8db8e797194b'

* commit 'efcf68aa1fd7fcfd52cf3d2837ed8db8e797194b':
Start of work on passing around StrictMode policy over Binder calls.
12c9ce8bc42b09e38fcc5699bab030d023bf140f 23-Jun-2010 Jeff Brown <jeffbrown@google.com> am b1efc3f6: am 7fbdc84e: More native input event dispatching.

Merge commit 'b1efc3f68277a8c38c21e2d2e8ce05287118ecfe'

* commit 'b1efc3f68277a8c38c21e2d2e8ce05287118ecfe':
More native input event dispatching.
4d96bb6ae38466a04acfbcce61cb202786239927 19-Jun-2010 Dianne Hackborn <hackbod@google.com> First stab at attaching native event dispatching.

Provides the basic infrastructure for a
NativeActivity's native code to get an object representing
its event stream that can be used to read input events.

Still work to do, probably some API changes, and reasonable
default key handling (so that for example back will still
work).

Change-Id: I6db891bc35dc9683181d7708eaed552b955a077e
i/Input.h
i/InputTransport.h
03bd2484c8d5dfb12759aa6ab4206966c4d01c71 22-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> Merge "Start of work on passing around StrictMode policy over Binder calls." into gingerbread
51d45a710eff6da1749ae66ce9cab218144c388b 18-Jun-2010 Jeff Brown <jeffbrown@google.com> More native input event dispatching.

Added ANRs handling.
Added event injection.
Fixed a NPE ActivityManagerServer writing ANRs to the drop box.
Fixed HOME key interception.
Fixed trackball reporting.
Fixed pointer rotation in landscape mode.

Change-Id: I50340f559f22899ab924e220a78119ffc79469b7
i/Input.h
i/InputDispatcher.h
i/InputManager.h
702ea9d42f52fc145090c0f0bfbe64993e4b8b33 18-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> Start of work on passing around StrictMode policy over Binder calls.

This is (intendend to be) a no-op change.

At this stage, Binder RPCs just have an additional uint32 passed around
in the header, right before the interface name. But nothing is actually
done with them yet. That value should right now always be 0.

This now boots and seems to work.

Change-Id: I135b7c84f07575e6b9717fef2424d301a450df7b
inder/IPCThreadState.h
inder/Parcel.h
e780fc9d96f5ce355796b31629591c63dd663a23 17-Jun-2010 Jeff Brown <jeffbrown@google.com> am 42bb545a: am 5c225b16: Even more native input dispatch work in progress.

Merge commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00'

* commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00':
Even more native input dispatch work in progress.
f4a4ec2063dfd28e04bbfe712f67acee4bdc8e37 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
i/Input.h
i/InputTransport.h
tils/PollLoop.h
tils/Vector.h
tils/VectorImpl.h
ac69c9607febc0beb48fc0832bb3e28f63c9d4de 16-Jun-2010 Jeff Brown <jeffbrown@google.com> am 2dfd2aa4: am 92266a78: Merge "More work in progress on native events." into gingerbread

Merge commit '2dfd2aa413a91965c1a247980598c795db9b4c38'

* commit '2dfd2aa413a91965c1a247980598c795db9b4c38':
More work in progress on native events.
54bc281639e5ff6955d7a86104f6f21624941aca 15-Jun-2010 Jeff Brown <jeffbrown@google.com> More work in progress on native events.

Refactored the code to eliminate potential deadlocks due to re-entrant
calls from the policy into the dispatcher. Also added some plumbing
that will be used to notify the framework about ANRs.

Change-Id: Iba7a10de0cb3c56cd7520d6ce716db52fdcc94ff
i/Input.h
i/InputDispatchPolicy.h
i/InputDispatcher.h
i/InputManager.h
i/InputReader.h
4215f507402e5c8375ca5103d2b0a6c3986f7df2 14-Jun-2010 Jeff Brown <jeffbrown@google.com> am 34b418cd: am 5e95930b: am 43a9527c: Fix include paths.

Merge commit '34b418cddbd2f05d5c0a98c550c65e457015134e'

* commit '34b418cddbd2f05d5c0a98c550c65e457015134e':
Fix include paths.
66d9df50dac51940156f121768aaeb9a25ef2179 14-Jun-2010 Jeff Brown <jeffbrown@google.com> Fix include paths.

Change-Id: Ifda45688f9f02710a74d5d7a7d902bacf1441e2e
tils/PollLoop.h
04c1a8cdec3d0b27ce7029d79c96c3b4be14ca4e 14-Jun-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 9e660c82 to master

Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
e839a589bf582568cf220c1040ed93b948e6e362 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
i/EventHub.h
i/Input.h
i/InputDispatchPolicy.h
i/InputDispatcher.h
i/InputManager.h
i/InputReader.h
i/InputTransport.h
tils/BitSet.h
tils/Buffer.h
tils/PollLoop.h
tils/Pool.h
tils/StopWatch.h
tils/Vector.h
tils/VectorImpl.h
67c4219aa36ebf164782814b055f3d24652a7377 09-Jun-2010 Mathias Agopian <mathias@google.com> am 34e5d967: am 55f8209d: Merge "allow re-targetting of surfaces" into kraken
579b3f88d03d06b897b778bd11818f5104677d1d 09-Jun-2010 Mathias Agopian <mathias@google.com> allow re-targetting of surfaces

Surfaces can now be parcelized and sent to remote
processes. When a surface crosses a process
boundary, it looses its connection with the
current process and gets attached to the new one.

Change-Id: I39c7b055bcd3ea1162ef2718d3d4b866bf7c81c0
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/Surface.h
fcd61524e87ac53225529ee59060c50f750c8bd4 05-Jun-2010 Mathias Agopian <mathias@google.com> am f5f7d389: am fae5cb2b: optimize Surface.readFromParcel()
e78d81edddc8b1996a0587d17ee9ef7a06f45c08 05-Jun-2010 Mathias Agopian <mathias@google.com> am fd89b1c8: am 7623da43: split surface management from surface\'s buffers management
a0c30e924193da57723fd53b710ce6be24fb26f5 05-Jun-2010 Mathias Agopian <mathias@google.com> optimize Surface.readFromParcel()

this is called for each relayout() and used to create a full Surface (cpp)
which in turn did some heavy work (including an IPC with surfaceflinger),
most of the time to destroy it immediatelly when the returned surface
(the one in the parcel) was the same.

we now more intelligentely read from the parcel and construct the new
object only if needed.

Change-Id: Idfd40d9ac96ffc6d4ae5fd99bcc0773e131e2267
urfaceflinger/Surface.h
b7e930db175c192464cebdeb49eb56cf6dd60114 02-Jun-2010 Mathias Agopian <mathias@google.com> split surface management from surface's buffers management

Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/ISurfaceComposer.h
urfaceflinger/ISurfaceComposerClient.h
urfaceflinger/Surface.h
urfaceflinger/SurfaceComposerClient.h
i/GraphicBuffer.h
e733497af5e0bc27d68aa28f8a16cc3978f70c22 18-May-2010 Vasu Nori <vnori@google.com> add API to Cursor to get column value type

Change-Id: I3ef1bcdb2eb1c45f68e829ccb6e3ecde28076591
inder/CursorWindow.h
d13f23fca6bb3ecce2a92811726b39accaad94f9 02-Jun-2010 Mathias Agopian <mathias@google.com> am 5220af87: am 770492cb: more clean-up in preparation of bigger changes
daa717000f0af5562efd36f623fa94b49c38ac02 02-Jun-2010 Mathias Agopian <mathias@google.com> am 4f0a9114: am cdfd5fe2: Fix a typo in Singleton<>
7e27f05739c8a2655cf0f7faea35614ce0a50278 28-May-2010 Mathias Agopian <mathias@google.com> more clean-up in preparation of bigger changes

the most important change here is the renaming of
ISurfaceFlingerClient to ISurfaceComposerClient

Change-Id: I94e18b0417f50e06f21377446639c61f65f959b3
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/ISurface.h
urfaceflinger/ISurfaceComposer.h
urfaceflinger/ISurfaceComposerClient.h
urfaceflinger/ISurfaceFlingerClient.h
urfaceflinger/Surface.h
urfaceflinger/SurfaceComposerClient.h
b8510b98b5eb92333157db1359df6f2bbbfb2b39 29-May-2010 Mathias Agopian <mathias@google.com> Fix a typo in Singleton<>

it could cause the sLock field to be emitted several times
in different compilation unit. it also prevented to
have 2 Singleton<> in the same file.
tils/Singleton.h
3d11c77bae0ca6f0f07ce4dcf52019d430c1bca4 28-May-2010 Mike Lockwood <lockwood@android.com> Merge "Move CursorWindow class from core/jni to libbinder"
244a7655aea626c6f16f68d39ba3c92a164adc16 27-May-2010 Mike Lockwood <lockwood@android.com> Move CursorWindow class from core/jni to libbinder

To allow use of the native CursorWindow class outside of the core framework jni

Change-Id: I72e8dcb91a2c691130c33cdfd9a25d343da1c592
Signed-off-by: Mike Lockwood <lockwood@android.com>
inder/CursorWindow.h
d4784a3b90f849e8732968d45886fb0c8f0d8cf3 28-May-2010 Mathias Agopian <mathias@google.com> more clean-up of Surfaceflinger's client management

SurfaceComposerClient now only exist on the WindowManager side,
the client side uses the new SurfaceClient class, which only
exposes what a client needs.

also instead of keeping mappings from IBinder to SurfaceComposerClients
we have a SurfaceClient per Surface (referring to the same IBinder), this
is made possible by the fact that SurfaceClient is very light.

Change-Id: I6a1f7015424f07871632a25ed6a502c55abfcfa6
urfaceflinger/Surface.h
urfaceflinger/SurfaceComposerClient.h
631f358d348ea5e7813ca01f86fc9f2a6536add6 26-May-2010 Mathias Agopian <mathias@google.com> fix [2712278] The preview buffer left some black borders in left and bottom edges

we were incorrectly flagging push_buffer surfaces as invalid

Change-Id: I4dfd4ffbbe8a71f7e23e835db8d71966416c29bb
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/Surface.h
urfaceflinger/SurfaceComposerClient.h
a138f89c5e78b7e8994823e97d6e860869762837 22-May-2010 Mathias Agopian <mathias@google.com> added the notion of fixed-size buffers

the new native_window_set_buffers_geometry allows
to specify a size and format for all buffers to be
dequeued. the buffer will be scalled to the window's
size.

Change-Id: I2c378b85c88d29cdd827a5f319d5c704d79ba381
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/ISurface.h
urfaceflinger/Surface.h
i/egl/android_natives.h
a0b3f1d2eb796eb90a7576c13890ab8df8516d9d 21-May-2010 Mathias Agopian <mathias@google.com> fix a bug when reallocating a window's buffers is needed

we need to mark the buffers that need to be reallocated,
NOT the buffer's indices.

Change-Id: I809e2e1b03b56c4d2ab983c25523dae99aa1da74
rivate/surfaceflinger/SharedBufferStack.h
f10d7fde03218c17251416a34d7b726a43ec528a 21-May-2010 Mathias Agopian <mathias@google.com> added native_window_set_buffer_count()

this method can be used to change the number of buffers
associated to a native window. the default is two.

Change-Id: I608b959e6b29d77f95edb23c31dc9b099a758f2f
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/Surface.h
i/egl/android_natives.h
bb641244d7d73312dc65b8e338df18b22e335107 19-May-2010 Mathias Agopian <mathias@google.com> fix the threading issue for setBuffercount()

this change introduces R/W locks in the right places.
on the server-side, it guarantees that setBufferCount()
is synchronized with "retire" and "resize".
on the client-side, it guarantees that setBufferCount()
is synchronized with "dequeue", "lockbuffer" and "queue"
rivate/surfaceflinger/SharedBufferStack.h
dcf01e6644d0e9eca5aa08ee1b16a0d29d039e5e 20-May-2010 Mathias Agopian <mathias@google.com> added RWLock C++ wrapper

Change-Id: Ia736bf7f6e2c49915a9ab5669551cf89dafa7961
tils/threads.h
d6297f7d096cee1ce180ac7bc26604a179e742c5 18-May-2010 Mathias Agopian <mathias@google.com> fix some bugs in SharedBufferStack::resize

added buffers should now be labeled properly.

Change-Id: I28aa753fbe89ab89134e7753575319478934c7fa
rivate/surfaceflinger/SharedBufferStack.h
a1ac870fd1414b8c54a1dd0367f43c70f677c80e 13-May-2010 Mathias Agopian <mathias@google.com> Merge "SharedBufferStack now can grow up to 16 buffers." into kraken
b5b7f260da2c1a2a82e0311e2015d49a82f43667 08-May-2010 Mathias Agopian <mathias@google.com> SharedBufferStack now can grow up to 16 buffers.

there is a new resize() api, which currently only allows growing.

Change-Id: Ia37b81b73be466d2491ffed7f3a23cd8e113c6fe
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/ISurface.h
urfaceflinger/Surface.h
9b7640933ebcaccca1d1667048bdb9abd0813d22 12-May-2010 Kenny Root <kroot@google.com> Merge "ZipUtilsRO rewrite based on Dalvik Zip rewrite" into kraken
d4066a4ac50cda61bedd97b5f6d29cf176e04127 23-Apr-2010 Kenny Root <kroot@google.com> ZipUtilsRO rewrite based on Dalvik Zip rewrite

Change the way zip archives are handled. This is necessary to deal with
very large (~1GB) APK files, for which our current approach of mapping
the entire file falls over.

We now do the classic scavenger hunt for the End Of Central Directory
magic on a buffer of data read from the file, instead of a memory-mapped
section. We use what we find to create a map that covers the Central
Directory only.

If the caller is interested in unpacking the file contents, we have to
do an additional file read to discover the size of the Local File Header
section so we can skip past it.

This is based on Change I745fb15abb in the dalvik tree. Both
implementations share a common ancestry, but the cost of unifying them
outweighs the benefits of wrapping C calls.

Change-Id: Iddacb50fe913917c2845708a530872d65fdbe620
tils/ZipFileCRO.h
tils/ZipFileRO.h
1853b7d7904a78bff1728a9299b64275c1800885 11-May-2010 Jamie Gennis <jgennis@google.com> Merge "Add incStrong and decStrong methods to android_native_{window,buffer}_t." into kraken
5e67f87430d581155c700bb33ac0b43ed5de20b7 11-May-2010 Jamie Gennis <jgennis@google.com> Add incStrong and decStrong methods to android_native_{window,buffer}_t.

This change adds the methods necessary to use sp<> to handle refcounting
android_native_window_t and android_native_buffer_t. The new methods forward
the refcounting operations to the corresponding android_native_base_t
functions.

Change-Id: I7de8e262728e439bc1efdf69374a2a9f6f432ced
i/android_native_buffer.h
i/egl/android_natives.h
7dd2bb84128d9026f045999b94644fcda772de52 07-May-2010 Dan Egnor <egnor@google.com> am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo

Merge commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f' into kraken

* commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f':
Make static versions of libutils and libbinder.
e3c233d1a994459969efc7b6fd0309a82ec220db 07-May-2010 Dan Egnor <egnor@google.com> am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo

Merge commit '8a8658a5de261c2da72d431940877bd054bc9837' into froyo-plus-aosp

* commit '8a8658a5de261c2da72d431940877bd054bc9837':
Make static versions of libutils and libbinder.
386a332b4f70718cccb08d5511d66e9f4f5bd409 06-May-2010 Dan Egnor <egnor@google.com> Make static versions of libutils and libbinder.

Fix some small static-initialization-order issues (and a static-
initializers-missing issue) that result from doing so. The static
libraries don't actually get used for anything real at the moment --
they're used for perf tests of bug 2660235.

Bug: 2660235
Change-Id: Iee2f38f79cc93b395e8d0a5a144ed92461f5ada0
inder/Binder.h
ad3f4a4561385af969e3e7ff280b59d842c6eb0b 06-May-2010 The Android Open Source Project <initial-contribution@android.com> am f7896449: merge from open-source master

Merge commit 'f78964490d8098387d51444c87bf520ad3f674e2' into kraken

* commit 'f78964490d8098387d51444c87bf520ad3f674e2':
Add new keycodes for the convenience of Japanese IMEs
Call register_localized_collators() with the current locale.
Fixed deserialization problem in DatePicker.
Fix for bug 2467152 files with spaces fail to open.
Set alpha value for newly created dim surface.
telephony: Fix CID when CID is unknown
30f71ce5971b5a129e134b7a1fb8c2e53a50f23f 06-May-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Ia9e1f4e049f5870386ea29ddb6e3ef028ea918da
ef1c5c314b9baa2360c62a1ebc84c9a2996613ba 02-Oct-2009 mogimo <mogimogio@gmail.com> Add new keycodes for the convenience of Japanese IMEs

Change-Id: Ibd308cef11261147856258595f6ca0137e03e05c
i/KeycodeLabels.h
30c4c182ec4b35964460dcd74c541bfd9e6afbdc 30-Apr-2010 Mathias Agopian <mathias@google.com> Merge "Add support for enqueuing buffers in arbitrary order" into kraken
4fcad80654c2782084ab21678102bd4d6ddbe8dd 29-Apr-2010 Mathias Agopian <mathias@google.com> Merge "cleanup. waitForCondition() now uses polymorphsim instead of templtes" into kraken
a228cc5efaa485d66855d475ded09a543a6fd076 29-Apr-2010 Mathias Agopian <mathias@google.com> Merge "fix a race condition in undoDequeue(), where 'tail' could be computed incorrectly." into kraken
c93a781c2492def222093e46ddc252b09e333410 24-Apr-2010 Dianne Hackborn <hackbod@google.com> New xlarge screen size.

Not complete, only for experimentation at this point.

This includes a reworking of how screen size configurations are matched,
so that if you are on a larger screen we can select configurations for
smaller screens if there aren't any exactly matching the current screen.

The screen size at which we switch to xlarge has been arbitrarily
chosen; the compatibility behavior has not yet been defined.

Change-Id: I1a33b3818eeb51a68fb72397568c39ab040a07f5
tils/ResourceTypes.h
c0a9164e9ea5d1d0ee6fbf9ea2ff51318bd78e23 28-Apr-2010 Mathias Agopian <mathias@google.com> Add support for enqueuing buffers in arbitrary order

Also added a very simple SharedBufferStack unit test.

Change-Id: I253dbbe98a53c966b78d22d4d6dd59f8aefc8c40
rivate/surfaceflinger/SharedBufferStack.h
b296533607232357597b255679db29470ab5925d 28-Apr-2010 Mathias Agopian <mathias@google.com> cleanup. waitForCondition() now uses polymorphsim instead of templtes

the reason for the above change is that waitForCondition() had become
large over time, mainly to handle error cases, using inlines to
evaluate the condition doesn't buys us much anymore while it increases
code size.

Change-Id: I2595d850832628954b900ab8bb1796c863447bc7
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/Surface.h
0a8cd0689a76dbca7405004caac4dde4c0250aea 28-Apr-2010 Mathias Agopian <mathias@google.com> fix a race condition in undoDequeue(), where 'tail' could be computed incorrectly.

in the undoDequeue() case, 'tail' was recalculated from 'available' and 'head'
however there was a race between this and retireAndLock(), which could cause
'tail' to be recalculated wrongly.

the interesting thing though is that retireAndLock() shouldn't have any impact
on the value of 'tail', which is client-side only attribute.
we fix the race by saving the value of 'tail' before dequeue() and restore it
in the case of undoDequeue(), since we know it doesn't depend on retireAndLock().

Change-Id: I4bcc4d16b6bc4dd93717ee739c603040b18295a0
rivate/surfaceflinger/SharedBufferStack.h
245e4d78c5fb304fe153c36303ec69bf8a907f65 22-Apr-2010 Mathias Agopian <mathias@google.com> better fix for [2420565] Surface.lockCanvas() updates the dirty region too often

Change-Id: I83438b40effd21538f1c74396dc665254b9d5ab6
urfaceflinger/Surface.h
a327dcfd79161c7fe48372f35d02918fca04af50 21-Apr-2010 The Android Open Source Project <initial-contribution@android.com> am f021d12f: merge from open-source master

Merge commit 'f021d12f6f7116e9275cd3553a349ce5cb8aab14' into kraken

* commit 'f021d12f6f7116e9275cd3553a349ce5cb8aab14':
Allow META* macros outside of the framework
Fix printing order of phone objects creation
fc821e5d26c6273e667b15d52e3fb691e2e53f87 21-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I08f1feae65b1dfc3f740d78654c267f2e3ae5e85
a3a884d9e298557b1540b33cab69271f521653c2 03-Nov-2009 Michael Richardson <mcr@credil.org> Allow META* macros outside of the framework

The META* macros are useful outside of the framework
for other systems implementing Binder interfaces, but
they depend upon the android namespace. This includes
the appropriate namespace operations, which should be
sane even in that android namespace.

Change-Id: If600156c65191f51f487d0ee301d9f9f532b263d
inder/IInterface.h
cc08e688f5b82b4ebd076ad138b2749e8c86ad5e 16-Apr-2010 Mathias Agopian <mathias@google.com> added setCrop() to android_native_window_t

hooked up the new method up to Surface.cpp
the actual crop is not implemented in SF yet

Change-Id: Ic6e313c98fd880f127a051a0ccc71808bd689751
rivate/surfaceflinger/SharedBufferStack.h
urfaceflinger/ISurfaceFlingerClient.h
urfaceflinger/Surface.h
i/egl/android_natives.h
1100c8b9012f511d45a82b25c940c702dadbc39e 06-Apr-2010 Mathias Agopian <pixelflinger@google.com> add support for up to 16 buffers per surface

also increase the dirtyregion size from 1 to 6 rectangles.
Overall we now need 27KiB process instead of 4KiB

Change-Id: Iebda5565015158f49d9ca8dbcf55e6ad04855be3
rivate/surfaceflinger/SharedBufferStack.h
0ec1f2fc6e8776266c521ed17b3299aa8720b68e 20-Apr-2010 Mathias Agopian <mathias@google.com> am 26f61635: am 0a4ab1b9: Merge "fix [2599939] "cannot play video" after open/close a video player a dozen of times" into froyo

Merge commit '26f6163557980062dbb203388b3d0794ee0d06f7' into kraken

* commit '26f6163557980062dbb203388b3d0794ee0d06f7':
fix [2599939] "cannot play video" after open/close a video player a dozen of times
65d884063727629ac9b859e3ff155e623e9d4ebd 20-Apr-2010 Mathias Agopian <mathias@google.com> am 0a4ab1b9: Merge "fix [2599939] "cannot play video" after open/close a video player a dozen of times" into froyo

Merge commit '0a4ab1b9b4c7b891c1ecb67eed99e9c9b30c93aa' into froyo-plus-aosp

* commit '0a4ab1b9b4c7b891c1ecb67eed99e9c9b30c93aa':
fix [2599939] "cannot play video" after open/close a video player a dozen of times
3c772b706dd8e53fe17b284bb2e60c146867f787 20-Apr-2010 Mathias Agopian <mathias@google.com> fix [2599939] "cannot play video" after open/close a video player a dozen of times

get rid off the MAP_ONCE flag is MemoryHeapBase (as well as it's functionality),
this feature should not be used anymore.

the software renderer was incorrectly using the default ctor which set MAP_ONCE,
causing the leak. the software renderer itself is incorrectly used while coming
back from sleep.

Change-Id: I123621f8d140550b864f352bbcd8a5729db12b57
inder/IMemory.h
inder/MemoryHeapBase.h
inder/MemoryHeapPmem.h
5629eb167638a9ebfa5059177d227c7ac67db46f 15-Apr-2010 Mathias Agopian <mathias@google.com> when a zero dimension buffer is allocated, turn the allocation into
a 1x1 buffer instead of Nx1 (or 1xN)

Change-Id: I27eeb15e83e13002dd9405f4e52b54f7dffc0fe7
i/GraphicBufferAllocator.h
e4e8cf1f19002be418aad1b89fa6bb8aeabf9f65 13-Apr-2010 Mathias Agopian <mathias@google.com> don't hardcode "mSurface" throughout our source code

this is used in a few places to get access to the android.view.Surface
native surface. use a macro instead. Also rename the field to mNativeSurface.

Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
urfaceflinger/Surface.h
529973acc25ba41e7d71ed58448ecee793bcc657 08-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I975030d9572463bc69245bcffa25c47d7acb2b51
e5f56fb1b4fd681e0d9d9b3524c945c8dfe00daa 27-May-2009 Chih-Wei Huang <cwhuang@linux.org.tw> Add keycodes PageUp and PageDown

This is useful for applications like web browser.

Change-Id: Ie9262d5b75de87ecd0971407a7c3ce9aa6e4998e
i/KeycodeLabels.h
c8620b60d67390d2bd0fa0ce53cc63fc18c50244 25-Mar-2010 Mathias Agopian <mathias@google.com> fix [2545826] calling into gralloc with external lock held

Change-Id: I2d0e017382404c684c768a0dd0423d574213f10a
i/GraphicBufferAllocator.h
26d244281a62c909acfd7527da256a9413241122 20-Mar-2010 Mathias Agopian <mathias@google.com> libutils Condition are now PRIVATE by default

Condition must be initialized with SHARED for the old behavior, where
they can be used accross processes.

Updated the two places android that require SHARED conditions.

PRIVATE conditions (and mutexes) use more efficient syscalls.

Change-Id: I9a281a4b88206e92ac559c66554e886b9c62db3a
tils/threads.h
ae4d8ac982c9af4167981c4e1b00d66357e8b7e2 18-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Update TTS plugin interface to receive engine configuration data
coming from the plugin helper code (handling config and preferences).

Change-Id: Ibc1d229463f11f8977552d74d1fd2aa6a6cab88e
ts/TtsEngine.h
55fa25161a7626ae6a15bc2cc46e22771455ed80 12-Mar-2010 Mathias Agopian <mathias@google.com> implement connect/disconnect in our native_window_t implementations

the framebuffer implementation doesn't do anything special with this
but the surfaceflinger implementation makes sure the surface is not used
by two APIs simultaneously.

Change-Id: Id4ca8ef7093d68846abc2ac814327cc40a64b66b
urfaceflinger/Surface.h
e156e6478f8393dc519a903d48ef09b3eabf32ad 12-Mar-2010 Mathias Agopian <mathias@google.com> Add a new connect/disconnect API to android_native_window_t

it's used to keep track of which API owns the surface.

Change-Id: I1021c5905c020efc3c428e561b38189377168b22
i/egl/android_natives.h
82fecb01df67f5e3321618df29079b9ce56a30e4 10-Mar-2010 Dianne Hackborn <hackbod@google.com> Add ability for some manifest attributes to reference resources.

This loosens our restriction on many manifest attributes requiring
literal string values, to allow various ones to use values from
resources. This is only allowed if the resource value does not change
from configuration changes, and the restriction is still in place
for attributes that are core to security (requesting permissions) or
market operation (used libraries and features etc).

Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
tils/ResourceTypes.h
2856c5b19a9e62a32a835c84a87a24b324c799fe 05-Mar-2010 Dianne Hackborn <hackbod@google.com> Refactor car mode.

Extract all UI behavior from dock observer and ACTION_DOCK_EVENT.

Also introduce a desk type to go along with the car type all through
the resource system, since we now need to have corresponding high-level
broadcasts for desk dock mode. As part of that I also reworked some
of the logic for switching modes to all funnel through a single
update() call that looks all of the current state to decide what to
do next, and fixed various locking issues.

In addition I found there were bugs in the configuration change
handling causing us to only switch into the car mode config and
then never get out of it. Unfortunately now that we are actually
changing the configuration for each mode change, the transitions
between them are really crummy as we restart all kinds of
activities. :(
tils/ResourceTypes.h
8eca036d24f2e7865ab5ccb057b043e2c32b75bf 02-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2448075: aapt doesn't fix up activity-alias android:targetActivity links

And related:

- The aapt tool now sets a resource configurations sdk level to match any configs
that have been set (for example if you specify density your sdk level will be
at least 4).
- New option to modify the targetPackage attribute of instrumentation.
- Clean up of aapt options help.
- Fix of UI type values to leave 0 for "unspecified".
- Make the UI mode config APIs public.
tils/ResourceTypes.h
285dbde2e0cd0057be070ded3be8f5f453147edc 02-Mar-2010 Mathias Agopian <mathias@google.com> Added a name to Surface created by SurfaceFlinger

Updated the window manager to use this new facility.
Surfaces name are now printed by "dumpsys".
urfaceflinger/ISurfaceFlingerClient.h
urfaceflinger/SurfaceComposerClient.h
9e333ab42c5ca09632f56cd5d8e5349e06a632b7 23-Feb-2010 Kenny Root <kroot@google.com> Use UTF-8 strings to avoid duplicate caching, part 1

StringBlock instances containing UTF-8 strings use a cache to convert
into UTF-16, but using that cache and then using a JNI call to NewString
causes the UTF-8 string as well as two copies of the UTF-16 string to
be held in memory. Getting the UTF-8 string directly from the StringPool
eliminates one copy of the UTF-16 string being held in memory.

This is part 1. Part 2 will include ResXMLParser optimizations.

Change-Id: Ibd4509a485db746d59cd4b9501f544877139276c
tils/ResourceTypes.h
98e71ddaede9a0bfb681fd237bec1f66c6c53193 12-Feb-2010 Mathias Agopian <mathias@google.com> remove a dependency of GraphicBuffer (libui) on Parcel (libbinder).

Add a Flattenable interface to libutils which can be used to flatten
an object into bytestream + filedescriptor stream.
Parcel is modified to handle Flattenable. And GraphicBuffer implements
Flattenable.

Except for the overlay classes libui is now independent of libbinder.
inder/Parcel.h
i/GraphicBuffer.h
tils/Flattenable.h
b6121422ef641dc7317d1c3bf1d38b7d73922250 18-Feb-2010 Mathias Agopian <mathias@google.com> Remove a dependency of Region (libui) on Parcel (libbinder).
i/Region.h
3db21640519541141137166ce55627cf76e1974b 17-Feb-2010 Mathias Agopian <mathias@google.com> fix a bug I introduced recently where YUV formats would crash the system
i/PixelFormat.h
54ed4f6282bdea251455f39b978626026affdbef 17-Feb-2010 Mathias Agopian <mathias@google.com> get rid off the YUV formats at the libui layer
i/PixelFormat.h
0d88e7a8d7c436e8375a749aac77d34eb95356c8 12-Feb-2010 Kenny Root <kroot@google.com> Totally remove Unicode.cpp and rely on ICU

Unicode.cpp used a packed data table for character data that essentially
duplicated ICU's functionality.

Change-Id: Ia68fe4ac94e89dc68d9a3f45f33f6e648a5500b7
tils/AndroidUnicode.h
196e3207345baa4ba5af93646f2ca1b67a438aeb 12-Feb-2010 Kenny Root <kroot@google.com> Excise code from Unicode.cpp that was dead

Remove some utility functions for discovering character data
that ICU probably took over a while ago.

Change-Id: I97abe4de2f51eb2bf48679941258bc501184c3dc
tils/AndroidUnicode.h
9cce325fae8adcf7560a28eef394489f09bad74d 10-Feb-2010 Mathias Agopian <mathias@google.com> split libsurfaceflinger_client and libcamera_client out of libui
rivate/surfaceflinger/LayerState.h
rivate/surfaceflinger/SharedBufferStack.h
rivate/ui/LayerState.h
rivate/ui/SharedBufferStack.h
urfaceflinger/ISurface.h
urfaceflinger/ISurfaceComposer.h
urfaceflinger/ISurfaceFlingerClient.h
urfaceflinger/Surface.h
urfaceflinger/SurfaceComposerClient.h
i/Camera.h
i/CameraHardwareInterface.h
i/CameraParameters.h
i/ICamera.h
i/ICameraClient.h
i/ICameraService.h
i/ISurface.h
i/ISurfaceComposer.h
i/ISurfaceFlingerClient.h
i/Surface.h
i/SurfaceComposerClient.h
70fa84f6ab15936b265986c507cf00fd2cbf9db1 09-Feb-2010 Tobias Haamel <haamel@google.com> Introduce special UI modes for night and car usage.

The device mode is now called ui mode. Furthermore is the order of
precedence for the resources now in such a way that the ui mode needs
to be specified after the orientation and before the density.

The ui mode can be set, like it is done for the locale, as follows:

IActivityManager am = ActivityManagerNative.getDefault();
Configuration config = am.getConfiguration();
config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY;
am.updateConfiguration(config);

To allow users to disable the car mode and set the night mode the IUiModeManager
interface is used.

The automatic night mode switching will be added in a separate change.
tils/ResourceTypes.h
a05c8227046081b2648b8150c1a716040eb08121 09-Feb-2010 Wu-cheng Li <wuchengli@google.com> Add exposure compensation parameter.

bug:2375993
i/CameraParameters.h
04a3f57d19b471c21f3c83c50793a94908cafdc7 03-Feb-2010 Mathias Agopian <mathias@google.com> fix [2133133] Software OpenGL ES Lighting is buggy (GL Gears washed out bug)

A typo caused GL_AMBIENT_AND_DIFFUSE to only set the the ambient color.

Fix another typo which caused the viewer position to be wrong for
specular highlights.

Switch back to eye-space lighting, since there are still some issues
with some demos (San Angeles in particular).
rivate/opengles/gl_context.h
18b915a1026dfe9d273ee3fd2139b7feed22008c 02-Feb-2010 Mathias Agopian <mathias@google.com> implement [2396050] Add ETC1 texture support to AGL
rivate/opengles/gl_context.h
391f3f8b5e8f97e002cbbc6a7535cfd73a8d16b3 31-Jan-2010 Wu-cheng Li <wuchengli@google.com> Add float support for set and get in CameraParameters.

bug:2375989
bug:2375987
i/CameraParameters.h
077c40fee35f483df961c6a0746ee78b9d1c5a8f 27-Jan-2010 Wu-cheng Li <wuchengli@google.com> Add focal length and view angle API.

bug:2375989,2375987
i/CameraParameters.h
0dd0d2944a0a7b985db162dec8b49b77d689d171 26-Jan-2010 Mathias Agopian <mathias@google.com> Simplify the MemoryDealer implementation

At some point the implementation became complicated because of
SurfaceFlinger's special needs, since we are now relying on gralloc
we can go back to much simpler MemoryDealer.

Removed HeapInterface and AllocatorInterface, since those don't need
to be paramterized anymore. Merged SimpleMemory and Allocation.
Made SimplisticAllocator non virtual.

Removed MemoryDealer flags (READ_ONLY, PAGE_ALIGNED)

Removed a lot of unneeded code.
inder/MemoryDealer.h
inder/MemoryHeapPmem.h
f091e833d339d344fbc4815bcc87ce97d8535cd8 23-Jan-2010 Chih-Chung Chang <chihchung@google.com> Add support for setting camera display orientation.
i/Camera.h
i/CameraParameters.h
88eeff5270991df178ee09ffda7ce5076c9a1e59 25-Jan-2010 Wu-cheng Li <wuchengli@google.com> Change key to KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES for consistency.

bug:2375986
i/CameraParameters.h
5994a330ac949e7706540f22cd73d76d9f2a96cb 23-Jan-2010 Chih-Chung Chang <chihchung@google.com> Add support for 180/270 degrees rotation.
i/ISurface.h
52e7200b6e020bba978c36e3a928493a3f2c8a92 22-Jan-2010 Chih-Chung Chang <chihchung@google.com> Add an orientation parameter for overlay, so we can do camera preview in portrait mode.
i/ISurface.h
ccb5b89029ca3f653fbfa32a7b6ed82bf227541c 10-Dec-2009 Kenny Root <kroot@google.com> Add string resource type inspection

Allows "aapt dump --values resource" to print out whether a string in a
ResStringPool is in UTF-8 or UTF-16 encoding.

Change-Id: I6478884a70a3b46fee862dece6cb33454fc34843
tils/ResourceTypes.h
eb318fd88d16053010da554ba565eaaf3355a58e 08-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I129483f8 into eclair-mr2

* changes:
Optional use of UTF-8 strings in resource bundles
8c6cedc9bc9a4b69616a79a95449f6f6b08c7bf1 08-Dec-2009 Dianne Hackborn <hackbod@google.com> Propagate background scheduling class across processes.

This is a very simply implementation: upon receiving an IPC, if the handling
thread is at a background priority (the driver will have taken care of
propagating this from the calling thread), then stick it in to the background
scheduling group. Plus an API to turn this off for the process, which is
used by the system process.

This also pulls some of the code for managing scheduling classes out of
the Process JNI wrappers and in to some convenience methods in thread.h.
inder/IBinder.h
inder/IPCThreadState.h
tils/threads.h
92f5984d2c2cd73b6b9f68c02c147877d1e2fc46 04-Dec-2009 Kenny Root <kroot@google.com> Optional use of UTF-8 strings in resource bundles

Allows the use of UTF-8 for packing resources instead of the
default of UTF-16 for Java. When strings are extracted from the
ResStringPool, they are converted to UTF-16 and the result is
cached for subsequent calls.

When using aapt to package, add in the "-8" switch to pack the
resources using UTF-8. This will result in the value, key, and
type strings as well as the compiled XML string values taking
significantly less space in the final application package in
most scenarios.

Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
tils/ResourceTypes.h
tils/String16.h
tils/String8.h
963abad79ae64dae9bf4c32bfb110d9e6314c857 14-Nov-2009 Mathias Agopian <mathias@google.com> fix some aspects of [2258746] native crash in launcher2

Surface::validate() could sometimes dereference a null pointer before checking it wasn't null.
This will prevent the application to crash when given bad parameters or used incorrectly.
However, the bug above probably has another cause.
i/Surface.h
368ad53c549cd105e725d0290da68be2e7717b4c 03-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I36d0184e into eclair

* changes:
fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts when playing back video
6fee064809068fe1a7da63d55678d9a222b0be15 03-Nov-2009 Mathias Agopian <mathias@google.com> fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts when playing back video

we lost the concept of vertical stride when moving video playback to EGLImage.
Here we bring it back in a somewhat hacky-way that will work only for the
softgl/mdp backend.
rivate/opengles/gl_context.h
i/GraphicBuffer.h
1bd16a1511d43fc5b109f500d67b916776e8cce3 02-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Ibaef6141 into eclair

* changes:
libbinder: add a NO_CACHING flag to MemoryHeapBase
c2a04c3f2df99527e4ad4ca19b2e559df90b4b4d 02-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2226370: Resource versions match with equality

Also fixed turned-around increment of version number for resources. :(

Change-Id: I604137272da984bcd69cee4f174e6b7f2c786e46
tils/ResourceTypes.h
0db1a8931bb24b4f240c19210e70844af8c1e9ff 30-Oct-2009 Iliyan Malchev <malchev@google.com> libbinder: add a NO_CACHING flag to MemoryHeapBase

The NO_CACHING flag translates to opening a memory region with O_SYNC.

Signed-off-by: Iliyan Malchev <malchev@google.com>
inder/MemoryHeapBase.h
986e0dcf7ad2bbf0ec717430cd4e84ee82a3c6ea 23-Oct-2009 Wu-cheng Li <wuchengli@google.com> Use image rect information to display zoomed picture.
i/CameraHardwareInterface.h
54ba51dff21de666c5ae3bf3abd4f0634ebb0676 27-Oct-2009 Mathias Agopian <mathias@google.com> fix [2143798] Need to figure out how to do video

Use EGLImageKHR instead of copybit directly.
We now have the basis to use streaming YUV textures (well, in fact
we already are). When/if we use the GPU instead of the MDP we'll
need to make sure it supports the appropriate YUV format.

Also make sure we compile if EGL_ANDROID_image_native_buffer is not supported
i/GraphicBuffer.h
38a7fa2ae37236952e5fb0186fddb4f6da5990d8 16-Oct-2009 Mathias Agopian <mathias@google.com> fix [2182249] [MR1] valgrind error in surface flinger
rivate/ui/RegionHelper.h
e700501d0e888ead9ac6456c0a6fd74d634aa5fb 08-Oct-2009 Mathias Agopian <mathias@google.com> fix [2170319] gmail bulk operation checkbox latency on passion

This also fixes [2152536] ANR in browser

When SF is enqueuing buffers faster than SF dequeues them.
The update flag in SF is not counted and under some situations SF will only
dequeue the first buffer. The state at this point is not technically
corrupted, it's valid, but just delayed by one buffer.

In the case of the Browser ANR, because the last enqueued buffer was delayed
the resizing of the current buffer couldn't happen.

The system would always fall back onto its feet if anything -else- in
tried to draw, because the "late" buffer would be picked up then.
rivate/ui/SharedBufferStack.h
rivate/ui/SurfaceFlingerSynchro.h
i/SurfaceComposerClient.h
9ec430adaea1cb88eaa1e78c7f759cd42ab6cf7a 07-Oct-2009 Mathias Agopian <mathias@google.com> fix [2152536] ANR in browser

A window is created and the browser is about to render into it the
very first time, at that point it does an IPC to SF to request a new
buffer. Meanwhile, the window manager removes that window from the
list and the shared memory block it uses is marked as invalid.
However, at that point, another window is created and is given the
same index (that just go freed), but a different identity and resets
the "invalid" bit in the shared block. When we go back to the buffer
allocation code, we're stuck because the surface we're allocating for
is gone and we don't detect it's invalid because the invalid bit has
been reset.

It is not sufficient to check for the invalid bit, I should
also check that identities match.
rivate/ui/SharedBufferStack.h
b26af23744fa73e8bc142b1eb98772fde5970c10 06-Oct-2009 Mathias Agopian <mathias@google.com> fix [2168531] have software-only gralloc buffer side-step the HAL
rivate/ui/sw_gralloc_handle.h
3330b203039dea366d4981db1408a460134b2d2c 06-Oct-2009 Mathias Agopian <mathias@google.com> fix [2167050] glTexImage2D code path buggy in SurfaceFlinger

When EGLImage extension is not available, SurfaceFlinger will fallback to using
glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an
extra copy. However this code path has never been exercised and had some bugs
which this patch fix.

Mainly the scale factor wasn't computed right when falling back on glDrawElements.
We also fallback to this mode of operation if a buffer doesn't have the adequate
usage bits for EGLImage usage.

This changes only code that is currently not executed. Some refactoring was needed to
keep the change clean. This doesn't change anything functionaly.
rivate/ui/SurfaceBuffer.h
rivate/ui/android_natives_priv.h
i/BufferMapper.h
i/GraphicBuffer.h
i/GraphicBufferAllocator.h
i/GraphicBufferMapper.h
i/ISurface.h
i/Surface.h
i/android_native_buffer.h
e6a550d02ff02f465d7dbb6e862671462866f024 29-Sep-2009 Wu-cheng Li <wuchengli@google.com> Add zoom functions and sendCommand.

b2060030
i/Camera.h
i/CameraHardwareInterface.h
i/ICamera.h
0b3ad46a26dc3717260fa9347c77f673f3198606 03-Oct-2009 Mathias Agopian <mathias@google.com> Attempt to fix [2152536] ANR in browser

The ANR is caused by SurfaceFlinger waiting for buffers of a removed surface to become availlable.
When it is removed from the current list, a Surface is marked as NO_INIT, which causes SF to return
immediately in the above case. For some reason, the surface here wasn't marked as NO_INIT.

This change makes the code more robust by always (irregadless or errors) setting the NO_INIT status
in all code paths where a surface is removed from the list.

Additionaly added more information in the logs, should this happen again.
rivate/ui/SharedBufferStack.h
eb16a09f59022f9fd3f1d633204049bc4e96b0f9 28-Sep-2009 Wu-cheng Li <wuchengli@google.com> Change FLASH_MODE_VIDEO_LIGHT to FLASH_MODE_TORCH.
i/CameraParameters.h
cc6ce203be6784130c73e6f253981c7236cdcb68 23-Sep-2009 Wu-cheng Li <wuchengli@google.com> Add camera parameter key constants and documentation.
i/CameraParameters.h
dd3423c6247965bf67ea30c75e484a6f5d72b1a2 24-Sep-2009 Mathias Agopian <mathias@google.com> fix [2132563] stuck in boot animation (framebuffer_device_open: Failed to create flip chain)
i/SurfaceComposerClient.h
74faca212e2675aa55a30235c77cb6403471a4b9 18-Sep-2009 Mathias Agopian <mathias@google.com> Android side of the fix for [2121211] Sholes has stutter during animations

a new method, compostionComplete() is added to the framebuffer hal, it is used by surfaceflinger to signal the driver that the composition is complete, BEFORE it releases its client. This gives a chance to the driver to
i/FramebufferNativeWindow.h
86f7329080cbb6f70d56278b005c820f0360d84b 17-Sep-2009 Mathias Agopian <mathias@google.com> add basic time stats for surfaces lock time
rivate/ui/SharedBufferStack.h
b5df6d801cc154899e9f52328eb1e40e90720fa4 16-Sep-2009 Dianne Hackborn <hackbod@google.com> Implement issue #1780928: Need support hiding nav keys.

This implements support for devices whose hardware can hide
their navigation keys. It works much like the existing keyboardHidden
configuration, and for compatibility uses the same configuration
change bit.

Also add FLAG_TURN_ON_SCREEN for windows, which has the system
cause the screen to be turned on when the window is displayed.
Great fun when used with FLAG_SHOW_WHEN_LOCKED!

Change-Id: I0b867f19af85cfd8786a14cea194b34f7bdd9b7a
tils/ResourceTypes.h
68a6afeb26002961387573dd64dd0ea3816bdc91 16-Sep-2009 Mathias Agopian <mathias@google.com> fix [2122448] android_native_window_t::setUsage() only reallocates the first buffer

Take 2. We needed to check that the usage flags are "good enough" as opposed to "the same".

This reverts commit 8f17a762fe9e9f31e4e86cb60ff2bfb6b10fdee6.
i/Surface.h
3910f5467a344c54b3c39c45b820c184e31b449c 16-Sep-2009 Mathias Agopian <mathias@google.com> Revert "fix [2122448] android_native_window_t::setUsage() only reallocates the first buffer"

This reverts commit 486aa963b63e20b7910e1004cebb4f0afabbd80f.
i/Surface.h
d18afab9d6a89d14c5c583a7d976665af4765a6b 16-Sep-2009 Mathias Agopian <mathias@google.com> fix [2122448] android_native_window_t::setUsage() only reallocates the first buffer
i/Surface.h
00900eb35473530a5fc77f7bd3ac306b6dcf19cb 15-Sep-2009 Chih-Chung Chang <chihchung@google.com> Fix 2083478: Camera needs an auto-focus cancel API

Change-Id: I13bda991b32aee47e82b5cf9d43b3021c416a9a2
i/Camera.h
i/CameraHardwareInterface.h
i/ICamera.h
ab0fb1be8933b9c923c683d00d94bd2fa383fa85 15-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 24947 into eclair

* changes:
make sure to update the tail pointer when undoing a dequeue
c7d56010815b0e7104dfc1d4bba6d16cdcbffec4 15-Sep-2009 Mathias Agopian <mathias@google.com> make sure to update the tail pointer when undoing a dequeue
rivate/ui/SharedBufferStack.h
c101e04abb2c3bf4f48b185b454e94fade223653 12-Sep-2009 San Mehat <san@google.com> process: Switch to common cutils sched_policy api

Signed-off-by: San Mehat <san@google.com>
tils/threads.h
63a85fc420537d6bf2b8717d35c578806056b9e7 11-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 24643 into eclair

* changes:
fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymore
879a56313038bb296ba901aa5461c7cb57b26f8f 11-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 24642 into eclair

* changes:
make sure conditions will return when the status of a surface is not NO_ERROR
48d819a1315f7d1b5abfec9d4fd34fb5aed27b1d 11-Sep-2009 Mathias Agopian <mathias@google.com> fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymore

this also fixes part of [2111536] Device is soft rebooted after ending the call through voice dialer
rivate/ui/SharedBufferStack.h
b58b5d72d6877300fe39b2a30b4742c6f962833f 11-Sep-2009 Mathias Agopian <mathias@google.com> make sure conditions will return when the status of a surface is not NO_ERROR
rivate/ui/SharedBufferStack.h
9410f98e78622d962b3fb1c520af53d5351a65c5 09-Sep-2009 San Mehat <san@google.com> Process: Add support for using scheduler policies instead of cgroups.
Preference is given to cgroups if available.

Signed-off-by: San Mehat <san@google.com>
tils/threads.h
4de4ebf6a25b5cf1819809ffcedea331d79823e0 09-Sep-2009 Mathias Agopian <mathias@google.com> use broadcast() instead of signal() when signaling the condition-variable Thread::RequestExitAndWait() is waiting for

we could have several thread waiting on the condition and they all need to wake-up.
also added a debug "mTid" field in the class, which contains the tid of the thread (as opposed to pthread_t), this
is useful when debugging under gdb for instance.
tils/threads.h
cbb288bfe89f585bf48371bd31b2d4aafa32f32e 08-Sep-2009 Mathias Agopian <mathias@google.com> fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly

Rewrote SurfaceFlinger's buffer management from the ground-up.
The design now support an arbitrary number of buffers per surface, however the current implementation is limited to four. Currently only 2 buffers are used in practice.

The main new feature is to be able to dequeue all buffers at once (very important when there are only two).

A client can dequeue all buffers until there are none available, it can lock all buffers except the last one that is used for composition. The client will block then, until a new buffer is enqueued.

The current implementation requires that buffers are locked in the same order they are dequeued and enqueued in the same order they are locked. Only one buffer can be locked at a time.

eg. Allowed sequence: DQ, DQ, LOCK, Q, LOCK, Q
eg. Forbidden sequence: DQ, DQ, LOCK, LOCK, Q, Q
rivate/ui/LayerState.h
rivate/ui/SharedBufferStack.h
rivate/ui/SharedState.h
rivate/ui/SurfaceBuffer.h
i/ISurface.h
i/Surface.h
i/SurfaceComposerClient.h
tils/Errors.h
e03eaa1551a644e9a13c327d16cc09bfd7649d78 11-Aug-2009 Martin Storsjo <martin@martin.st> Calculate specular lighting correctly

Since the lighting calculations are done in object space, the vector
from the object to the viewer also needs to be transformed to object
space.
rivate/opengles/gl_context.h
d4851d74ac9c737acda85f1fdbc028c68f481a36 17-Aug-2009 Benny Wong <Benny.Wong@motorola.com> Add offset handling in MemoryHeapBase class
inder/MemoryHeapBase.h
1c97d2ebe1f035beabd90089bfc78326b73d7864 20-Aug-2009 Mathias Agopian <mathias@google.com> fix a bug that caused the PixelFormat viewed by Surface to be wrong.

what happened is that the efective pixel format is calculated by SF but Surface nevew had access to it directly.
in particular this caused query(FORMAT) to return the requested format instead of the effective format.
i/ISurfaceFlingerClient.h
84a6d041e2c69d4d0b69269a0b59e725c9f119a3 17-Aug-2009 Andreas Huber <andih@google.com> Support for marshalling pointers / intptr_t in Parcel.

Some refactoring to eliminate code duplication in Parcel implementation.
inder/Parcel.h
tils/Debug.h
37b2a3744c2045cbf15a50dc1312fdd8c67ae8b1 17-Aug-2009 Mathias Agopian <mathias@google.com> really be more friendly with C
i/egl/android_natives.h
ba5972ffdc7179dd9a387f22032eb18666d97917 15-Aug-2009 Mathias Agopian <mathias@google.com> make sure to update a surface's usage bits when it changes, instead of only the first time.

also fixed a few locking issues in Surface and commented how each member is protected.
i/Surface.h
238a66e67b155d7e1fcdb19b672ffc0ae4a6fc94 14-Aug-2009 Mathias Agopian <mathias@google.com> be more friendly with C
rivate/ui/android_natives_priv.h
i/egl/android_natives.h
ccde199f7ce916e42a45b5a50e937d9c17904da2 14-Aug-2009 Mathias Agopian <mathias@google.com> Surface::GPU and Surface::HARDWARE are now deprecated; they will be set automatically if needed.

this also ripples into the window manager API by making some constant there deprecated as well.
i/ISurfaceComposer.h
fae3e73b6157555e8605f8b0c1d5b0bcc5b5ea00 14-Aug-2009 Dima Zavin <dima@android.com> ui: make native_window_set_usage be a static inline

Signed-off-by: Dima Zavin <dima@android.com>
i/egl/android_natives.h
4c8fb0a184e51c3f561fff26ba84ceb5ec75be24 12-Aug-2009 Benny Wong <Benny.Wong@motorola.com> Modified the camera HAL interface to use the same generic callback architecture as camera services
i/Camera.h
i/CameraHardwareInterface.h
878d647b5b77f040cdae810e7e05be23a105e1eb 12-Aug-2009 Dianne Hackborn <hackbod@google.com> am b8546001: Merge change 20878 into donut

Merge commit 'b8546001701405a76dad7e6235046e592296fac2'

* commit 'b8546001701405a76dad7e6235046e592296fac2':
Fix issue #2048263: More debugging information
5221271375f361b84a6eeec3d7086f223997fbb3 12-Aug-2009 Mathias Agopian <mathias@google.com> second take, hopefully this time it doesn't break one of the builds: "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
i/FramebufferNativeWindow.h
i/ISurface.h
i/Surface.h
i/egl/android_natives.h
b2fd4665e66fe81969f1f07fd724c6f68dd8f7f1 12-Aug-2009 Fred Quintana <fredq@google.com> Revert "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."

This reverts commit 8b76a0ac6fbf07254629ed1ea86af014d5abe050.
i/FramebufferNativeWindow.h
i/ISurface.h
i/Surface.h
i/egl/android_natives.h
e868513287c50caec4bcc83be3c49e12dfbeac72 12-Aug-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2048263: More debugging information

We now hopefully do better about generating the anr reports, and include
information about the malloc loaded assets in meminfo.
tils/Asset.h
df37b62c62f8efd3b5a433f9b4d40d30cec13a31 11-Aug-2009 Mathias Agopian <mathias@google.com> SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything.

This change makes SurfaceHolder.setType(GPU) obsolete (it's now ignored).
Added an API to android_native_window_t to allow extending the functionality without ever breaking binary compatibility. This is used to implement the new set_usage() API. This API needs to be called by software renderers because the default is to use usage flags suitable for h/w.
i/FramebufferNativeWindow.h
i/ISurface.h
i/Surface.h
i/egl/android_natives.h
e186431c33fa332b585e37f6b5ef5efd39b359cf 07-Aug-2009 Andreas Huber <andih@google.com> Expose a variation of the createRenderer API that works on a plain Surface.
i/Surface.h
8c12c7aec3fdbccfa8161c2c12131d590a9b5ce8 08-Aug-2009 Mathias Agopian <mathias@google.com> added EGLUtils::strerror
i/EGLUtils.h
b2001065b957bf0db2577c0877c4751097d627af 07-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge changes 20345,20346,20347

* changes:
update most gl tests to use EGLUtils
added two EGL helpers for selecting a config matching a certain pixelformat or native window type
added NATIVE_WINDOW_FORMAT attribute to android_native_window_t
6cf50a770dabd13cf5b72bb0a6fb9dd002c88db6 07-Aug-2009 Mathias Agopian <mathias@google.com> added two EGL helpers for selecting a config matching a certain pixelformat or native window type
i/EGLUtils.h
6b1f41004fa48e96bab61f508867314261de660b 07-Aug-2009 Mathias Agopian <mathias@google.com> added NATIVE_WINDOW_FORMAT attribute to android_native_window_t
i/egl/android_natives.h
34193b31681dcbadf0a629879ca004f561b1b149 06-Aug-2009 Iliyan Malchev <malchev@google.com> EventHub: pass the name of each input device up to Java

Signed-off-by: Iliyan Malchev <malchev@google.com>
i/EventHub.h
c591736c66cbd4320fc96573fda28bec2b4d4100 04-Aug-2009 Dianne Hackborn <hackbod@google.com> Finish implementation of multiple pointer support for MotionEvent.

The major things going on here:

- The MotionEvent API is now extended to included "pointer ID" information, for
applications to keep track of individual fingers as they move up and down.
PointerLocation has been updated to take advantage of this.

- The input system now has logic to generate MotionEvents with the new ID
information, synthesizing an identifier as new points are down and trying to
keep pointer ids consistent across events by looking at the distance between
the last and next set of pointers.

- We now support the new multitouch driver protocol, and will use that instead
of the old one if it is available. We do NOT use any finger id information
coming from the driver, but always synthesize pointer ids in user space.
(This is simply because we don't yet have a driver reporting this information
from which to base an implementation on.)

- Increase maximum number of fingers to 10. This code has only been used
with a driver that reports up to 2, so no idea how more will actually work.

- Oh and the input system can now detect and report physical DPAD devices.
i/EventHub.h
764d4ab4561b8556c06f2ae7c56b7e983a5cf0b7 31-Jul-2009 Andreas Huber <andih@google.com> The IOMX interface now instantiates IOMXRenderers to hide the details of hardware accelerated blitting.
i/Surface.h
fa170f513338322102a200de7d1fd696e51d55c8 31-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 9287

* changes:
fixed some issues with the software renderer when surfaces are made current.
cb6b9041647b4f080324742eee5ce709960ff610 31-Jul-2009 Mathias Agopian <mathias@google.com> fixed some issues with the software renderer when surfaces are made current.

there was several issues:
- when a surface was made non-current, the last frame wasn't shown and the buffer could stay locked
- when a surface was made current the 2nd time, it would not dequeue a new buffer

now, queue/dequeue are done when the surface is made current.

for this to work, a new query() hook had to be added on android_native_window_t, it allows to retrieve some attributes of a window (currently only width and height).
i/FramebufferNativeWindow.h
i/Surface.h
i/egl/android_natives.h
ff1dcc2cf9043c4d128cf8498b58e956e9ee965f 31-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 25dff70f: Merge change 9039 into donut

Merge commit '25dff70f153529b87f5ad4a92f4de21e8950b1de'

* commit '25dff70f153529b87f5ad4a92f4de21e8950b1de':
Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
3945ae5065ec62ed267e1aaf4cfc160c5eb6a79e 30-Jul-2009 Dianne Hackborn <hackbod@google.com> Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA

It turns out we were not returning the density for anything retrieved from a
TypedArray... which basically means any bitmap references from a layout or style...!!!

This is now fixed.

Also fiddle with the density compatibility mode to turn on smoothing in certain situations,
helping the look of things when they need to scale and we couldn't do the scaling at
load time.
tils/ResourceTypes.h
e56271109fe59e1c1f4958bdcdeb9a3a7f53eb28 25-Jul-2009 Benny Wong <Benny.Wong@motorola.com> Adding resizeInput and setAttributes for overlay
i/Overlay.h
9d91ad5d99c1318f7f1435370e29f3f337afe82f 17-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1795088 Improve audio routing code

Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
ts/TtsEngine.h
298cb4ff6a792e475af7a32093dd0b7cdfde7486 22-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 7529

* changes:
Make MemoryDealer's destructor protected instead of public.
351b6f926e06355079669f170a97a729537932ed 22-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 9fc20b0e: Merge change 8126 into donut

Merge commit '9fc20b0e381b5fe00b7049ef357c839cd05a33bf'

* commit '9fc20b0e381b5fe00b7049ef357c839cd05a33bf':
First pass at reworking screen density/size APIs.
60cde60e89373b03f1c645c51f825c7898f62d9e 22-Jul-2009 Dianne Hackborn <hackbod@google.com> First pass at reworking screen density/size APIs.

This changes the names of the directories in aapt, to what you see
in the list of DpiTest resources. Also adds a new "long" configuration
for wide screens, which the platform sets appropriate, and introduces
a new kind of resizeability for not large but significantly larger
than normal screens which may have compatibility issues.
tils/ResourceTypes.h
811fdfd9b7863ee4e6300500b9159d11878e1664 20-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 5892

* changes:
Hardware overlay support
89fbf845390322eb486632bae9108191803d4b9e 20-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am aad0fcc9: Merge change 7783 into donut

Merge commit 'aad0fcc9619eb72c18a6afff48ebc9d4011f0f54'

* commit 'aad0fcc9619eb72c18a6afff48ebc9d4011f0f54':
Add "nodpi" density, and expose a bunch of density-related APIs.
b3e8103538c4a487c20238a2da86159381a688d7 17-Jul-2009 Dianne Hackborn <hackbod@google.com> Add "nodpi" density, and expose a bunch of density-related APIs.

Also update the DpiTest app to use nodpi images, and try to have a mode
where it turns off compatibility though it's not quite working.
tils/ResourceTypes.h
71f771570e1b5341048a6fbf82a7c57d885bd850 16-Jul-2009 Benny Wong <Benny.Wong@motorola.com> Hardware overlay support

Enable hardware overlay support for camera and video playback use cases
i/Overlay.h
f0adf848ffffeca86f4c0210ea237883d9e5e8d5 16-Jul-2009 Andreas Huber <andih@google.com> Make MemoryDealer's destructor protected instead of public.

MemoryDealer, like all other subclasses of RefBase,MUST NOT BE stack-allocated, a protected destructor prohibits stack-allocation while allowing the baseclass to properly invoke the subclass' destructor once the refcount drops to 0.
inder/MemoryDealer.h
b441106276a9c5fcd47642aff8cda2a2039481c0 16-Jul-2009 Mike Lockwood <lockwood@android.com> EventHub: Add support for excluding devices from being opened by as a keyboard.

This will be used to avoid unnecessarily listening to data from sensors
that function as event devices.

Signed-off-by: Mike Lockwood <lockwood@android.com>
i/EventHub.h
29b936e8a96ed62f617b87db417058c25147babd 15-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 7353

* changes:
Implement virtual button support.
c968c3a9c782eaf44a5772cd388e5c690e5be4f3 14-Jul-2009 Dianne Hackborn <hackbod@google.com> Implement virtual button support.

The kernel can now publish a property describing the layout of virtual
hardware buttons on the touchscreen. These outside of the display
area (outside of the absolute x and y controller range the driver
reports), and when the user presses on them a key event will be
generated rather than a touch event.

This also includes a number of tweaks to the absolute controller
processing to make things work better on the new screens. For
example, we now reject down events outside of the display area.

Still left to be done is the ability to cancel a key down event,
so the user can slide up from the virtual keys to the touch screen
without causing a virtual key to execute.
i/EventHub.h
eb9fd685f8c02384305d57d17b1bca428c7b2dd9 14-Jul-2009 Mathias Agopian <mathias@google.com> add a ctor to Mutex to specify the type, which can be shared. This is used by sf and af an soon will allow some optimization in the kernel for non shared mutexes
rivate/ui/SharedState.h
tils/threads.h
ec0f1f6720cd7ecffab54b0dfc2553b55a38e50f 13-Jul-2009 Mathias Agopian <mathias@google.com> implement Mutex and Condition with pthread instead of calling futex directly.

internally pthread uses futex. the implementation consists of simple inlines
there are no implementation files anymore.
rivate/utils/futex_synchro.h
tils/threads.h
1b85080b2a5a3199d5c335ced779d52c813595ac 09-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 8a715b4b: Merge change 5510 into donut

Merge commit '8a715b4b791db4390d12e0ded02280592634a424'

* commit '8a715b4b791db4390d12e0ded02280592634a424':
Add useful functions to String8, which enables users to convert between UTF-8 and UTF-32
0d5eee378489cee3f69c38fb5e039441518cb7af 09-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 5510 into donut

* changes:
Add useful functions to String8, which enables users to convert between UTF-8 and UTF-32 It will be used in SQL functions in external/sqlite/android. See https://android-git.corp.google.com/g/Gerrit#change,5511 for example.
b70b71187b9bb6316903336b89391e103c17f3e1 09-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 6560

* changes:
resolved conflicts for merge of 04c7d0f8 to master
9f1234e4600d343710635973f3296da7b39cd9a2 09-Jul-2009 Dave Sparks <davidsparks@android.com> resolved conflicts for merge of 04c7d0f8 to master
9f220247f64d7db8a36532851cff087f5a6e4070 30-Jun-2009 Daisuke Miyakawa <dmiyakawa@google.com> Add useful functions to String8, which enables users to convert between UTF-8 and UTF-32
It will be used in SQL functions in external/sqlite/android.
See https://android-git.corp.google.com/g/Gerrit#change,5511 for example.

Related internal bug id: 1707173
tils/String8.h
d43b2e4b75a46684192c316754c0008ca7f890a7 09-Jul-2009 Marco Nelissen <marcone@google.com> Add a virtual destructor to the TtsEngine class.
ts/TtsEngine.h
f72d640b7c7de40b4c5d83b69748535e4254c941 09-Jul-2009 Dave Sparks <davidsparks@android.com> Add timestamps to video frames to improve A/V sync.
Bug 1927069.
i/Camera.h
i/CameraHardwareInterface.h
i/ICameraClient.h
d7fac60c4fb7b52a11691134db60253d0cd245ad 07-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 6382

* changes:
add a virtual destructor to region_rasterizer, to be on the safe side
e7c4c28d0fe9b62eacaa04d901464e501e511265 07-Jul-2009 Mathias Agopian <mathias@google.com> add a virtual destructor to region_rasterizer, to be on the safe side
rivate/ui/RegionHelper.h
f460f19510f9119d7b441403f8f6ba0b7f5fc267 07-Jul-2009 Andy McFadden <fadden@android.com> Fix sim build.

Looks like older gcc (4.1.x) doesn't properly handle templated
fanciness. Apparently that's what we have on the build server.
tils/List.h
0f7f88db2771ec6b08df1354f1d85290f93227d5 06-Jul-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
1a16ea88edefc0d80126090f7ad239dbf5231751 06-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 991eec03: Merge change 6252 into donut

Merge commit '991eec03a73f8803d0f8c80b418480ea25293cfb'

* commit '991eec03a73f8803d0f8c80b418480ea25293cfb':
Don't re-parse the framework resources all the time.
0f253efba5552db81bf942705b1e5525fc1f0c90 06-Jul-2009 Dianne Hackborn <hackbod@google.com> Don't re-parse the framework resources all the time.

A small optimization to the resource code, to not re-parse the framework
resources every time we build a new AssetManager. Instead, you can now
construct a ResTable from a previously created one... of course, like the
existing code for using the data in-place, you can't delete the original
ResTable until you have deleted the one that has been constructed from it.
tils/AssetManager.h
tils/ResourceTypes.h
4361996a8c4a398d818da4ea453595a0a3404358 06-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am c7396025: Merge change 6084 into donut

Merge commit 'c7396025e59524e7ef639fd86fc23123939ee91c'

* commit 'c7396025e59524e7ef639fd86fc23123939ee91c':
Return CAMERA_ERROR_SERVER_DIED to camera app when camera service dies (bug 1956726)
7303c6bf1a8b00a0e7d8165d774a1f259b4ccda9 03-Jul-2009 Mathias Agopian <mathias@google.com> get rid of references to MemoryDealer in SurfaceFlinger
i/ISurfaceComposer.h
i/ISurfaceFlingerClient.h
i/SurfaceComposerClient.h
16f3d35459a03bf7fad41df0a0d192d2c50a0594 02-Jul-2009 James Dong <jdong@google.com> Return CAMERA_ERROR_SERVER_DIED to camera app when camera service dies (bug 1956726)
i/Camera.h
47a1a39ce9422c6468c0bd87c121658f385d2d8f 02-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 6e1647a2: Merge change 5829 into donut

Merge commit '6e1647a212317f4ee8bcc23948b6621a59172954'

* commit '6e1647a212317f4ee8bcc23948b6621a59172954':
Fix issue #1673793: Theme styles don't apply.
84d1f7a09827fe195dd08b647b8c5092d03516f7 02-Jul-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
4040dcf8c2aa0136c6fc2084868bd5074cb67519 30-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am bd9aa793: Merge change 5593 into donut

Merge commit 'bd9aa793b19f7aa529ca4123492f8940b96486b8'

* commit 'bd9aa793b19f7aa529ca4123492f8940b96486b8':
Add in TTS engine interface the methods to query the availability for a language,
e3562924674927d6faf85fb4adf522b6fa80f140 30-Jun-2009 Dianne Hackborn <hackbod@google.com> Fix issue #1673793: Theme styles don't apply.

It turns out this was not a problem in the resource code at all. Rather,
the system process has a cache of pre-loaded attributes it uses to avoid
continually reloading things as it needs them. Well it turns out this
cache wasn't flushed after a package was uninstalled or a configuration
changed, so you could re-install an app where you change its style resources
so its theme now points to one that is inconsistent in the cache.

This is mostly a problem for developers, where they continually install
new versions of an app where resources have changed. This could possibly
show up when updating an app on a normal phone, although the problem would
eventually correct itself since this cache uses weak references.

Anyway, the cache is now reworked to be flushed appropriately.

This change also includes an update to aapt to be able to dump the
contents of bags in resources.
tils/ResourceTypes.h
9f96145725ff3f265712d607d19078fb91a5c8ec 30-Jun-2009 Mathias Agopian <mathias@google.com> Region::makeBoundsSelf() efficiently turns a region to its bounds
i/Region.h
ff10113dd45b6a8cb32ccaf36b2bc768c06ff26a 30-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 17a80081: Merge change 5544 into donut

Merge commit '17a80081a42410f541a220ab7e6afc64fc6cc399'

* commit '17a80081a42410f541a220ab7e6afc64fc6cc399':
Pipe all the camera callbacks to Java to facilitate the addition
b9c8a7349671ed003f40f70412ed0bbacab90931 30-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 72eb0aca: Merge change 5483 into donut

Merge commit '72eb0acad5cffc57ce5006f6deab29ee259e461e'

* commit '72eb0acad5cffc57ce5006f6deab29ee259e461e':
Expand support for different screen sizes.
3c65483b327a80caf5398b3fd49d9afded1b41b2 29-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 5593 into donut

* changes:
Add in TTS engine interface the methods to query the availability for a language, to set the synthesis audio format, to query the current language, country and variant setting.
3f81888a7213062f42a6893ff07e76fc43bdf447 27-Jun-2009 Jean-Michel Trivi <jmtrivi@google.com> Add in TTS engine interface the methods to query the availability for a language,
to set the synthesis audio format, to query the current language, country and
variant setting.
ts/TtsEngine.h
17b2ad027b4b72b96dfb663c0ea001972da7ef58 27-Jun-2009 Mathias Agopian <mathias@google.com> return bounds Rect by value
i/Region.h
5579a65263a93786219737f28c7b902ff3bf4529 26-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 5544 into donut

* changes:
Pipe all the camera callbacks to Java to facilitate the addition of new features. This will make it easy to add things like zoom callbacks without modifying the entire camera stack. Bug 1837832.
21342c5c19c1768fe98a30155bfa97fa4138dc80 26-Jun-2009 Dianne Hackborn <hackbod@google.com> Expand support for different screen sizes.

Applications can now declare that they support small, normal, or
large screens. Resource selection can also be done based on these
sizes. By default, pre-Donut apps are false for small and large,
and Donut or later apps are assumed to support all sizes. In either
case they can use <supports-screens> in their manifest to declare
what they actually support.
tils/ResourceTypes.h
c06b7cb6f35989580dff68ebc7edabc0352aa556 26-Jun-2009 Dave Sparks <davidsparks@android.com> Pipe all the camera callbacks to Java to facilitate the addition
of new features. This will make it easy to add things like zoom
callbacks without modifying the entire camera stack.
Bug 1837832.
i/Camera.h
7df9173fc2b349a81b5ff6f26535c2cd3ce86dbc 26-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am b65dba45: Merge change 5470 into donut

Merge commit 'b65dba4560f7aff894ebcdbe8468daeaae3489c8'

* commit 'b65dba4560f7aff894ebcdbe8468daeaae3489c8':
Use the same interface in the TTS engine interface for setLanguage and loadLanguage.
0a90b69714edb6b7532390c35163f08c552329ef 26-Jun-2009 Jean-Michel Trivi <jmtrivi@google.com> Use the same interface in the TTS engine interface for setLanguage and loadLanguage.
Adding function to check the support level for a language in TTS engine interface.
ts/TtsEngine.h
694fcc5d1d3505c034a2cb89b6150214e7cea0fd 26-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am c44989d6: Merge change 5350 into donut

Merge commit 'c44989d6c7bcc761fb37f54fd37aac2070ba8e5e'

* commit 'c44989d6c7bcc761fb37f54fd37aac2070ba8e5e':
move ui/Time.cpp to core/jni, since this is the only place it is used
a8664df810ad46ce33c0ea28d4e648c067112db8 25-Jun-2009 Mathias Agopian <mathias@google.com> move ui/Time.cpp to core/jni, since this is the only place it is used
tils/TimeUtils.h
2ab55a4e31c37d74abdd85486e1f4045c7f708e2 25-Jun-2009 Mathias Agopian <mathias@google.com> make use of new eglGetRenderBufferANDROID extension to clean-up a bit a few hacks added recently
i/FramebufferNativeWindow.h
69029eb5abfaeb52716b84db89e32dc742551508 24-Jun-2009 Mathias Agopian <mathias@google.com> hack copybit back in for video playback on msm7k. we have h/w accelerated video again
i/FramebufferNativeWindow.h
4c4b387afb2e775fcac3b81a249bb7646515dffa 25-Jun-2009 Mathias Agopian <mathias@google.com> merge master in master_gl
6ef6895b03881d565643077c5d86591c5a3f4951 25-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am df65b60c: Merge change 5243 into donut

Merge commit 'df65b60ce33e5a56815864f8f0713e25378fa649'

* commit 'df65b60ce33e5a56815864f8f0713e25378fa649':
Only report "unknown metadata" once per restore helper
aa8d188de37e262c1e705981d6fedc990b6dc100 25-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am a93466f5: Merge change 5220 into donut

Merge commit 'a93466f5ca41c2ba6c3524c8d1edc2138bf753e3'

* commit 'a93466f5ca41c2ba6c3524c8d1edc2138bf753e3':
Cleanup header file. Disallow copy of Camera object by making copy
b6ab1e901092072ca9a933a6eff2bcb9969cdc4b 24-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 5243 into donut

* changes:
Only report "unknown metadata" once per restore helper
bd95c1d3af82e329ada195876348383b7859ce85 24-Jun-2009 Christopher Tate <ctate@google.com> Only report "unknown metadata" once per restore helper

Also removes the auto-free object, replacing it with direct memory manipulation.
tils/BackupHelpers.h
de5b60b06254748e4593d6095277da45e44acf80 24-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am eaa89f74: Merge change 5172 into donut

Merge commit 'eaa89f74c04c0f10d5f3f8190b457087537bff2e'

* commit 'eaa89f74c04c0f10d5f3f8190b457087537bff2e':
Remove deprecated callback function support.
e193f7cd9eded002b5a74b8823be704c020be536 24-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 3d7b8d1a: Merge change 5158 into donut

Merge commit '3d7b8d1aa6a362292f56defbe8fb2d5653f79282'

* commit '3d7b8d1aa6a362292f56defbe8fb2d5653f79282':
Use a ref-counted callback interface for Camera.
f5a8faa751cc55c8474ce17d407c9933ad0efdeb 24-Jun-2009 Dave Sparks <davidsparks@android.com> Cleanup header file. Disallow copy of Camera object by making copy
constructor and operator= private.
i/Camera.h
dc76f7bfa10a037ea0cc0f253022d8de7eefc691 24-Jun-2009 Dave Sparks <davidsparks@android.com> Remove deprecated callback function support.
This is the last of a 3-part change to modify the camera to use
a more streamlined callback interface. This change removes the
old code.
Bug 1884362
i/Camera.h
bbbc7cb77efba3dd46e9d13fc22e81cff17c35d2 24-Jun-2009 Dave Sparks <davidsparks@android.com> Use a ref-counted callback interface for Camera.
This allows the camera service to hang onto the callback interface
until all callbacks have been processed. This prevents problems
where pending callbacks in binder worker threads are processed
after the Java camera object and its associated native resources
have been released.
Bug 1884362
i/Camera.h
2d1db86e4587a919742c2f18223f7cf408263f7d 23-Jun-2009 Christopher Tate <ctate@google.com> am 11b15779: Add file mode to the file-backup saved state blobs

Merge commit '11b157790234d3d2f116ce4c7ed1d3d00fb78bc3'

* commit '11b157790234d3d2f116ce4c7ed1d3d00fb78bc3':
Add file mode to the file-backup saved state blobs
ab2e9e81e187d427b22ac969f47900d3de041264 23-Jun-2009 Christopher Tate <ctate@google.com> Add file mode to the file-backup saved state blobs

This change puts the file's access mode into the saved-state blob used by the
file backup helpers. The tests have been updated for the new blob content
format.

What this change *doesn't* do is actually backup/restore the file mode. This
change is a prerequisite for that, but mode preservation in backup/restore will
require adding metadata to the backup data stream itself, so will be approached
a bit more carefully.

(Also fixed one outright bug in the test program: ReadEntityData() had been
changed to return a ssize_t union of either a byte-count or a negative number
indicating error, but the test program was still assuming that nonzero == error,
and was spuriously failing.)
tils/BackupHelpers.h
952663ef57ffa8a69a220856eb1679c4e9eca254 23-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 5277103d: Merge change 5035 into donut

Merge commit '5277103db9033226814edc8fcba6f4ba4e846678'

* commit '5277103db9033226814edc8fcba6f4ba4e846678':
add glTexParameteri() and fix glTexParameteriv()
b12f99b31528a9ab9aa8f5c9fcfb57ad4c8b0517 23-Jun-2009 Mathias Agopian <mathias@google.com> add glTexParameteri() and fix glTexParameteriv()
rivate/opengles/gl_context.h
d056f2d08771091b100bed8cb36946dfc421de24 22-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 72be4049: Merge change 4910 into donut

Merge commit '72be40490951d3f9d0ada16fcf5288d0c3306d88'

* commit '72be40490951d3f9d0ada16fcf5288d0c3306d88':
fix warnings that will show up with GCC 4.4 (in master)
cfb991d1f860e5233d383a40967b252793677469 22-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 4910 into donut

* changes:
fix warnings that will show up with GCC 4.4 (in master)
2a84f2e369e144ff1fbd6eb0867ebaa608bfaf6a 22-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 856dd8a6: Merge change 4952 into donut

Merge commit '856dd8a60a70a5b7dca2bf2114872ce063e2ad60'

* commit '856dd8a60a70a5b7dca2bf2114872ce063e2ad60':
Helper API cleanup. Allows multiple helpers to function,
9cda3e02c6154422abec1c3215b93cc6bb70d76a 19-Jun-2009 Joe Onorato <joeo@android.com> Helper API cleanup. Allows multiple helpers to function,
because they'll always go in the same order, and this lets
us not have to write headers to keep them paired.
tils/BackupHelpers.h
52ed26a78b77e559555622a006f888a70cd84a0a 22-Jun-2009 Mathias Agopian <mathias@google.com> fix warnings that will show up with GCC 4.4 (in master)
tils/ResourceTypes.h
5f28411a856e47f86e3b0c7c031a6c0e0fa1dba0 22-Jun-2009 Mathias Agopian <mathias@google.com> improve Vector<> with types that can be trivially moved and remove some unused code.

This optimization applies to sp<> and wp<> which should now perform about the same as regular pointers when placed in to Vector<>.
tils/SortedVector.h
tils/TypeHelpers.h
tils/Vector.h
tils/VectorImpl.h
cca6b4267d2e3910b9808aa45e69206e06ef353e 20-Jun-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
03428fcc8bfb43968f9e9cbd3c6c1fd23290439b 20-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 1585bd24: Merge change 4828 into donut

Merge commit '1585bd24c10d16351f89e32dddbfa799f18db6bd'

* commit '1585bd24c10d16351f89e32dddbfa799f18db6bd':
Report densities in badging, debugging for nine patch bug.
be1bc0a1f969dd874d4a4d10c70f8d585b21a214 20-Jun-2009 Dianne Hackborn <hackbod@google.com> Report densities in badging, debugging for nine patch bug.

The aapt tool now reports all available densities like it already did
for locales. Also this includes more resource data output, which I
was using to examine bug #1867049 (which at this point I am unable to
reproduce).
tils/ResourceTypes.h
4910dc62561c90c75d953a04f75b31f16e0c0e9c 19-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 5502f04c: Merge change 4709 into donut

Merge commit '5502f04c1dcf2b1918858bacb99fb0480a711707'

* commit '5502f04c1dcf2b1918858bacb99fb0480a711707':
backup stuff
0388b513418f0e1eb45bcb554f866e160cd475da 19-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 16ce3504: Merge change 4708 into donut

Merge commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9'

* commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9':
Make RestoreHelper and friends also write out the snapshot state.
6bda7fd5564a1a88daef7a00890b3eaa191b8854 19-Jun-2009 Joe Onorato <joeo@android.com> backup stuff
tils/BackupHelpers.h
da1430be269b2b20920b6cb27616f54e2b83a973 18-Jun-2009 Joe Onorato <joeo@android.com> Make RestoreHelper and friends also write out the snapshot state.
tils/BackupHelpers.h
00ea06792b76f30b7e1ee450f0915edb5df75e42 18-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am de72697b: Merge change 4524 into donut

Merge commit 'de72697b771d33738c5f9d6c28087504e0796622'

* commit 'de72697b771d33738c5f9d6c28087504e0796622':
FileRestoreHelper and RestoreHelperDispatcher work.
f509f669cfde367b4591b027d95512accbd2ccef 18-Jun-2009 Joe Onorato <joeo@android.com> FileRestoreHelper and RestoreHelperDispatcher work.
tils/BackupHelpers.h
f757bd07108267d37a7944353d2cf2a40d68e115 18-Jun-2009 Joe Onorato <joeo@android.com> am 5f15d151: checkpoint BackupDatAInput / RestoreHelper

Merge commit '5f15d151b5101fadfe6cba1e8f4aa6367e8c603e'

* commit '5f15d151b5101fadfe6cba1e8f4aa6367e8c603e':
checkpoint BackupDatAInput / RestoreHelper
03aa8d7d04428b9c7981f9bada5acf1e808b0056 16-Jun-2009 Joe Onorato <joeo@android.com> checkpoint BackupDatAInput / RestoreHelper
tils/BackupHelpers.h
a230463a5ad12909edc5191e7419205a6bd3c0d1 17-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am f1170fb5: Merge change 4251 into donut

Merge commit 'f1170fb5386ea86d704480d321ee9d1ee4858244'

* commit 'f1170fb5386ea86d704480d321ee9d1ee4858244':
Updating TTS engine interface for setting the language based on language, country and variant codes
bc275c818be077e80d730657a2df706bea0bffb0 16-Jun-2009 Jean-Michel Trivi <jmtrivi@google.com> Updating TTS engine interface for setting the language based on language, country and variant codes
coming from a java.util.Locale instance.
ts/TtsEngine.h
b6822d7a3ea86b729a8c716a5fc9ad7a02532bfe 16-Jun-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
375f56363a8737119ce2222dcfaacbe1cf733fc0 16-Jun-2009 Mathias Agopian <mathias@google.com> new Permission class used to improve permission checks speed (by caching results)
inder/IServiceManager.h
inder/Permission.h
a08c7b6759075c3076e6f2c52df71dd7da894c15 12-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 78f0f8cb: Merge changes 3953,3954 into donut

Merge commit '78f0f8cb2efe9410127c39201e240f6d438eb53c'

* commit '78f0f8cb2efe9410127c39201e240f6d438eb53c':
Make the file backup helper not crash if a file you requested
Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
1a9e19a73e12f5e4891557de64cab5b9b7ae1ac5 11-Jun-2009 Joe Onorato <joeo@android.com> Make the file backup helper not crash if a file you requested
can't be stated. This means you don't need to know if the files
you are backing up exist or not -- we'll figure it out for you.
tils/BackupHelpers.h
0ad6120dadc1665f394e73330d30e949066c77e1 11-Jun-2009 Joe Onorato <joeo@android.com> Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.

This took quite a bit of refactoring.
tils/BackupHelpers.h
0a3139a21e628093893bba8ca0bb0b4742e0522c 11-Jun-2009 Mathias Agopian <mathias@google.com> fix a bug where copybit only renders in the first buffer when used with s/w GL
rivate/opengles/gl_context.h
7e2a937c4fa91e7c048fdbc37fe2a8dd85361df9 10-Jun-2009 Mathias Agopian <mathias@google.com> revive the copybit test.
rivate/ui/SurfaceBuffer.h
4d4be6b49b8e42e837a890fa844f86a460f00ce0 06-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am e3523054: Merge change 3356 into donut

Merge commit 'e3523054ded8c6e86935a978aa136c3ed2c0ba12'

* commit 'e3523054ded8c6e86935a978aa136c3ed2c0ba12':
Cleaning up comments in interface for TTS engines.
ce08aa442254c4b6efa4cd8f7ecadd5002614ab8 06-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 327da854: Merge change 3344 into donut

Merge commit '327da854e8fbc444150b40941668b3c9187c34b9'

* commit '327da854e8fbc444150b40941668b3c9187c34b9':
Updating TtsEngine.h and SynthProxy.cpp so that buffer memory
a40a4cf6563e1cdba64f3fda339374370965b5aa 06-Jun-2009 Jean-Michel Trivi <jmtrivi@google.com> Cleaning up comments in interface for TTS engines.
ts/TtsEngine.h
1a0c4cd5d83facd9653c45db1d2b9725c2e060b0 06-Jun-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
4fcd9c700368f08117aa1e2264f56eeb6b8af832 06-Jun-2009 Mathias Agopian <mathias@google.com> get rid of LogSocket which wasn't even implemented (enabled)
tils/LogSocket.h
7e83f043d9c7afc42b632aa9567ecc17e901068c 05-Jun-2009 Mathias Agopian <mathias@google.com> break dependency on utils/ZipEntry.h and utils/ZipFile.h, get rid of inet_address.h and Socket.h which were not used
tils/Socket.h
tils/ZipEntry.h
tils/ZipFile.h
tils/inet_address.h
a17cef01547bc37c2d91e31e2e05beea8cdb63f3 05-Jun-2009 Charles Chen <clchen@google.com> Updating TtsEngine.h and SynthProxy.cpp so that buffer memory
management is handled on the system side.
ts/TtsEngine.h
861aa2f0c9136298380496bd78d6a18e69331c53 05-Jun-2009 Mathias Agopian <mathias@google.com> rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file.

StringArray is used in two places in framework/base and in the Sim. Ideally we should get rid of it and use Vector<String8> instead of creating new code.
tils/StringArray.h
tils/string_array.h
0c97ed3a2ecc4a5b49bfb26674a9f4a5ac361024 05-Jun-2009 Mathias Agopian <mathias@google.com> cleanup Debug.h a bit
rivate/ui/SharedState.h
tils/Debug.h
6d2bc14d2420689d9789fadc3058bfc1191a8e72 05-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 2a318867: Merge change 3203 into donut

Merge commit '2a3188672ab2b65c0ce7c9c598a463e382c47696'

* commit '2a3188672ab2b65c0ce7c9c598a463e382c47696':
rename a few files to camel-case, add copyright notices
3d57964a81cd631d80aa9575647e1ce35b5e82d5 05-Jun-2009 Mathias Agopian <mathias@google.com> fix a bunch of problems with destroying surfaces.

now, all destruction path, go through the purgatory which is emptied when ~ISurface is called, but we also make sure to remove the surface from the current list from there (in case a client forgot to request the destruction explicitely).
i/ISurfaceComposer.h
f446ba9dcb7df59f886be2f15d83ed3814a556f7 04-Jun-2009 Mathias Agopian <mathias@google.com> rename a few files to camel-case, add copyright notices
tils/BackupHelpers.h
tils/backup_helpers.h
6457359fa5df7869d5881acee80b34dfc760a5bf 01-Jun-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
c6a5a5183b2a3b42285aba68b1c76291ac569a91 01-Jun-2009 Mathias Agopian <mathias@google.com> move utils/Pipe.h to the simulator
tils/Pipe.h
294423e148c62b413788945be00cedde3cb3acec 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of TimerProbe which is never used
tils/TimerProbe.h
1bc9c93faff43eeffe61fc371674159da83f1690 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of sleepForInterval() which didn't seem to be used anywhere in the source tree. Also get rid of ported.h which seem to be used only (possibly) in the sim. moved the implementation there.
tils/Timers.h
tils/ported.h
e0c322049ab2be291c1fc40f79702543d4e77934 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of utils.h
i/EventHub.h
tils.h
tils/misc.h
d07f2a523f43051a681683657f7c0da2c49f46a4 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of utils/executablepath.h, which now lives in the simulator
tils/executablepath.h
e839d826804b36b86839cb4c080f2541e9977438 31-May-2009 Mathias Agopian <mathias@google.com> merge master to master_gl
8ae930e70693e6117d1f45c9958ec2700845f919 30-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 11b1675a: Merge change 2626 into donut

Merge commit '11b1675a9348adabd9370ac01ae9c614ca4af384'

* commit '11b1675a9348adabd9370ac01ae9c614ca4af384':
Adding TTS error code to signal missing resources (for instance missing language files).
0669fbb12a89c80b4cbb64e91fd3110c2965a20f 28-May-2009 Mathias Agopian <mathias@google.com> force explicit instantiation of Singleton<> objects
tils/Singleton.h
8d336f9ab9ff4420d8885b9591722ab4695fe5b8 28-May-2009 Jean-Michel Trivi <jmtrivi@google.com> Adding TTS error code to signal missing resources (for instance missing language files).
ts/TtsEngine.h
bed9dd128dfbdc7d9dbca005078536dadc0b9359 28-May-2009 Mathias Agopian <mathias@google.com> make sure the Region code disallows constructs like "(a+b)=c;", which is somewhat meaningless.
i/Region.h
4b8160fdfd3281d1d66c0cae9bb9c647b4333491 28-May-2009 Mathias Agopian <mathias@google.com> oops forgot these changes in the previous merge. fixes build
i/Rect.h
723ec00af46d1f95d69fe5af53e0a5d09f01a7d6 27-May-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master

Conflicts:
include/ui/Rect.h
libs/ui/ISurfaceComposer.cpp
2787dddcd0a814aa4a90b9e8cc72c9c258c94854 27-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 0c0ad39c: Merge change 2502 into donut

Merge commit '0c0ad39cd8eaa6de6b7f99cec3971bcc953461e0'

* commit '0c0ad39cd8eaa6de6b7f99cec3971bcc953461e0':
minor clean-up to Rect and Point.
35801cea5f301c0e1d7a93b15a8f73f98e6b1033 27-May-2009 Mathias Agopian <mathias@google.com> minor clean-up to Rect and Point.

- return "const" objects for overloaded operators to disallow constructs like: (a+b) = c;
- don't return references to non-static members, it's not always safe.
- Point.cpp was empty, so get rid of it
i/Point.h
i/Rect.h
83c0446f27b9542d6c2e724817b2b2d8d1f55085 23-May-2009 Mathias Agopian <mathias@google.com> some work to try to reduce the code size of some native libraries

- make sure that all binder Bn classes define a ctor and dtor in their respective library.
This avoids duplication of the ctor/dtor in libraries where these objects are instantiated.
This is also cleaner, should we want these ctor/dtor to do something one day.

- same change as above for some Bp classes and various other non-binder classes

- moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere.

- improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere

- IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16

- implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called.
The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
inder/Binder.h
inder/BpBinder.h
inder/IBinder.h
inder/IInterface.h
inder/IMemory.h
inder/MemoryDealer.h
inder/Parcel.h
tils/TextOutput.h
tils/Timers.h
tils/threads.h
310f8da0c3122ed5419db8f12a6e98d3188325b2 22-May-2009 Mathias Agopian <mathias@google.com> merge master to master_gl
9c954caf4ffefe1a919e0da16990010322e07d6b 22-May-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 2260

* changes:
change 2115 wasn't merged properly into master. this fixes that.
a47f02afb1e1f2c4abd9379c13903a5dde89d354 22-May-2009 Mathias Agopian <mathias@google.com> change 2115 wasn't merged properly into master. this fixes that.

Merge change 2115 into donut

* changes:
bring the native_handle stuff back from master_gl

Conflicts:

libs/binder/Parcel.cpp
inder/Parcel.h
9cbc6a7542b9394242be71312c69011ad06fafea 22-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 384bfa27: Merge change 2227 into donut

Merge commit '384bfa270cdcb5dc3bc9ec396b783e25eb2d9b4d'

* commit '384bfa270cdcb5dc3bc9ec396b783e25eb2d9b4d':
Add header declaring the interface for TTS engines to implement.
c7104572aa99fe640d381f35294737270b74047f 22-May-2009 Jean-Michel Trivi <jmtrivi@google.com> Add header declaring the interface for TTS engines to implement.
ts/TtsEngine.h
53f6f3c7998fca1a7e1eb277d0ee0fc556be3f35 20-May-2009 Mathias Agopian <mathias@google.com> bring the native_handle stuff back from master_gl
tils/Parcel.h
c5b2c0bf8007562536b822eb060fc54a01f8e08b 20-May-2009 Mathias Agopian <mathias@google.com> move libbinder's header files under includes/binder
inder/Binder.h
inder/BpBinder.h
inder/IBinder.h
inder/IInterface.h
inder/IMemory.h
inder/IPCThreadState.h
inder/IPermissionController.h
inder/IServiceManager.h
inder/MemoryBase.h
inder/MemoryDealer.h
inder/MemoryHeapBase.h
inder/MemoryHeapPmem.h
inder/Parcel.h
inder/ProcessState.h
rivate/binder/Static.h
rivate/utils/Static.h
i/CameraHardwareInterface.h
i/ICamera.h
i/ICameraClient.h
i/ICameraService.h
i/IOverlay.h
i/ISurface.h
i/ISurfaceComposer.h
i/ISurfaceFlingerClient.h
i/Overlay.h
i/Region.h
tils/Binder.h
tils/BpBinder.h
tils/IBinder.h
tils/IInterface.h
tils/IMemory.h
tils/IPCThreadState.h
tils/IPermissionController.h
tils/IServiceManager.h
tils/MemoryBase.h
tils/MemoryDealer.h
tils/MemoryHeapBase.h
tils/MemoryHeapPmem.h
tils/Parcel.h
tils/ProcessState.h
208059f67ed2dd9fa025e07fcb6954d3cb61c79e 19-May-2009 Mathias Agopian <mathias@google.com> checkpoint: split libutils into libutils + libbinder
rivate/binder/Static.h
rivate/binder/binder_module.h
rivate/utils/Static.h
rivate/utils/binder_module.h
473b6e2d2de9f204e020c87b63a4e9b665641f45 19-May-2009 Joe Onorato <joeo@android.com> Hook up the backup data writer, and add a utility to read the backup data files.
tils/backup_helpers.h
7a5798596271cfe43a2cb8383ba9abda55ea9a7f 19-May-2009 Dianne Hackborn <hackbod@google.com> Update aapt badging for native code, configs, density, etc.
tils/AssetManager.h
20f68782a4ea71c6a977d7f87d8288d3daa265ec 11-May-2009 Mathias Agopian <mathias@google.com> Region now has its own implementation instead of relying on SkRegion, which allows us to break libui's dependency on libcorecg.
rivate/ui/RegionHelper.h
i/Rect.h
i/Region.h
ac2dda7e0e99917f40a771a92390f73a5da7c89e 16-May-2009 Mathias Agopian <mathias@google.com> Merge branch '2514' into merge_master
d502f05c6b355a0520781e6609dc8a2a5ce89f9e 16-May-2009 Joe Onorato <joeo@android.com> Add the backup data file writer C++ class.
tils/backup_helpers.h
8d626d6a48871fdb62b8adeea98e1299eca61184 15-May-2009 Joe Onorato <joeo@android.com> Implement the C++ class to write the backed up file data.
tils/ByteOrder.h
tils/backup_helpers.h
d717598616910b5454b56429dec3bfad2757bd52 15-May-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master

Conflicts:
opengl/libagl/Android.mk
opengl/libs/Android.mk
opengl/libs/egl_impl.h
c7bbc69ed501a7d194c1cbb9c41e2681d3004bd9 14-May-2009 Joe Onorato <joeo@android.com> Get the backup calling through to the file backup helper.

This includes some cleanup to make the parameters match
between BackupService.onBackup and FileBackupHelper.performBackup.
tils/backup_helpers.h
93b94584edb1c59037319d9bbf84881ccff9f66a 08-May-2009 Dave Sparks <davidsparks@android.com> Modify camera framework to use new streamlined binder interface.
This is the second half of bug 1837832. Modifies the camera client
and camera service to use the new binder interface. Removes the
old binder interface. There will be one more part to this change
to surface the undefined callbacks to the Java layer so that
partners can implement new features without having to touch the
stack.
i/Camera.h
i/ICameraClient.h
5958661507b39cd59e68e9bc2b54399af92847c4 08-May-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
2a98fb9fb1eda1f18cf1555634a7c33f3147234c 06-May-2009 Joe Onorato <joeo@android.com> fix the sim build. disables the tests for now.
tils/backup_helpers.h
031af5ad8642782876630984b7cb29a548fec180 08-May-2009 The Android Open Source Project <initial-contribution@android.com> am 3fd7e13: Merge branch \'donut\' of ssh://android-git.corp.google.com:29

Merge commit '3fd7e13960c2763225c5c8bc187bd15da04820dd'

* commit '3fd7e13960c2763225c5c8bc187bd15da04820dd':
Add new binder methods to camera client to support generic callbacks
15e3747012fb2dc1b2656b0c7c8812c5bc3c6e31 08-May-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
1e16b13857809eaa9bd17fb60ac0a471dc92844b 08-May-2009 Mathias Agopian <mathias@google.com> add support for update-on-demand in SurfaceFlinger
i/FramebufferNativeWindow.h
9b35233ea511eab24aa15de5dc2e94b6f8ed081d 07-May-2009 Dave Sparks <davidsparks@android.com> Add new binder methods to camera client to support generic callbacks
This is the first step in a multi-step change to move from the old
specific callbacks to a generic callback. This will allow future
flexibility in the interface without requiring binder rewrites.
Bug 1837832
i/Camera.h
i/ICameraClient.h
081b070f6ffc938ec1582916edf3e019eac36ebf 06-May-2009 Joe Onorato <joeo@android.com> fix the sim build. disables the tests for now.
tils/backup_helpers.h
aa8c0ff7a36b4840dcf3e72c9696b86d192c4314 06-May-2009 Mathias Agopian <mathias@google.com> get rid off unneeded flags
i/egl/android_natives.h
58a79f47457e9cae2f6880653b581fe3170b0b1f 06-May-2009 Mathias Agopian <mathias@google.com> move android_native_buffer_t declaration into its own private/ui/android_native_priv.h header, since user code should never have access to it.
rivate/ui/SurfaceBuffer.h
rivate/ui/android_natives_priv.h
i/egl/android_natives.h
7189c0054e29a66d945f5657c48d5ecf538ea511 06-May-2009 Mathias Agopian <mathias@google.com> move opengl/include/EGL/android_natives.h to include/ui/egl/android_natives.h and don't include it from egl.h

the android_native_ types are just forward declared in egl.h
rivate/ui/SurfaceBuffer.h
i/FramebufferNativeWindow.h
i/ISurface.h
i/Surface.h
i/egl/android_natives.h
0c4863b2669867cfc76ea9b50ea3f9b1fecfb9a4 05-May-2009 Joe Onorato <joeo@android.com> Add some C++ code to do raw files for backup
tils/backup_helpers.h
21c59d0070fe24a8e04e52ce04d511a924a9932f 05-May-2009 Mathias Agopian <mathias@google.com> get rid of android_native_buffer_t::getHandle() and replace it with an handle field

this abstraction was not necessary. things are easier now.
i/FramebufferNativeWindow.h
i/Surface.h
e71212ba5397387100a578d23b15862518a7a859 05-May-2009 Mathias Agopian <mathias@google.com> removed the "bits" attribute from android_native_buffer_t.

"bits" can never be trusted now that we need to call lock() on the handle to get the virtual address of the buffer.
i/Surface.h
b2dd686d06a608ee40285b93bc0217cf26c2b035 05-May-2009 Mathias Agopian <mathias@google.com> minor clean-up in FramebufferNativeWindow
i/FramebufferNativeWindow.h
0926f50664c739eaee60341f8e8c694dc9a4f3eb 04-May-2009 Mathias Agopian <mathias@google.com> update surfaceflinger, libui and libagl to the new gralloc api

- Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually.
- factor all the lock/unlock code in SurfaceBuffer.
- fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers().
- improved the situation with the dirty-region and fixed a problem that caused GL apps to not update.
- make use of LightRefBase() where needed, instead of duplicating its implementation
- add LightRefBase::getStrongCount()
- renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp

- disabled copybits test, since it clashes with the new gralloc api

- Camera/Video will be fixed later when we rework the overlay apis
i/BufferMapper.h
i/EGLDisplaySurface.h
i/EGLNativeWindowSurface.h
i/FramebufferNativeWindow.h
i/Region.h
i/Surface.h
tils/RefBase.h
7be3e5d2d8101a8f5e12bbdf650431a734f88eba 30-Apr-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master

Conflicts:
libs/surfaceflinger/Layer.cpp
libs/surfaceflinger/SurfaceFlinger.cpp
opengl/libagl/egl.cpp
opengl/libs/EGL/egl.cpp
opengl/libs/GLES_CM/gl.cpp
opengl/libs/GLES_CM/gl_api.in
opengl/libs/gl_entries.in
opengl/libs/tools/glapigen
cbb0d628438809163e52ec28b40c32eb82c5a233 28-Apr-2009 Mathias Agopian <mathias@google.com> improvements (I hope) to to List.h implementation:

- made the helper Node and Iterator classes protected inner classes of List so they don't pollute the android namespace.
- use "int foo()" instead of "int foo(void)" which is more C++ stylish
- made distance() a template function, this way we write it once and it will work with combinations of iterator and const_iterator
- added the inline keyword on some function to make it clear to the compiler and the programmer that we want/intend these to be small inline functions
- added templated comparison operators to Iterator so it can compare iterator and const_iterator
- use size_t instead of "unsigned int" at places
- distance() should return a ptrdiff_t (it's kind of mening less here because it won't really work if the distance is < 0)
- made sure we handle conversions from iterator to const_iterator, but but fail at compile time in the other direction
- added operator->() on iterator and const_iterator
- made a bunch of private constructors explicit to avoid unwanted conversions
tils/List.h
0ad270386ca4a62c41cddf84a3fe350e80965eaa 28-Apr-2009 Mathias Agopian <mathias@google.com> small fix to List.h, the post-increment iterators should return "const" objects to disallow constructs such as i++++
tils/List.h
d2dc9ac87bbdbbe465a0a07b63843282fb28eee7 27-Apr-2009 James Dong <jdong@google.com> Bug fix(1807910): media recorder crash due to the use of locked camera object (last part)
- remove an unused Camera constructor
- add a check on the argument in Camera::create() method
i/Camera.h
9d206fa56f77ae6c32bf5144db4f95b0a6cfcb62 27-Apr-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 376 into donut

* changes:
Add support for changing a threads scheduler group. Three groups are available (default, background non interactive, foreground boost). Setting a thread priority to PRIORITY_BACKGROUND will transparently change groups to background
046cda49f94d87b31553a6f34109a59e8e7a2994 21-Apr-2009 San Mehat <san@google.com> Add support for changing a threads scheduler group. Three groups are available (default, background non interactive, foreground boost). Setting a thread priority to PRIORITY_BACKGROUND will transparently change groups to background

Signed-off-by: San Mehat <san@google.com>
tils/threads.h
f1d8e87b09abf963cd5b6a026194c1940fadb7b4 21-Apr-2009 Mathias Agopian <mathias@google.com> a brand new MessageQueue for SurfaceFlinger.
rivate/ui/SurfaceFlingerSynchro.h
tils/MemoryDealer.h
9f88afb013a7560bf1362d7999a4609e38d0ea77 17-Apr-2009 Mathias Agopian <mathias@google.com> Squashed commit of the following:

commit e5c24638f98162c3b75b4c67a16b510d38e31341
Author: Mathias Agopian <mathias@google.com>
Date: Fri Apr 17 14:09:03 2009 -0700

oops forgot this file.

commit 282642632d0cb12882eecf42e0fdfb2343275de1
Author: Mathias Agopian <mathias@google.com>
Date: Fri Apr 17 14:07:32 2009 -0700

use a helper macro for creating Singleton<>'s static attributes instances.
tils/Singleton.h
972d985b7f72f870a11ce3ae46ed9a26162f4064 24-Apr-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 509 into donut

* changes:
Fix a media server crash (bug 1807910): part one Add a factory method that creates a Camera object from a remote client
f1a5314076248a352915ae1a987725ae76cc8a22 23-Apr-2009 James Dong <jdong@google.com> Fix a media server crash (bug 1807910): part one
Add a factory method that creates a Camera object from a remote client

Next:
The changes in authordriver.cpp and android_camera_input.cpp will come.
and the constructor for Camera object will be removed.
i/Camera.h
fd392958eac8813575c29aa733a5a1ec4f655279 22-Apr-2009 Robert Greenwalt <robdroid@android.com> Squashed commit of the following:

commit 012b56fc607cf243cf4b29cb2a5f172bcbe0aecd
Author: Robert Greenwalt <robdroid@android.com>
Date: Wed Apr 22 14:31:26 2009 -0700

Additional fixes and tests for density.

commit 91fdc8e187551ae69e0029a4325fb3ad38fe411b
Author: Robert Greenwalt <robdroid@android.com>
Date: Tue Apr 14 14:39:00 2009 -0700

Fix runtime resource selection logic.

Fix isBetterThan so that o or this may be supperior at any stage.
Used to only handle this-better or tie at each stage, biasing against o.
Also allows reset of unit test to succeed. Fixes bug 1709202.
tils/ResourceTypes.h
18d8446fe1596cd50561777e1d1a8c7b39c689f6 17-Apr-2009 Mathias Agopian <mathias@google.com> cleanup, remove unused fields. Also make sure that we don't systematically allocate a Surface in Surface.java if only a SurfaceControl is needed (Common case).
i/Surface.h
01b766839e06c32540cef100e3a7710d12cf1eef 17-Apr-2009 Mathias Agopian <mathias@google.com> more splitting of Surface/SurfaceControl. Surface.java is now implemented in terms of Surface and SurfaceControl.

The WindowManager side of Surface.java holds a SurfaceControl, while the client-side holds a Surface. When the client is in the system process, Surface.java holds both (which is a problem we'll try to fix later).
i/Surface.h
i/SurfaceComposerClient.h
62185b7335e85211dc4d0e2003354eb3ea2e66ef 17-Apr-2009 Mathias Agopian <mathias@google.com> split Surface.cpp into Surface and SurfaceControl

SurfaceControl is used for controling the geometry of the surface (for the WM), while Surface is used to access the buffers (for SF's clients).
SurfaceFlingerClient now uses the SurfaceID instead of Surface*.

Currently Surface still has the SurfaceControl API and is implemented by calling into SurfaceControl.
i/Surface.h
i/SurfaceComposerClient.h
40b7f6e0433b89c27b2fe5a1c0c47f67b42eceb2 15-Apr-2009 Mathias Agopian <mathias@google.com> fix some issues with Surface's lifetime management.

To deal with Java's lack of destructors and delayed garbage collection, we used to duplicate Surface.cpp objects in some case; this caused some issues because Surface is supposed to be reference-counted and unique.
i/Surface.h
4243e666213029a293935987c979831093fb0779 16-Apr-2009 Mathias Agopian <mathias@google.com> fix a rookie mistake causing Singleton<> to be a "multiton". Also improve the BufferMapper's debugging, but turn it off.

Squashed commit of the following:

commit 04e9cae7f806bd65f2cfe35c011b47a36773bbe5
Author: Mathias Agopian <mathias@google.com>
Date: Wed Apr 15 18:30:30 2009 -0700

fix and improve BufferMapper's tracking of mapped buffers.

commit 1a8deaed15811092b2349cc3c40cafb5f722046c
Author: Mathias Agopian <mathias@google.com>
Date: Wed Apr 15 00:52:02 2009 -0700

fix some bugs with the Singleton<> class. untested.

commit ed01cc06ad70cf640ce1258f01189cb1a96fd3a8
Author: Mathias Agopian <mathias@google.com>
Date: Tue Apr 14 19:29:25 2009 -0700

some work to debug the Singleton<> template.
i/BufferMapper.h
tils/Singleton.h
83d184a299dd80911169a89e352dc3b33b9650fc 14-Apr-2009 Mathias Agopian <mathias@google.com> Merge commit 'goog/master' into merge_master
2f6d8816871519a88cb0ed3bf4861e153f5031e0 14-Apr-2009 Dianne Hackborn <> AI 145994: Integrate #145778 from Donut.

Automated import of CL 145994
i/KeycodeLabels.h
8b765b7f5ea7f56963ea0e3141d043d20944dbcc 11-Apr-2009 Mathias Agopian <mathias@google.com> more debugging tools around BufferMapper
i/BufferMapper.h
2b2fb1a69394edd58666b89597c560442ccc3a90 11-Apr-2009 Mathias Agopian <mathias@google.com> fix KeyedVector::replaceValueAt, which wouldn't even compile if used.
tils/KeyedVector.h
bc0caf802e5eb08b6565bbe3a535cb2fca826d8b 11-Apr-2009 Andy Stadler <> AI 145778: Manual merge changes 145382-145384 from cupcake.

Automated import of CL 145778
i/KeycodeLabels.h
076b1cc3a9b90aa5b381a1ed268ca0b548444c9b 10-Apr-2009 Mathias Agopian <mathias@google.com> Integrate from //sandbox/mathias/donut/...@145728

SurfaceFlinger rework for new EGL driver model support.
rivate/opengles/gl_context.h
rivate/ui/SharedState.h
i/BufferMapper.h
i/EGLNativeWindowSurface.h
i/ISurface.h
i/ISurfaceComposer.h
i/ISurfaceFlingerClient.h
i/PixelFormat.h
i/Surface.h
i/SurfaceComposerClient.h
tils/Parcel.h
tils/Singleton.h
c08731e756868653d09d3e49b723706df3687070 28-Mar-2009 Mathias Agopian <> AI 143320: am: CL 143171 am: CL 142873 fix [1732012] Only show screen rotation animation when triggered by sensor
Original author: mathias
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...

Automated import of CL 143320
i/ISurfaceComposer.h
i/SurfaceComposerClient.h
24fd77d44088011c88c55a5de459e75792bb2ecb 28-Mar-2009 Mathias Agopian <> AI 143171: am: CL 142873 fix [1732012] Only show screen rotation animation when triggered by sensor
Original author: mathias
Merged from: //branches/cupcake/...

Automated import of CL 143171
i/ISurfaceComposer.h
i/SurfaceComposerClient.h
4f68be1a5b53f690f1a7d8ba62cddb5ef0022a96 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
tils/ResourceTypes.h
9adf84a4b6735354893ff1e57c129f66d97d75ee 05-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136594
i/ICameraService.h
tils/threads.h
edbf3b6af777b721cd2a1ef461947e51e88241e1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
im/EventRecurrence.h
rivate/opengles/gl_context.h
rivate/ui/LayerState.h
rivate/ui/SharedState.h
rivate/ui/SurfaceFlingerSynchro.h
rivate/utils/Static.h
rivate/utils/binder_module.h
rivate/utils/futex_synchro.h
i/Camera.h
i/CameraHardwareInterface.h
i/CameraParameters.h
i/DisplayInfo.h
i/EGLDisplaySurface.h
i/EGLNativeSurface.h
i/EGLNativeWindowSurface.h
i/EventHub.h
i/ICamera.h
i/ICameraClient.h
i/ICameraService.h
i/IOverlay.h
i/ISurface.h
i/ISurfaceComposer.h
i/ISurfaceFlingerClient.h
i/KeyCharacterMap.h
i/KeycodeLabels.h
i/Overlay.h
i/PixelFormat.h
i/Point.h
i/Rect.h
i/Region.h
i/Surface.h
i/SurfaceComposerClient.h
tils.h
tils/AndroidUnicode.h
tils/Asset.h
tils/AssetDir.h
tils/AssetManager.h
tils/Atomic.h
tils/Binder.h
tils/BpBinder.h
tils/Buffer.h
tils/BufferedTextOutput.h
tils/ByteOrder.h
tils/CallStack.h
tils/Debug.h
tils/Endian.h
tils/Errors.h
tils/FileMap.h
tils/IBinder.h
tils/IInterface.h
tils/IMemory.h
tils/IPCThreadState.h
tils/IPermissionController.h
tils/IServiceManager.h
tils/KeyedVector.h
tils/List.h
tils/Log.h
tils/LogSocket.h
tils/MemoryBase.h
tils/MemoryDealer.h
tils/MemoryHeapBase.h
tils/MemoryHeapPmem.h
tils/Parcel.h
tils/Pipe.h
tils/ProcessState.h
tils/RefBase.h
tils/ResourceTypes.h
tils/SharedBuffer.h
tils/Socket.h
tils/SortedVector.h
tils/StopWatch.h
tils/String16.h
tils/String8.h
tils/SystemClock.h
tils/TextOutput.h
tils/TimeUtils.h
tils/TimerProbe.h
tils/Timers.h
tils/TypeHelpers.h
tils/Vector.h
tils/VectorImpl.h
tils/ZipEntry.h
tils/ZipFile.h
tils/ZipFileCRO.h
tils/ZipFileRO.h
tils/ZipUtils.h
tils/ashmem.h
tils/executablepath.h
tils/inet_address.h
tils/misc.h
tils/ported.h
tils/string_array.h
tils/threads.h
d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
im/EventRecurrence.h
rivate/opengles/gl_context.h
rivate/ui/LayerState.h
rivate/ui/SharedState.h
rivate/ui/SurfaceFlingerSynchro.h
rivate/utils/Static.h
rivate/utils/binder_module.h
rivate/utils/futex_synchro.h
i/Camera.h
i/CameraHardwareInterface.h
i/CameraParameters.h
i/DisplayInfo.h
i/EGLDisplaySurface.h
i/EGLNativeSurface.h
i/EGLNativeWindowSurface.h
i/EventHub.h
i/ICamera.h
i/ICameraClient.h
i/ICameraService.h
i/IOverlay.h
i/ISurface.h
i/ISurfaceComposer.h
i/ISurfaceFlingerClient.h
i/KeyCharacterMap.h
i/KeycodeLabels.h
i/Overlay.h
i/PixelFormat.h
i/Point.h
i/Rect.h
i/Region.h
i/Surface.h
i/SurfaceComposerClient.h
tils.h
tils/AndroidUnicode.h
tils/Asset.h
tils/AssetDir.h
tils/AssetManager.h
tils/Atomic.h
tils/Binder.h
tils/BpBinder.h
tils/Buffer.h
tils/BufferedTextOutput.h
tils/ByteOrder.h
tils/CallStack.h
tils/Debug.h
tils/Endian.h
tils/Errors.h
tils/FileMap.h
tils/IBinder.h
tils/IInterface.h
tils/IMemory.h
tils/IPCThreadState.h
tils/IPermissionController.h
tils/IServiceManager.h
tils/KeyedVector.h
tils/List.h
tils/Log.h
tils/LogSocket.h
tils/MemoryBase.h
tils/MemoryDealer.h
tils/MemoryHeapBase.h
tils/MemoryHeapPmem.h
tils/Parcel.h
tils/Pipe.h
tils/ProcessState.h
tils/RefBase.h
tils/ResourceTypes.h
tils/SharedBuffer.h
tils/Socket.h
tils/SortedVector.h
tils/StopWatch.h
tils/String16.h
tils/String8.h
tils/SystemClock.h
tils/TextOutput.h
tils/TimeUtils.h
tils/TimerProbe.h
tils/Timers.h
tils/TypeHelpers.h
tils/Vector.h
tils/VectorImpl.h
tils/ZipEntry.h
tils/ZipFile.h
tils/ZipFileCRO.h
tils/ZipFileRO.h
tils/ZipUtils.h
tils/ashmem.h
tils/executablepath.h
tils/inet_address.h
tils/misc.h
tils/ported.h
tils/string_array.h
tils/threads.h
43aa2b1cbf7a03e248e10f4d0fec0463257cd52d 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
i/CameraHardwareInterface.h
tils/ResourceTypes.h
0bb03408de8886e8d17013219967d42fb9c8cf8c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
i/CameraHardwareInterface.h
tils/ResourceTypes.h
7222586f99599fb2de31293277b79e8d4a3acdc2 20-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132569
i/KeycodeLabels.h
ac65e0b172b33f7e068c14e3d95678fa20205577 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
i/ISurface.h
tils/logger.h
a6938bab1f6fa76ae98ebbe44f4e534e05fa0993 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
LES/egl.h
LES/eglnatives.h
LES/egltypes.h
LES/gl.h
rivate/opengles/gl_context.h
i/Camera.h
i/CameraHardwareInterface.h
i/CameraParameters.h
i/EGLDisplaySurface.h
i/EGLNativeSurface.h
i/EGLNativeWindowSurface.h
i/EventHub.h
i/ICamera.h
i/ICameraClient.h
i/ISurface.h
i/Overlay.h
i/PixelFormat.h
tils/Asset.h
tils/ResourceTypes.h
5f78a48bb8f7714ee231fca67d60fad77bc1cad9 20-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127101
i/Overlay.h
tils/Parcel.h
8a7a67538a9977c892389bfcde76a8372aa0b56c 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
rivate/opengles/gl_context.h
i/EventHub.h
i/Overlay.h
i/Surface.h
i/SurfaceComposerClient.h
276293246ea9cbc0a578a7697cc48930376ec0e9 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
i/Camera.h
i/CameraHardwareInterface.h
i/EGLNativeSurface.h
i/ICamera.h
i/IOverlay.h
i/ISurface.h
i/Overlay.h
i/PixelFormat.h
i/Region.h
tils/MemoryHeapBase.h
tils/RefBase.h
e09fd9e819c23dc90bca68375645e15544861330 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
LES/eglnatives.h
rivate/opengles/gl_context.h
i/BlitHardware.h
i/Camera.h
i/CameraHardwareInterface.h
i/EGLDisplaySurface.h
i/ICamera.h
i/IOverlay.h
i/ISurface.h
i/ISurfaceFlingerClient.h
i/KeycodeLabels.h
i/Overlay.h
i/PixelFormat.h
i/Region.h
i/Surface.h
tils/IPCThreadState.h
tils/MemoryHeapPmem.h
tils/ResourceTypes.h
tils/TimeUtils.h
tils/string_array.h
7c1b96a165f970a09ed239bb4fb3f1b0d8f2a407 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
LES/egl.h
LES/eglnatives.h
LES/egltypes.h
LES/gl.h
im/EventRecurrence.h
rivate/opengles/gl_context.h
rivate/ui/LayerState.h
rivate/ui/SharedState.h
rivate/ui/SurfaceFlingerSynchro.h
rivate/utils/Static.h
rivate/utils/binder_module.h
rivate/utils/futex_synchro.h
i/BlitHardware.h
i/Camera.h
i/CameraHardwareInterface.h
i/CameraParameters.h
i/DisplayInfo.h
i/EGLDisplaySurface.h
i/EGLNativeSurface.h
i/EGLNativeWindowSurface.h
i/EventHub.h
i/ICamera.h
i/ICameraClient.h
i/ICameraService.h
i/ISurface.h
i/ISurfaceComposer.h
i/ISurfaceFlingerClient.h
i/KeyCharacterMap.h
i/KeycodeLabels.h
i/PixelFormat.h
i/Point.h
i/Rect.h
i/Region.h
i/Surface.h
i/SurfaceComposerClient.h
tils.h
tils/AndroidUnicode.h
tils/Asset.h
tils/AssetDir.h
tils/AssetManager.h
tils/Atomic.h
tils/Binder.h
tils/BpBinder.h
tils/Buffer.h
tils/BufferedTextOutput.h
tils/ByteOrder.h
tils/CallStack.h
tils/Debug.h
tils/Endian.h
tils/Errors.h
tils/FileMap.h
tils/IBinder.h
tils/IInterface.h
tils/IMemory.h
tils/IPCThreadState.h
tils/IPermissionController.h
tils/IServiceManager.h
tils/KeyedVector.h
tils/List.h
tils/Log.h
tils/LogSocket.h
tils/MemoryBase.h
tils/MemoryDealer.h
tils/MemoryHeapBase.h
tils/MemoryHeapPmem.h
tils/Parcel.h
tils/Pipe.h
tils/ProcessState.h
tils/RefBase.h
tils/ResourceTypes.h
tils/SharedBuffer.h
tils/Socket.h
tils/SortedVector.h
tils/StopWatch.h
tils/String16.h
tils/String8.h
tils/SystemClock.h
tils/TextOutput.h
tils/TimeUtils.h
tils/TimerProbe.h
tils/Timers.h
tils/TypeHelpers.h
tils/Vector.h
tils/VectorImpl.h
tils/ZipEntry.h
tils/ZipFile.h
tils/ZipFileCRO.h
tils/ZipFileRO.h
tils/ZipUtils.h
tils/ashmem.h
tils/executablepath.h
tils/inet_address.h
tils/logger.h
tils/misc.h
tils/ported.h
tils/string_array.h
tils/threads.h