Immersive mode: don't unconfirm a package, that's just dumb

* This is very annoying for specialized apps
* See here for a great explanation http://stackoverflow.com/a/20309721
* The fact that it doesn't even notify the user until the NEXT time they
  run it makes it completely pointless in my opinion anyway.

Change-Id: I423611efc07d467e1d81c66d58adcff331be8b38

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
PIE: On-The-Spot: Apply immersive not only at first ASK_LATER choice, always

PIE's on the spot dialog is handled differently with pie, we have to reset to let observer capture
a second etc ask later choice.

Continue this https://gerrit.paranoidandroid.co/#/c/4347/

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
SystemUI: Fix crash on Recent Apps list

Issue: SystemUI crash is observed when Context MenuItem "App info"
       is selected on the recent apps activity
       1. Open the rencet apps list
       2. Long press on any one/more recent app(s)
       3. Lock the screen using power key
       4. Unlock the screen using power key
       5. select menu item "App info"
       6. SystemUI process will get crashed.

Fix: Changed the code to make sure that only one context
     menu is active at a time and also dismissed the
     context menu on pause of the RecentsActivity

Change-Id: Ia50bed7bfad6fde7beeaec37fa6402177eee1d40
PIE: Revert those null checks, were messing up animation somehow

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
EdgeGestureService: Tweaked values for trigger mask closer to stock ones

Applies to both default navbar and pie immersion.
PIE's diff is that benefits from a custom sensitivity param (MAX).

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Merge "PIE: Revert those null checks, were messing up animation somehow" into kitkat
Merge "EdgeGestureService: Tweaked values for trigger mask closer to stock ones" into kitkat
Keyguard: Avoid unneeded SIM dialog show() calls

https://paranoidandroid.atlassian.net/browse/AOSPA-465

This commit makes the progress dialog's show() get called only once
each time the SIM unlock process is started.

It was reported that a phone can be frozen by entering the PIN code
for the SIM card "too quickly". This leaves the user with a device on
which the screen is filled with a non-cancellable dialog box saying
that the SIM card is being unlocked. The logs inform that Keyguard
experienced a success and no explicit errors could be seen there and
only the dialog stayed around, all leading to believe the issue is
with how the progress dialog is being showed and later hidden (or
simply dismissed), in which case this show() call reduction might be
benefitial.

Change-Id: Ibbb4b725598c95e2b2ee9689f6bf50247ad235ac
Themes: 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().

Bug AOSPA-448

Change-Id: Ibacf4199a69709dc34d21695732c2a5360533a23
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
TextView: Check also for mLayoutParams before calling checkForRelayout

Cherry-picked from OmniROM.

http://jira.omnirom.org/browse/OMNI-976

This was introduced with
https://github.com/omnirom/android_frameworks_base/commit/b3670c54e60387fde633fb91c649c5b896f8b962

Change-Id: I06c1926c5b8102b336d128d9b411f74a9eff3ded
Merge "TextView: Check also for mLayoutParams before calling checkForRelayout" into kitkat
Merge "Themes: Keyguard: Fix NPE setting lockscreen wallpaper" into kitkat
TextView: Prevent more NPEs

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: If710bddace79d67a3c97c10ad591a4024c89e4ef
NotificationManagerService: LED cleanup and Mulituser support

Some sauce taken from SlimROMs.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Merge "NotificationManagerService: LED cleanup and Mulituser support" into kitkat
Merge "SystemUI: Fix crash on Recent Apps list" into kitkat
NotificationHelper: Create broadcast receiver for Peek app

Store showing state.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Automatic Translation Import

Change-Id: I413f67dfd98f042d001d9117661a35112f47254d
Themes: Avoid compiling icon packs every boot

Change-Id: I51c7effdd4592a302f457822a05cbebee6cde06b
Themes: synchronize updateStringCache on mAccessLock

Resources.java used to synchronize on mTmpValue but has since
switched to mAccessLock. mTmpValue can be null in some instances
causing a NPE during a theme change.

Change-Id: I7411dfdf6e8e411381ae993872a3c740dad19300