Base: Help alleviate SystemUI crashes

try and catch method toward bitmap and out of memory errors

Change-Id: Ie18faac4dce45eb2fe9ca07d628bed7cd0eafaab
systemui: Unbreak the planet

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

Change-Id: I0c534354a699f756d809aff10843ebea21f3f369
Base: Help alleviate SystemUI crashes

try and catch method toward bitmap and out of memory errors

Change-Id: Ie18faac4dce45eb2fe9ca07d628bed7cd0eafaab
Don't unnecessarily set LayoutParams on children

Setting LayoutParams on children triggers requestLayout
which can be expensive and result in significantly lower
framerate for children layouts that don't need it. When
requestLayout method is invoked the needToMeasure boolean
will be true, this is what we'd like to avoid unless
it is actually needed.

BUG: https://code.google.com/p/android/issues/detail?id=72733

Change-Id: Id5d8f3431b5f943b1279eae41ee43d32a99514fc
Signed-off-by: Jacob Abrams <satur9nine@gmail.com>
Base: fix logic tinted system bar

1. fix action bar make statusbar icon changes with same color action bar text
       if current action bar background is null
2. move log into each bartransition so we can track what is changes
3. make process not changing system bar color
      if current screen color is same with before (less draw)
4. always reset system bar color when launching new apps
5. fix color changes using 3rd party app keyboard

Change-Id: If53178e24caae7dff30636eda440d0e618702e3e

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Base: improve color fetch calculation

this also fix calculation for device without navigation bar

Change-Id: I5ea3fb5dd18dadf1ced0255b3bf6554a7b50079c
Base: respect layout changes before sending color broadcast

currently tinted system bar process is smart enough to determine
   when system bar need to change the background color
   now this patch improve how this process is done when when there is
   layout or window changes

example:
   open app, press home button
   open other app, press home button
   open recent or Omniswitch, open one of apps in there
   open again recent or Omniswitch, open other apps
   now system bar will take responsibility to changes the background color

another example:
   open app that has many activities like G+
   open notifications menu or input a message to post
   see system bar will take this layout transition to changes background color

for a scroll view, currently still need a touch to take process, because
   "View" is not a layout transition, so there is no way to take this to call tinted
   system bar process

fix notifications icon color not update after added

Change-Id: I0c69ad963d1589d6aad7c0135ed1007cbd2b4bba

Conflicts:
	core/java/android/app/Activity.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
QuietHours (1/2)

Change-Id: I96d937e2b418b8b79178c98325fe7c6837543269

Conflicts:
	core/java/android/provider/Settings.java
Base: respect layout changes before sending color broadcast

currently tinted system bar process is smart enough to determine
   when system bar need to change the background color
   now this patch improve how this process is done when when there is
   layout or window changes

example:
   open app, press home button
   open other app, press home button
   open recent or Omniswitch, open one of apps in there
   open again recent or Omniswitch, open other apps
   now system bar will take responsibility to changes the background color

another example:
   open app that has many activities like G+
   open notifications menu or input a message to post
   see system bar will take this layout transition to changes background color

for a scroll view, currently still need a touch to take process, because
   "View" is not a layout transition, so there is no way to take this to call tinted
   system bar process

fix notifications icon color not update after added
cleanup unused function

Change-Id: I0c69ad963d1589d6aad7c0135ed1007cbd2b4bba

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Fix crashes upon confirming On-The-Spot dialogs

This commit partially reverts "On-The-Spot: Add Gif support" with
change ID Ic1e383c11eb6b8a7a2200470fa31bb28dfc304f7 to fix crashes
related to incorrect UIDs that were taking place when the system
tried to write settings using the UI context.

Change-Id: Ie195e33cde04dd3bdf6116ae251b19269f9cc94f
Keyguard: Fix incorrect PIN entry on MSIM devices

This commit fixes a SystemUI FC caused by incorrect resource IDs that
happens on MSIM devices when the PIN code is entered incorrectly.

Change-Id: Iff82859e34018e84db1f8884019a53c3414b692b
Merge remote-tracking branch 'pa/kitkat' into kitkat
Merge remote-tracking branch 'aospa-legacy/kitkat' into kitkat-legacy-staging

Conflicts:
	packages/Keyguard/src/com/android/keyguard/msim/MSimKeyguardSimPinView.java