Add looper to the thread to fix system_server crash

Toast message internally creates handler and we can't create
handler inside thread that has not called Looper.prepare().
Thus, we added looper to the thread to avoid system_server
carsh.

Change-Id: I09b9c4923c109f0b2707f8346e091efbd24b5089
CRs-Fixed: 669467
Revert "memoize activity manager graphics acceleration check"

This reverts commit 4099dde20c18746437afc198f833f0425b39cc59.
Freeing frame map

FileMap memory is never released until application exit

Release it now as the texture is already loaded and the memory
used for the packed resource can be released.

Change-Id: Id08a1e466337b3a0179684eb6a444e18147ee343
CameraTile: Launch default gallery app when long pressing active camera tile

Currently long pressing this does nothing. It makes sense to launch the default
gallery app from here if a user long presses in order to see pictures that
they've taken from the smaller camera preview.

Change-Id: Iad73a291443eb2a12e1399f24eeeec61ec945bf5
hwui: Fix the texture ID reuse issue

fix: reset bound texture with clear texture.

Issue: When the layer of previous frame is destroyed, it doesn't clear the
texture id in mBoundTextures[mTextureUnit], so in the next frame, if
glGenTexture returns same texture ID of the previous frame,
the new texture is not bound.

CRs-fixed: 671736

Change-Id: Ifc5fd2115fb1863b3c006ab14b0faabeaeb4eab4
hwui: fix possible null pointer de-refrence

add layer check for  null before de-refrencing it.

issue link: http://code.google.com/p/android/issues/detail?id=61622

Change-Id: I54fc21ec594effcfb1eededd80dd5b0b52645c4c
Keyguard: fix NPE setting lockscreen wallpaper

After boot the view might not be laid out and so getWidth() and
getHeight() return 0 and will cause a NullPointerException in
createBitmap().

Change-Id: Ibacf4199a69709dc34d21695732c2a5360533a23
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
NavTargets : Show highlight for google search

- Show highlight for google now icon
- Update launching logic to upstream
- Don't hideTargets in doFinish

Change-Id: I6027bc30b4bc98bf1dbadd9cb02e46349745bfbb
Revert Update the layer's alpha value upon composition of the layer

...
Fix frontOfTask assignment.

If all activities of a given stack were finishing, no activity was
marked as front-of-task. This confused ActivityManager, so make sure
there's always exactly one activity marked as front-of-task.

Change-Id: I087cbe10280d4a60aa5ccfaefe24a223523fb3f2
SystemUI: Update UserTile from Google 4.4 code

Change-Id: I867167b83897636a3e28d08849e018a3b25caad7
SystemUI: Expose heads up.

Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>
Change-Id: I276cb1c80d392b7dbac28e5f553207415b558481

Conflicts:

	core/java/android/provider/Settings.java
	packages/SettingsProvider/res/values/defaults.xml
	packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
HeadsUp: Clean up.

Change-Id: I98f445e7a4c92a34a3d9f63e14135e92416875ff

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
HeadsUp: Fix resetHeadsUpDecayTimer.

    - If user has forced immersive mode through expanded desktop,
    we shouldn't hide the heads up notification quickly.

Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>

Change-Id: I6ac015ce5c28216cafd3ce96f8d1993495b26897

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
HeadsUp: Add heads up quicksettings tile. (1/2)

Change-Id: Ibc6ffffb48ac1831ee5fe398577023960e0e79d4

Conflicts:

	core/java/com/android/internal/util/cm/QSConstants.java
	packages/SystemUI/res/values/purity_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
HeadsUp: Respect system decorations when adding view.

    - FLAG_LAYOUT_IN_SCREEN ignores system decorations, so
    a heads up view in landscape would end up underneath the navbar

    - FLAG_LAYOUT_NO_LIMITS allows the window to exceed the screen
    limits all together

      Removing both these flags makes Heads Up respect both system
    decorations and the screen limits.

Change-Id: I6f111e1c5701d493979be0cb596f11bc1b437fda
SystemUI: Improve HeadsUp expanding performance.

Change-Id: Ifd31caca6d2eb2432772b6a63f6b545f8288f449
QS: Update heads up tile icons

The bell icon for the "on" state look a bit crappy.
Update them too look more lika a bell.

Screenshot: http://goo.gl/rC1VFD

Change-Id: I9a6a54a5ee9ac0100ebf749ee3babe02eb0e2e32
HeadsUp: Add heads up blacklist options. (1/2)

Change-Id: If9e5eed658871400b3c21d9354262e0887bc592e

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
BaseStatusBar: Dismiss heads up on backpress.

Change-Id: I5b6191657cf0b74d825eb653a6e82c33e0527aad