frameworks/base: Assorted build fixes

Assorted build fixes for gcc 4.6 and -DNDEBUG

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Disable hardware rendering for now

Disable hardware rendering for now - let's get a build
with software rendering using purely free stuff going
first...

Author: Vishal Bhoj <Vishal.Bhoj@linaro.org>
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkraenzer@linaro.org>
aapt: update interfaces to libpng 1.5.7 beta 01

Libpng 1.5.7 beta 01 is integrated, where some interfaces are
changed and some structures are not visible to libpng clients
any more. The structure information can be retrieved through
specific interfaces.

The call to png_set_filler() is removed as it can corrupt some png
files. This function was used for libpng 1.2.4, but actually it did
nothing in aapt.

Remove a building warning in ZipFile.h.

Change-Id: I92ca6a2c0d734f9a5187d5a7f6727b8be0e77133
MediaSamplesTest: add test for play various format media files

modify Android.mk to make it be built into images when building
at eng version. The blueprint is below:
https://blueprints.launchpad.net/lava-android-test/+spec/lava-android-test-run-mmtest-in-lava

Change-Id: Ia9b18eff04ee730c33cca85761f8d71d8b9e66c1
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
frameworks/base: Fix aliasing violations

This makes it possible to build the code without
disabling the strict-aliasing optimization in gcc.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix aliasing violations

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
screenshot: Add include path to where png.h can be found

Change-Id: I720b2bb2b939f6d2b879974961b3e5613426b453
libstagefright: Fix aliasing violations

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Stagefright: Fix thumbnail generation crashes

Fixes two crashes that commonly occur when generating thumbnails using
the Vanilla video decoders.

 * In OMXCodec it must be possible for the decoders to return the input
   buffers in an EMPTY_BUFFER_DONE call in case a decoder error has
   occurred. Otherwise an assert will be triggered when OMXCodec goes
   back to OMX_StateIdle (since not all buffers are owned by OMXCodec).

 * In SimpleSoftOMXComponent is must be allowed for a state change from
   OMX_StateIdle to OMX_StateIdle. Otherwise the assert will be
   triggered when the decoder fails to get a frame, error is triggered,
   and two state transitions are put in the message queue since
   OMXNodeInstance may additionally force a transition to state idle in
   the call to freeNode() (while the first state transition message is
   still in the message queue).

Change-Id: Ibc88d3baa640f99537d8950784c05afc5e01c0f5
Signed-off-by: StefanEkenberg <stefan.ekenberg@linaro.org>
Stagefright: Improve parsing in AH263Assembler

Improves the parsing of the H263 payload header in order to support
playback of more H263 contents. This patch removes check of the

 * RR field which must be ignored by receivers (as specified in
   RFC4629).
 * PLEN field and also modifies the parser to remove any present extra
   picture header (PLEN>0) from the bit stream.
 * PEBIT because its value can be ignored since the extra picture
   header is not forwarded to the decoder anyway.

Note that the extra error resilience provided by an extra picture
header (PLEN>0) is still not utilized because of this patch. The patch
only enables the H263 parser to correctly ignore the extra picture
header.

Change-Id: I1781d9f740cb0c5e15a28bc839d8ce39c6c8fcd0
Signed-off-by: StefanEkenberg <stefan.ekenberg@linaro.org>
Revert "frameworks/base: Disable hardware rendering for now"

This reverts commit 4abc51753c40d39701beae07a658ef0364c0c245.
frameworks/base: Fix various aliasing violations

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Stagefright: Provide crop info to native window

Moves the execution of native_window_set_crop() to after the execution
of native_window_set_buffers_geometry(). This is done since otherwise
the cropping information will be cleared by the call to
native_window_set_buffers_geometry() in when it arrives in
SurfaceTextureClient::setBuffersDimension().

Change-Id: I0e9ac4d2d65f82f6138b9e8773b0740da1e951bd
Signed-off-by: StefanEkenberg <stefan.ekenberg@linaro.org>
Revert "Stagefright: Provide crop info to native window"

This reverts commit ea532f064e7ad949d0e31a83911bebc0ef7ab701

Build https://android-build.linaro.org/builds/~linaro-android/staging-panda/#build=140 isn't booting, rolling back.
Revert "Stagefright: Improve parsing in AH263Assembler"

This reverts commit de7c5d2ed830443a05a5b02b96b23b5253ed468f
Revert "Stagefright: Fix thumbnail generation crashes"

This reverts commit 579543928af18e2db155749dc62979120881c2d2
Revert "frameworks/base: Fix various aliasing violations"

This reverts commit e494389d542f755a11a3dab66167efe547170f92
frameworks/base: Disable H/w GL rendering based on property

"ro.nohardwaregfx" can be set to true to have software
rendering.The property could be set for each board by adding
the 2 lines to device.mk file.

PRODUCT_PROPERTY_OVERRIDES += \
            ro.nohardwaregfx=true

Change-Id: I79ee7d98599f6fd632e43ad38cfc546ef73e8c61
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
Fix duplicate onCreate

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Unify branches

This adds the changes from the linaro_android_4.0.3_snowball branch,
surrounded by ifdefs to prevent them from breaking other boards.
This should obsolete the linaro_android_4.0.3_* branches.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Change-Id: I9158b85b4790c8d85947878e1743789b01d4add7