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
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
Merge remote-tracking branch 'pa/kitkat' into kitkat

Conflicts:
	core/res/res/values/pa_strings.xml
QS: Improve code readability

This commit modifies the code for enabling and disabling the edit mode
on Quick Settings tiles. No behavioral changes are introduced.

Change-Id: I8090508a2e5746827431eb7fbcdc981873db0e67
Merge "WallpaperCropper: respect max wallpaper width" into kitkat
Add Official AOSPA/PA Wallpaper

An official AOSPA wallpaper needs to be added for branding purposes.

Change-Id: I4b75b5142223ea3eedc81901941e72459ab1c72a
Make temporary QS toggles hideable

This commit adjusts the Quick Settings system to allow the temporary
tiles to be hidden and moved around meaning they are more consistent
with the other tiles around them.

Change-Id: I11f2f9f5986f75005bea8200a17ecffeff51a920
Merge remote-tracking branch 'AOSPA/kitkat' into aospal

Change-Id: Ia82ce278538e06bb17b3e029df5bd7f50a41431c
Status bar activity indicators for mobile data and wifi

Google were nice enough to create xxhdpi drawables for us before removing them.

Reverts "Remove signal/wifi activity indicator icon overlays."

This reverts commit fcc901c10bffdfb9c6b31e676dec36b47d949979.

Included NetworkController.java modification from Iaaa556ffab3ed4be1da8016ed40d0a9c2efcde01

Adding preference for arrows

PS14: Fixing errors

PS15: Turning arrows off done via actual removing drawables work, so when arrows are turned off,
they do not redraw statusbar anymore :-[

PS16: Commit Iaaa556ffab3ed4be1da8016ed40d0a9c2efcde01 merged to this one

PS17: Rebase to allow merge with latest source

Change-Id: I7aa85f7c8442c45d17e42cac7823dfe93e3f24c1
Systemui: ignore bartransitions if we are not on highend gfx

Change-Id: Ie40fc76b8fce760cd31675d0edad2045d2567643
msim: Add missing layouts for battery icon on MSIM devices.

This commits adds missing layouts for showing battery icon on notifications bar in MSIM devices.

Change-Id: I1c9675667a0c22a7e35b98f09a177fcf8609ecb1
Theme Engine: Add missing changes for MSIM devices

This commit adds some necessary changes for the New Theme Engine on MSIM devices.

Change-Id: I3281b5e865c37b4519d60031856ba787ba8f9c32
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
Wifi: Add a feature to control wifi auto connect.

If wifi connection type and gsm to wifi connection type is auto connect,
auto connect wifi.
CRs-Fixed: 507965

Change-Id: Icbfc58c93f13e97a2b6c6526d154153031e4b77c
P2P: Change supplicant scan intervel during WFD session

During WFD session supplicant scan intervel is one minute. If
there are some saved profiles, then supplicant will issue a scan
for every one minute, this is causing some ping latency in WFD.
    Hence supplicant scan intervel should change to five minutes
to improve ping latency in WFD session only.

Change-Id: If827bab6f186ebeaac90f297935bc8b987eb4d09
CRs-Fixed: 669404
WiFi: Fix data2Wifi caused not enableAllNetworks.

Use shouldAutoConnect() to judge if Wi-Fi networks have to get
enabled.
Ensure that the Wi-Fi networks are enabled in all the conditions
where the requirement for Auto Connection meet.
Thus, if there is no active Mobile Network, enable all the
Wi-Fi networks, though isDataToWifiAutoConn policy is not TRUE.

Change-Id: I082d0797347593ea6f878181908fea4bb64ca158
CRs-Fixed: 683197
WIFI: FIX wifi not auto-connect issue.

If the active network type is wifi, wifi connection type is auto,
auto connect to wifi.

This allows Wifi to auto-connect while wifi disconnected
for unexpected reason.

CRs-Fixed: 633648

Change-Id: I9f7f125cd7ffba18cbf5052e683cb31c6f71c573
Wifi: wifi not connecting, once the APN gets disabled state

APNs are disabled on select network and they are enabled on
receiving connected event.
But forgetting an APN before the connected event is received,
will result all the remaining APN to be in disabled state and
they never connect.
So, Enabling all the disabled APN on forget network will help
to connect automatically to a saved APN.

Change-Id: I6ac5e9856d6ec0b72c089b159206abd2de98e6a3
CRs-fixed: 496165
Wifi: fix auto connect policy for forgetNetwork

Use shouldAutoConnect() to judge if Wi-Fi networks have to get
enabled.
Thus, after forget network, if shouldAutoConnect() is false,
do not enable other saved networks to prevent auto connect.

Change-Id: I05b00bba54876f2d0d928e0faa9476b8d51b84b4
CRs-Fixed: 684684
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