[MIPS] Avoid unaligned load/store for 64-bit doubles.

Change-Id: Iefdcac8742f23fef31f63730b48698fc4205c3ad
Signed-off-by: Douglas Leung <douglas@mips.com>
Add fast TLS forwarders support on x86 to EGL.

These changes fixes support for EGL extensions on underlying drivers.

The code is mostly done by Intel and released in their own repository at
01.org. The repository could be found at
https://android-review.01.org/platform/frameworks/native:

 2a5c9231eb7577d3491403a34c2d37fee12d79d3
 76df8dc3defe7c13eee391d0cb5a80cbb39be1be
 092cb32504ef097f08a10ac6ff429fbddf2c8420

Additional this enables USE_FAST_TLS_KEY on x86 by default.

Signed-off-by: Christian Poetzsch <christian.potzsch@imgtec.com>

Change-Id: I84c3cb95a3a3b79eb5b8b15c2ef4ec45032d5fb5
libutils: Fix type error in Unicode's utf8_length() method.

For Chinese characters, its codes would be larger than 128. So if use
signed char variable to hold these codes, they would be treated as
negative. That may cause some unexpected error.

Take character code 0xE69C88 for example. In this method, first_char
would be 0xE6, when we calculating value utf32 in statement
utf32 |= ((~to_ignore_mask) & first_char) << (6 * (num_to_read - 1));
first_char will be converted to int32_t type. If first_char was define
as singed char, it will be converted to 0xffffffe6, this lead to an
error fo utf32 calculating.

Change-Id: Icf61a898a2a38b8492da0a7ab759e01c15a2d125
Author: Liang Wang <liangx.wang@intel.com>
Signed-off-by: Liang Wang <liangx.wang@intel.com>
Signed-off-by: Bing Deng <bingx.deng@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 41014
[Binder] memory init to avoid valgrind warnings

To avoid a valgrind warning, it is necessary to initialize the
allocated memory in Parcel.cpp This initialization should
avoid also an unpredictable behaviour because 0 is more
appropriate value that a random value from heap.
The issue has been found by valgrind when testing of mediaserver.

Change-Id: I2eb3e3ec7933553256054119019f6ccea6e17fea
Author: Andrei V. FOMITCHEV <andreix.fomitchev@intel.com>
Signed-off-by: Andrei V. FOMITCHEV <andreix.fomitchev@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 61459
data fix toroplus

Kanged from Stevie Gore who Kanged from EOS who Kanged from ??
Signed-off-by: DHO <DHO@dho.im>

Change-Id: I93e1ae615b3115299cda87e6e78f4b5ddd874589
Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event

See b.android.com/55873

Change-Id: I62615987ef85e30420a7e17d4cd5a3be4d9fe3ce
utils: Allow non android namespaces to use ALOGD_IF_SLOW

Change-Id: I6de1d521a2b39d744b4b6f6f4c7fd7075ff183b2
Exit dumpstate on SIGPIPE to avoid cascading child crashes

When dumpstate ignores SIGPIPE it can lead to a cascade of tombstones /
coredumps since many of its children don't handle or ignore it.  It's
best to just exit dumpstate once the pipe is broken.

Change-Id: Id24ef49568d8e40347513a4f2104a3600864ba26