FW: IME animations [1/2]

Original from here:
Keyboard Animation zst123/XuiMod@975cd53
thanks to zst123 for patches

Patch destiled from here:
https://gerrit.omnirom.org/#/c/4251/37

need this --> http://review.pac-rom.com/#/c/836/

PS2: Update message
PS3: update author
PS4: whitespaces

Change-Id: I0849ec5f2f641fbd5cd25b3d6e758abfe435bb8b

Conflicts:

	core/res/res/values/spirit_symbols.xml
White-space

Change-Id: I4020e26c9716c3de2c5560475680a8af0db72efa
GC: Improve the string parsing for GC parameter setting

Improve the string parsing for GC parameter system property.
Previously we only recoganize plain number for dalvik.vm.heapminfree
and dalvik.vm.heapconcurrentstart, while users tend to use format as
2m.  Improve the string parse to cover such cases.

Change-Id: Iaf0152bc4d77e1caabc307a9a7b0e5b261f8e441
Quiet Hours: Add 4 state (off, timed inactive, timed active and forced on) support

Change-Id: I2486d2dd40d0db9fceab74d53fba233bac508de3

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/quicksettings/QuietHoursTile.java
[ActivityManager] Fix a bug: unable to start activity after starting activities during screen off.

Symptom: Unable to start any activity.
Root Cause: ActivityStack.mPausingActivity() points to a destroyed activity of a died process, so that ActivityStackSupervisor.allPausedActivitiesComplete() always returns false.
Solution: Set mPausingActivity to null in ActivityStack.cleanUpActivityLocked().
Reproduce steps:
    a. Turn screen off.
    b. A background service starts an activity X (in process X).
    c. A background service starts a no-history activity Y (in process Y), but the main thread of Y was blocked.
    d. A background service starts Y 3~4 times --> this causes am_failed_to_pause on X.
    e. Main thread of Y is freed finally --> this causes Y crash for android.view.WindowManager$BadTokenException.
    f. Turn screen on, X is shown on screen, but neither back key nor home key can work because mPausingActivity is Y.

Change-Id: I320b3db407e2d4cc745c8ca22a6e548742234242
Solve three memory leaks related to PatchCache

A Patch can be fairly large, holding bitmap data, but
is also frequently leaked which adds to the severity.
The feature is used in many important processes such
as Home, SystemUI and Chrome.

The following leaks are solved:

1. The Patch itself was not always freed.
PatchCache::removeDeferred() can mark patches to be
cared for by PatchCache::clearGarbage(). But
mCache.remove() would only destroy the container
and the pointer, not the Patch object itself.

2. The vertices stored in the Patch at Patch::createMesh()
would always leak. The empty/default destructor in Patch
would not properly destroy "vertices" since it's just a
pointer.

3. A BufferBlock that's added to the mFreeBlocks
in PatchCache could leak. The leak happened when a
patch later needed the entire free block, because the
object was removed from the list but never deleted
in PatchCache::setupMesh().

Change-Id: I41e60824479230b67426fc546d3dbff294c8891f
Removed android.debug.JNITest from preloaded-classes

android.debug.JNITest class no longer exists in this
project. This patch updates preloaded-classes accordingly
to avoid spurious warning during boot.

Change-Id: Ia4a5a1858f6c87fbc594a623adb95454334361ea
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Avoid SystemUI crash due to NPE

BaseStatusBar.createNotificationViews() returns null
when it reports handleNotificationError(), leading to
a forced crash of the misbehaving app. However, it
should not add a null object of Notification.Entry
since it will also crash SystemUI (crashing at compare).

Change-Id: I86678c8024e931420b0fbab1f36b330e7e75d581
GlobalActions: Fix Airplane Mode on/off issue

Issue: Unable to turn off Airplane mode from power button
       after phone reboot

Fix: Initialize mHasTelephony before the PhoneStateListener is
     registered to the TelephonyManager so that correct value
     of mHasTelephony is reflected when onServiceStateChanged
     callback is called.

Bug: 13697360
Change-Id: Ide8afd9c16ea90b98b5912dbff440c5fd67b178d

Conflicts:

	policy/src/com/android/internal/policy/impl/GlobalActions.java
Fix RenderScriptGL setSurfaceTexture problem

rsnContextSetSurfaceTexture() has no implementation in rs-jni, use nContextSetSurface() in setSurfaceTexture().

Change-Id: I066432575c9e74f21ea3a3776628b572b6e31377
Signed-off-by: Xiaofei Wan <xiaofei.wan@intel.com>
Insufficient ProcessRecord cleanup when persistent process is killed

When persistent process with Service restarts, ActivityManagerService
does not reset ProcessRecord#hasClientActivites to false
(because ProcessRecord of persistent process is continued using
after killing).

It disturbs updating LRU list in ActivityManagerService, and then,
when new process calls ActivityManagerProxy#publishContentProviders,
SecurityException happens because of no entry in the list.

Bug: 13517358

Change-Id: I46b064f71a4f7025ade1bf117801352a7ab22e6a
Don't register methods when there's nothing to register.

Change-Id: I6d0233f79bb90089426d702b4076ec5750e82475
Fix a system crash due to orphan HandlerThreads

In SeekBarVolumizer class a HandlerThread is
instantiated that is not halted after the object
is garbage collected. The final consumer of
this class is volumes adjustment dialog in Settings.
If the user invoke the dialog several times, many pipes
are opened in Settings process that it finally exceeds
the maximum permitted number and the system crashes.

Change-Id: Ifd777365b5779f5db92c605413eb0254a53c8b00
fb: fix rounding issues and take density into account

we are a multiDpi rom...and on 4.2 and 4.3 already the text
in the circle battery icon was on lower dpi a small bit up. The original
author compensated this with just a +1 to the Y value. Thats not the right
way...calculate the current dpi into the offset and all is well.

We want a perfect 4.4...so this nitpicks even if we are talking about
0.5dp maybe should be fixed

Change-Id: I835aa20b82aea980eb79a4772adccf30b2d6f79f
Frameworks: Fix memory leak + cleanup

Do not create new Objects onDraw + cleanup

Change-Id: Id1dc9ae85ccf820f2047528e12c4ecdc525f12d2