Fix aliasing and C++11 issues.

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>

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>
Signed-off-by: Evan McClain <aeroevan@gmail.com>

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
	core/jni/android_server_BluetoothEventLoop.cpp

Change-Id: I185b97f07e89bed93b92546bc0fdf895bd0cc92d

Conflicts:

	core/jni/android/graphics/TextLayoutCache.cpp
	core/jni/android/graphics/TextLayoutCache.h
	core/jni/android_os_FileUtils.cpp
	core/jni/android_server_BluetoothEventLoop.cpp
	core/jni/android_view_Surface.cpp

Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>
Change-Id: If0a59e0bd6a89025dd7e0a0efaaf8d55a952ef34
Revert "Squashed commit of GPS changes from CodeAurora"

This reverts commit 32679c2cbbcfe425ed43aca4fd78c92e1764b7df.
PowerWidget: fix airplane mode toggle

Settings.System -> Settings.Global

Change-Id: Ic1a874ec694e76153d0838fdb81650fe384bae59
Optimize drawHardwareAccelerated method in Editor class

When inserting a new line or breaking a line,
every display list was invalidated and rebuilt before.
However, we can reuse the display lists above intactly and also
reuse the display lists below with only updating drawing locations.

This patch reuses the display lists if possible.
The display lists above the inserted line are just reused
and the display lists below are reused with only updating
drawing locations not fullly rebuilt.

mIndexOfFirstChangedBlock is the index of the first block
which is moved by inserting or breaking a line.
So the display list whose index is >= mIndexOfFirstChangedBlock
only needs to update its drawing location.

Change-Id: Ica20deb0ebb5750de21356ed31fa9f86e657ff92
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
fix potential memory leak

use delete before return

Change-Id: I5449ad90bb6910f057bd825b722c9803a7343c34
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
Fix regression in ListView click handling

Regression caused by patch a607223f34

If an item click handler results in the ListView becoming detached
from the window, the performClick runnable could be executed twice.
Null out the mTouchModeReset runnable before running the click handler
so that it is not run by the detach handler.

Change-Id: I2fab60232027bb4876f9912088e0ffb9b17d308c
convert jint to uint32_t.

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

Change-Id: I1c49064bd64c31dafae560e416c665de0449f245
Remove unnecessary references in WindowManagerService

Clean message routines in WindowManagerService.

Change-Id: I3e3106b6499c67d1fd7133c987c0452a73141a3f
Signed-off-by: You Kim <you.kim72@gmail.com>
removing ineffective code in WifiService.java

no need to use wrapper class Long.
I think this looks like typo.
However, this fix will give us more space.

WifiService.class 33646 -> 33541.

Change-Id: Ia3a57285170315a9563c6ccf687424fe95ccc2df
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>
transparent nav bar

Signed-off-by: Roman Birg <romanbirg@gmail.com>
Change-Id: I71eb46af407ec97084dcf7944f0c4231c98dbe97

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarView.java
transparent statusbar

Currently just uses the same logic/values as the nav bar. We may want to separate those out

  Patch Set 9: Fix whitespace before merge

Change-Id: I6188ebd98684c8775b0447b4e6a1f09ec1a78887
Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
SystemUI: fix pulldown header for themes

Change-Id: I3607a146a2f44dc26c1d972708779c841ef7d8ae
Signed-off-by: Roman Birg <romanbirg@gmail.com>
SystemUI: fix inconsistent recents button behavior

Change-Id: I6065ae7ba9abb680a3abd64d77bce5292a17853e
Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/ExtensibleKeyButtonView.java
SystemUI: fix long pressing notifications

Stops the intent from firing off when long pressing
for the menu.

Signed-off-by: Roman Birg <romanbirg@gmail.com>
SystemUI: remove mStatusBarContainer to fix focus handling

Since we're killing sysui when restarting themes, there's no need
to try and be graceful about removing views, which is likely why
this extra parent view was added.

This fixes long pressing on a notification bar passing through and
firing off the click intent when the menu shows up.

Change-Id: I3f2539ee100f52a51fc270c34cde39cd312715be
Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/SystemUI.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
SystemUI: ram bar and recents performance improvements

PS2: add SettingsObserver to eliminate the need for SysUI restart
PS3: tab derp
PS4: stop jumpy behavior when clicking recents fast!
PS5: more reasonable timeout
PS7: restore :)

Change-Id: Iee304142285757656129ab92542013196615a404
Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/liquid/LiquidTarget.java
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/ExtensibleKeyButtonView.java
SystemUI: fire off intent to preload along with first task

Seems to help bring it up faster~

Change-Id: I2115ad42a2fca4473f22a65ebfcdc20ac21bde5b
Signed-off-by: Roman Birg <romanbirg@gmail.com>