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
Keyguard: Make sure disabling Camera widget

This fixes the issue that Camera widget is enabled on non-camera devices
until users open up lockscreen settings

Change-Id: I599733f65ec31a16f8a8c5ee98a8a2ba6bc56c63
Add TYPE_MAGNIFICATION_OVERLAY to InputWindowInfo::isTrustedOverlay()

This fixes a bug where a View with filterTouchesWhenObscured will have
all touches filtered when in magnification accessibility mode. This is
due to magnification being a separate Window over top of the running
Activity. The method onFilterTouchEventForSecurity in View will then
always return false when filterTouchesWhenObscured is enabled on the
View. By adding the magnification Window to the list of Trusted Overlays
we can ensure that touches will work properly with this property enabled.

Change-Id: I07706588a625682d05da5cb19f401139eb08a54c
Signed-off-by: houst0nn <houstonn@gmail.com>
framework-res: Remove gingerbread scrolls
Keyguard: don't try to fetch the badgeIcon if remoteClientPackage == null

Logcat shows....if client is lost there is no need to force an exception due that remoteClientPackage
in this case is null.

Change-Id: I80e612610f93c9d70c854b2fcb8fbf0c0d8f9e2a
ActivityManagerService: Increase key dispatching timeout value

Increase key dispatching timeout value for Fast Models to make sure
that applications e.g. Monkey wait for enough time before raising ANR
(Application Not Responding) errors.

Change-Id: Id11267567c5ef49ee578048c9bc6d98e8b153836
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Allow creating custom dialogs in DialogPreference.

This allows creating non-AlertDialogs while still using the click and
state handling of DialogPreference.

Change-Id: I54fd7d6d6b9f6a49fef1ae95e0178838b3edfa56
Allow adjusting progress on touch events.

Change-Id: Ide0a7ae057a62f3631a32eeaa63f3e04dec5bf54
Remove the navigation camera icon in keyguard if disabled by DPM

The logic here is incorrect: the camera shortcut is/should be accessible
even with a secure lock screen. As a result, a device with the lock
screen camera disabled by DPM and an insecure lock screen would still
display the unfunctional shortcut.

Change-Id: If1d172932c6c2af596c38e623521c992fdf95402
Parallel shutdown

Decrease shutdown time by doing some shutdown tasks in parallel.

There are two threads executing during the shut down: the ShutdownThread
and a separate thread for the radio shutdown. However, the execution is
done in serial, as the ShutdownThread immediately joins on the radio
thread.

This commit will move the shutdown of the radio to the beginning of
shutdown and execute it in parallel to the shutdown of the rest of the
system.

The flow of the two threads during shutdown is now:

Radio Thread
  * Start shutdown of the radio
  * Wait for radio off or time out
  * Notify that the radio is done
ShutdownThread
  * Broadcast ACTION_SHUTDOWN as a parallel broadcast. (The receivers
    will get as much time to handle onReceive as it takes execute the
    rest of the tasks in the shut down flow. If they are not done in
    that time, we don't care.)
  * Shutdown ActivityManager
  * Shutdown MountService
  * Wait for MountService and radio to notify done
  * Vibrate
  * Low level shutdown

Change-Id: Ifdd8a9c75337fd9d00148a0d2b9917e10fa60634

Conflicts:
	services/java/com/android/server/power/ShutdownThread.java
PowerManagerService: use disablesuspend property to disable suspend mode

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Revert "[1/2] Frameworks: Wakelock Blocker"

This reverts commit 1878bf6d3d6f4ce99ea215b5e717b8604ebad351.
Revert "resolverActivity: don't use Holo Light"

This reverts commit 255238d0edf728b55f03e3e9aec5a91230f04de6.
Revert "no recent apps: use white, not holo blue light."

This reverts commit 26ecb49ff33980a8e3575f1def1fb9d65f5d2587.
SystemUI: fix double tap to sleep not working with secure lock screen

Double tap to sleep on status bar would only work on secure lockscreens if the
slider brightness control was enabled.
AudioService: Show safe volume panel for non-interactive volume adjustments

If safe volume is active, apps calling mp.setVolume() to adjust the headset to a value higher than the threshold will have the operation fail silently because no volume dialog is active to pop up the "do you wish to override" question. This is particularly bad for peripherals that use the audio jack (Square readers, Jawbone bands), since they usually require levels close to maximum for proper communication and the app isn't prepared to deal with a silent rejection of the requested volume.
AudioService: update link ring-notifications after read user settings
Base: Cleanup translations to get rid of compiler warnings

Squashed of 4 commits by kufikugel:

commit 1612533cffda5b3c3d76c4daa1c3d9938391da2a
Author: Lars Greiss <kufikugel@googlemail.com>
Date:   Wed Dec 11 18:57:28 2013 +0100

    DocumentsUI: google please cleanup your translations....DocumentsUI cleanup

    it is really at the moment a nightmare to see compile errors when
    getting 100000 of warnings. Whatever we removed already on some
    packages the warnings....but still a lot are there

    Change-Id: I51682d5b74f76cb5e14d0a51d7694ee7235236be

commit 36b4bf5727947b3b1a93298e32c85d95c36b8080
Author: Lars Greiss <kufikugel@googlemail.com>
Date:   Wed Dec 11 18:48:34 2013 +0100

    Keyguard: google please cleanup your translations....Keyguard cleanup

    it is really at the moment a nightmare to see compile errors when
    getting 100000 of warnings. Whatever we removed already on some
    packages the warnings....

    this package is the best.......nearly every language has left
    overs where not one string is used at all and one string
    which is used does not exist in system language

    whatever remove and add it like it should

    we are now warning free

    Change-Id: I06a3a3d15560aa04abd8c6c4981ac12c6dbc0c90

commit 3cd5da20b444731251c84ad4bd8422d03d76f28c
Author: Lars Greiss <kufikugel@googlemail.com>
Date:   Wed Dec 11 17:54:47 2013 +0100

    fb: google please cleanup your translations....fb cleanup

    it is really at the moment a nightmare to see compile errors when
    getting 100000 of warnings. Whatever we removed already on some
    packages the warnings....but still a lot are there

    Change-Id: I1cc3abee5b4820d9c56b89056f1ea7e4d798947b

commit 2454e3718c7cb32fa700d1ac2b6afc2383dec1f4
Author: Lars Greiss <kufikugel@googlemail.com>
Date:   Wed Dec 11 00:30:54 2013 +0100

    fb: google please cleanup your translations.....systemUI cleanup

    it is really at the moment a nightmare to see compile errors when
    getting 100000 of warnings. Whatever we removed already on some
    packages the warnings....but still a lot are there

    This commit cleans up SystemUI

    Change-Id: I4e246e1cfc13bb18eb75624510e53731821ff553

Change-Id: I5f2bcd7f4a1acb7a28643c1c1203a886db10cc92
Signed-off-by: pcarenza <pcarenza@gmail.com>
Remove unnecessary updateSurfaceScreenOn call.

This change stops updateSurfaceScreenOn() from being called one time
right after another. It's called at the end of stayAwake(boolean awake),
which is called right before updateSurfaceScreenOn() in release().

Change-Id: I3e5db322f0abce0cd37320a103015ba72dffa64f
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>