Add double tap sleep feature to secure lockscreens.

In its current state double tap works on the status bar on unsecure
lockscreens this adds the feature to pin, password, and pattern
lockscreens.

 - pin and password: double tap the text entry view.
 - pattern: double tap anywhere on the pattern view.

Patch Set 3:
 - add to slide lockscreen(glowpad): double tap glow pad to sleep
 - update commit message

PS2: Added double tap on gesture view

Change-Id: I70eeae4acaa61b44feab661082bcfdbac7b9dfc3
Signed-off-by: baked <travp624@gmail.com>
Themes: Only process themes that are applied during boot

Currently, the PackageManagerService will process all themes and
ensure their resources are compiled and available to the system.
This is highly inefficient and can bog the system down when booting.

This patch will only process the themes that are currently applied
durring boot and lets the ThemeService take care of queuing up the
others for processing.   This reduces boot time considerably,
especially when the user has many themes installed.

Change-Id: I52168a1751ad3bfc458048dd1558ad71cc16317a
WallpaperCropper: respect max wallpaper width

Some devices with high resolution screen only support 2048px wide
wallpaper (used to be fixed in I5b25bd931db0b2610e260921f28b92d8b0966aa6)

Pre-KitKat this works as follows:

- Launcher calls WallpaperManager.suggestDesiredDimensions and we
  limit the maximum size in that function
- The wallpaper setting application calls WallpaperManager
  .getDesiredMinimumWidth and respects that size

However, after KitKat, it is all broken because WallpaperCropper
now calculate its own dimension and does respect the value set by
getDesiredMinimumWidth (and it calls suggestDesiredDimensions,
which is supposed to be reserved for Launchers!)

Attempting to restore wallpaper setting by:

- Having WallpaperCropper respect config_wallpaperMaxWidth
- Having CMWallpaper (which copy pasted code from WallpaperCropper)
  respect getDesiredMinimumWidth
- For third party applications, if they respect getDesiredMinimumWidth,
  then they will work, but if they don't (i.e. uses WallpaperCropper's
  code), then there's nothing we can do.

Change-Id: Ib7da12a1c70befbeef2f305593d3841acbc45243
AppWidget: Make widget update quickly

Can't display the Power control widget after power on DUT for
3 mins. Because of the  update intent is received after power
on DUT for 3 mins.

Set the intent to foregound

CRs-Fixed: 707605

Change-Id: I5418c84a7dc79466be7a30bb3672ea41976badb0
systemui: Unbreak the planet

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

Change-Id: I0c534354a699f756d809aff10843ebea21f3f369
framework: Close system windows when performing 'switch to last app' action

This fixes a bug where performing the action while on the recent apps screen
would cause the next attempt to open recent apps require two presses of the
recent apps button (the first press would toggle it closed, rather than open).

It also prevents the switch from being obscured by the notifications shade.

Change-Id: I2220149ce604a25501121abc29e5d88f8b1cbf4f
Add PowerManager integration for button and keyboard backlight.

Allows setting button and keyboard backlight brightness as well as
button timeout.

Change-Id: I550cccafc0a8f90d6347de9261adb26b75955cc4
Import translations from crowdin.net

Change-Id: I9bba0a749dec66505db98a6ac9135d2d79b6bcc2
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Themes: Let ThemeService handle all theme processing [1/3]

Only themes that are applied will be processed inside of the
PackageManagerService, all others will be sent off to the
ThemeService.

Change-Id: I5f2ec628e1d22a05accc6727efb0c1387455f82f
frameworks/base: Fix delay in sending AUDIO_BECOMING_NOISY intent

AUDIO_BECOMING_NOISY intent is sent as background intent which causes
delay in receiving pause event. This delay caused audio leak. By
marking the event as FLAG_RECEIVER_FOREGROUND, this intent is
received sooner by Application.

Change-Id: Ib978cf8322dcddbc01f59824f95fa7800f9c35af
CRs-Fixed: 652549
Merge "Add double tap sleep feature to secure lockscreens." into kitkat
P2P:initiate provisioning on persistant group removed.

The initiator, on a response from the peer with unknown group during
the persistent reinvocation has to transit to the provisioning state
to handle all the config methods (PIN and PBC).
This commit ensures the same.

Change-Id: Iafd8e14681628c002f613172ad36a1da7efb5369
CRs-fixed: 653078
P2P: Disable 5GHz channels in 2.4 GHz only mode

When P2P device is configured in 2.4GHz only mode supplicant
should not advertize 5GHz channels in its go negotiation frames.
  Hence disable 5GHz band channels when 2.4 GHz band only mode
selected in Wi-Fi advanced settings.

Change-Id: Ice8c9de34b19587c7e8432842a79551cc0e2333a
CRs-Fixed: 682823
Wi-Fi: Set BTCOEXMODE_DISABLED irrespective of BT's connection state

BTCOEXMODE_DISABLE has to be triggered during the DHCP phase even
on an active BT connection to ensure that Wi-Fi is given
preference over the BT.
This commit ensures the same
CRs-Fixed: 695307

Change-Id: I1eb979f03696831cb8f9e3a14b8a62f724347b64
Wifi: Handle P2P-REMOVE-AND-REFORM-GROUP event in GroupNegotiationState

Framework does not handle P2P-REMOVE-AND-REFORM-GROUP event
if it is in GroupNegotiationState and p2p-GO will continue to operate
in unsafe channel till it gets next P2P-REMOVE-AND-REFORM-GROUP event.

This commit adds handling of above event in GroupNegotiationState.

Change-Id: I956bbcd0200ddc3acde8b989a6e0950bdeca269e
CRs-fixed: 714368
wlan: Modify sequence of events sent during DHCP phase.

Modify sequence of events sent to driver during DHCP phase, to
make sure WLAN can enter into power save only after DHCP is done.

Change-Id: Idf7ed8d6e1c011bd3b7af9f5ca9d4db46de55fb0
CRs-Fixed: 719573
base: display live wallpaper settings instead of wallpaper picker

If the livewallpaper service declares and supports a settings activity, display it
instead of the wallparper picker in runnings apps details settings activity
(settings button)

Change-Id: I8db800cec4151ee5e6edddcea7a1bb5fb0528816
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Themes: Force recompiling common resources when scanning theme

If a theme is re-installed multiple times and in less time than
the 3 minute timout for common resources, it is possible for the
installation to fail because it does not compile the common resources.
This is not something an average user would encounter normally but
theme designers that are working on there theme and constantly
installing updates have a better chance of encountering this situation.
We simply remove the theme from mAvailableCommonResources which will
allow them to be recompiled.

Change-Id: I04b64645157dbb1d0c26fab95c851b34bfff3f42
Merge branch 'origin/kitkat'

Change-Id: I5c9c096d4bdecce2b5e97e7201b49c9d6a379a19