Squashed FML changes.

Fix aliasing violation.

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: Amit Pundir <amit.pundir@linaro.org>

Conflicts:
	core/jni/android_os_FileUtils.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

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

frameworks/base: Fix build in ISO C++11 mode

Change-Id: I5d3ba44cc9faa5826a5a0a6b37c8f0eb2872e1ac
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

hwui: Fix build in ISO C++11 mode

Make sure log calls can't be confused with C++11 string literals

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

More C++11 fixings.

More C++11 fixes. More.

Fix confusion about whether or not output() should be const

It probably should be const, but it isn't on master - let's try to
be closer to next upstream

Change-Id: Id26bf19d94a36d83b57488e8bd8d86fa21e784b2
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Make our own SkRect so skia doesn't need to know what an android::Rect is

Credit to David96 for the inspiration for the fix

Signed-off-by: nuclearmistake <nuclearmistake@gmail.com>
Change-Id: I3233728d8a0a44d085f20729b3c24f197d75741e
Fix use of %llx for sscanf 64 bit values.

Change-Id: Ie7a0e243dfcf24722783fe7d697a1412de7efe68
Add new header to support 32 bit/64 bit dumps.

Bug: 17319589

(cherry picked from commit 0d3c045a0d48193150689e5924bd04c511380a8a)

Change-Id: I79aa035098115de7b02171a9432ff7e9393328ab
Use char16_t for char things.

When compiling in C++ mode, the compiler will complain about conversions
from uint16_t to char16_t. Be consistent in using char16_t for strings.

Change-Id: I052b6176ced635162920b31560052d9a64f92764

Conflicts:
	tools/aapt/ResourceTable.cpp
Don't check for null references.

The address of a reference will never be null in well formed C++ code.
The function returning the value being checked simply returns a
dereferenced pointer (which is just going to segfault if it is null!).

Change-Id: I3a4eb6adfc003c63ebf21b81d46088d52154d99d
Don't pollute the namespace for two uses.

Clang complains about ambiguity between std::hash and ::hash (locally
defined). There's no need to pull in the whole namespace for two uses of
std::map anyway.

Change-Id: Icbaa7ebbaad05999988784ad34662c721fb12b29

Conflicts:
	tools/aapt/ResourceIdCache.cpp
Don't check a staticly allocated array for null.

Change-Id: I5568174f1a9d53078c2169cfd3401e43d88a7643
Clean up test makefiles.

The build system takes care of linking the correct STL and gtest
libraries for you, and specifying them manually confuses the build
system when using libc++.

Change-Id: I9f76ab26a63ace51293614cfb5ca002f37438e02
Clean up makefile cruft.

The build system already takes care of all these things.

Change-Id: Idef80b554e07cef5e5ed2adf1b5740a76f13ef6d

Conflicts:
	libs/hwui/Android.mk
Use constants instead of resources for ellipsis.

All supported locales use only U+2025 and U+2026 to represent
ellipses, and it will unlikely change in future. Given translated
resources are inconsistent and often use three dots it is safer
to use constants instead of resources.

Change-Id: I51a6cb903f62f739fbadd6b78e5765c0028d641a
Frameworks/base: Fix services/jni warnings

Update code for unused variables.

Ignore warnings generated by pulling in Skia.

Change-Id: I5b33c9b003c90bcabcea0761304c4c99cf5e39ec

Conflicts:
	services/jni/com_android_server_ConsumerIrService.cpp
	services/jni/com_android_server_LightsService.cpp
	services/jni/com_android_server_input_InputManagerService.cpp
	services/jni/com_android_server_location_GpsLocationProvider.cpp
Fall back to "tl" if "fil" is absent.

For JB-MR1, there was a hack that used "tl" where
we really meant "fil" because ICU didn't have localizations
for "fil". This has now been fixed, and we now support 3 letter
language codes for AAPT so we can use "fil" where required.

For the benefit of apps that need to target older platforms,
we fall back to "tl" if the app has assets for "tl" and the
resource locale is "fil".

See bugs 7291355, 7207176 and 8049507 for more context.

Change-Id: I1ac8502525f99b40f9091d5efd2df33518d47a41
Fix issue when converting fil->tl.

We should call ResourceTable::getLocales directly,
and not AssetManager::getLocales. The latter will convert
"tl" to "fil" so we'll end up thinking we have resources
for "fil" when we don't really have any.

bug: 15873165

Change-Id: I9753e4608aaecede328a40ee1f3ee6b016d0dedc
Fix C++ 11

Change-Id: I8be629f15612175d8500677c1e6974da70ccc0ee
Revert "Fix use of %llx for sscanf 64 bit values."

This reverts commit 9f627a3acf155deea9611396d4be9b17151d2640.
systemui: Unbreak the planet

 * Not sure who to blame, but it's probably themes... :)

Change-Id: I0c534354a699f756d809aff10843ebea21f3f369
Memory leak in parsePackage

The method parsePackage failes to delete some resources
in case of failures.

Added delete of "package" in the cases that was previously
missed.

Change-Id: I183e9ec5864c5ed18bb48410ab41317cb3d96bda

Conflicts:
	libs/androidfw/ResourceTypes.cpp
Use std::sort instead of qsort_r wrapper.

The HAVE_(BSD|GNU)_QSORT_R in AndroidConfig.h has never worked, and we
should just be using something standard anyway.

Change-Id: I784d6212f6c890a11c4af2f83d1ce2d279708652
Remove MALLOC_LEAK_CHECK references.

Bug: 17378595
Change-Id: Ib9680ef97dfea6bc20d96f0bed90f4553186315c

Conflicts:
	core/jni/Android.mk