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

Based on ICS patch from Vishal Bhoj <Vishal.Bhoj@linaro.org>

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

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

Fix violations of strict aliasing rules

Change-Id: Ia83db6a0be18f52e8f274c581c3b42f031b39247
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Fix error when cpufreq is loaded at runtime

Change-Id: I4691bbfbb1a49b130ba4b9a0ed5ded3601e220fc
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix build in ISO C++11 mode

Fix various incompatibilities with ISO C++11:
- Assumption that char16_t is defined to uint16_t
- constexpr usage
- macro constructs that could be interpreted as string literals
- enum typesafety

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

Conflicts:
	cmds/stagefright/SineSource.h
	core/jni/android/graphics/TextLayoutCache.cpp
	core/jni/android_util_Binder.cpp
	core/jni/android_view_KeyCharacterMap.cpp
	libs/gui/SurfaceTexture.cpp
	media/libstagefright/OMXCodec.cpp
	services/audioflinger/AudioResampler.h

Change-Id: I185b97f07e89bed93b92546bc0fdf895bd0cc92d

Conflicts:
	core/jni/android_emoji_EmojiFactory.cpp
base: Fix build after Parcel ABI fix in Binder

Adapt code to the fact that writeString16's first parameter
is now an uint16_t* to match the old ABI

Change-Id: I138af645c877f343f0490152b9702698b7d36582
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix compile errors

Fix ISO C++11 incompatibility in TextLayoutCache and
aliasing violation in FontRenderer

Change-Id: I19a9560737005e72f706c12c0ccfdcd0c7765b06
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Possible leak in android_emoji_EmojiFactory_newInstance

jchars is not released correctly if factory is NULL.
In addition, unnecessary string conversion removed.

Change-Id: I3ea58391dfe7a96ea6d6ae61bb0867a2d8d49fb0

Conflicts:
	core/jni/android_emoji_EmojiFactory.cpp
Another optimization of glyph cache uploads

Previously, cache textures were updated whenever mCurrentCacheTexuture was changed.
Since updating cache textures needs glTexSubImage2D call, frequent changing
of mCurrentCacheTexture (which can easily happen when an app uses lots of unique glyphs
even with precaching) caused many glTexSubImage2D calls and bad framerates.
This patch optimized isssueDrawCommand function. Consequently, changing mCurrentCacheTexture doesn't
cause glTexSubImage2D call any more and it will improve font rendering performance.

Change-Id: Id19d959fa0e69eeb2a39f83a57e311d7394586b2
Signed-off-by: Sangkyu Lee <geteuid@gmail.com>
fix potential memory leak

use delete before return

Change-Id: I5449ad90bb6910f057bd825b722c9803a7343c34
StringBlock_nativeCreate: Possible Leak

osb can be leaked when osb->getError() != NO_ERROR

Change-Id: Icbeb8eb3fb78849c043fe032cc8f7050da041042
Leak in ToneGenerator_native_setup

Failure in ToneGenerator::isInit causes a leak.
lpToneGen should be deleted.

Change-Id: I48df7a328fed01be8412d5449ee0753dad3c101f
convert jint to uint32_t.

This works around a compiler bug, and is probably more
correct anyway.

Change-Id: I1c49064bd64c31dafae560e416c665de0449f245
Fix autorotation sensor loop being reactivated even when off

The sensor loop was reactivated even if turned off after a wake up
=> consider it disabled also if !mEnabled
+ turn debug mode on in case there's another issue.

Since the current autorotation sensor loop is generating 3-4% cpu eating,
we really need a way to turn it off for good for the moment.
System_server now seems to stay at 0.0% cpu with this change & autorotation off on TF101

Change-Id: I5ed3c95809f6d789222819466dacc625ac2d9f1d
Revert "fix potential memory leak"

This reverts commit bc268b9014f211910e412a7fda96b6394ff2badc

Change-Id: I07f49bd0cfecc43bc761d2b0635c9915a8e30272
fix potential memory leak

use fclose() before return.

Change-Id: I3ed193464cc0dc90e9935ae19162667ad367628b
Fix leak in videoEditor_renderMediaItemPreviewFrame

This change makes sure that the pString is released
even if any of the error paths are taken later.

Change-Id: I533f8254cb853767a21571cddb1c130f8efde2b4
Remove possible leak in AudioGroup.cpp

Change-Id: I4d1c16d91fe069ff9cbdc6b4f33651ee5e57fd2d
Signed-off-by: You Kim <you.kim72@gmail.com>
Fixed a leaked partial wakelock in AbstractThreadedSyncAdapter.

This fix ensures that onFinished() is always called in a syncClient
even if the application lacks the READ_SYNC_SETTINGS permission.

Change-Id: I944717e71ceae06a665f8a3b1199b41d73e12da4
Remove possible leak when exception occurred.

nameUtf8 is not released after exception.
In addtion, Fix code going down after ThrowException.

Change-Id: Id46e8ed55acd98e982ae532f7da2c0c48847f010