frameworks/base: Fix various aliasing violations

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

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

Change-Id: I48df7a328fed01be8412d5449ee0753dad3c101f
StringBlock_nativeCreate: Possible Leak

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

Change-Id: Icbeb8eb3fb78849c043fe032cc8f7050da041042
convert jint to uint32_t.

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

Change-Id: I1c49064bd64c31dafae560e416c665de0449f245
Revert "Possible leak in android_emoji_EmojiFactory_newInstance"

This reverts commit 83fc076bc3373eeaa1195230e5e8fa184270c8c1.
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
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